What is MCP: the protocol that connects AI applications to tools and data

  1. Introduction
  2. Three roles in MCP: host, client and server
  3. Two layers: data and transport
  4. The three building blocks a server offers: tools, resources, prompts
  5. A realistic exchange
  6. Notifications when the list changes
  7. What MCP does not do
  8. Summary
  9. References

Introduction

A language model is good at writing and reasoning, but on its own it cannot read your code repository, look at a server's logs or create a ticket.

To do those things, an AI application needs a bridge to the outside world. In the past every application wrote its own bridge for each service, so the effort was duplicated and hard to reuse.

The Model Context Protocol, MCP for short, solves exactly that: it defines a common way for an AI application to ask "what do you offer?"

and "please do this for me" with any program that speaks the same protocol. This article explains what MCP consists of and how the parts work together.

It is based on the official MCP documentation, specification version 2026-07-28, as of November 2026.

Three roles in MCP: host, client and server

The official documentation describes MCP as a client–server model with three components:

An easy point to miss is that the host does not talk to servers directly. The host creates one client per server.

If you connect a file-system server and an error-tracking server, the host has two clients, each handling one line.

The word "server" here only means a program that serves context; it says nothing about where it runs. A server that runs on your own machine, started by the host, is usually called a local server.

A server that runs on a provider's platform and is reached over the network is called a remote server.

Two layers: data and transport

MCP is split into two layers:

Because the layers are separate, the same JSON-RPC message works over both channels, so you write the logic once.

The three building blocks a server offers: tools, resources, prompts

This is the most important part of MCP. A server can offer:

Building block

Tool

Used for

performing an action

Example

calling an API, querying a database, working with files

Building block

Resource

Used for

providing data as context

Example

file contents, a database schema

Building block

Prompt

Used for

a template that structures a conversation with the model

Example

a system prompt, few-shot examples

Each kind has a discovery method of the form */list and a matching method to fetch or run it: resources/read, prompts/get, tools/call.

For example, a database server might expose a tool for querying, a resource holding the schema and a prompt containing example usage of those tools.

On the client side, the specification has elicitation (the elicitation/create method): the server asks the user for more input or for confirmation of an action.

A realistic exchange

Suppose a host has just connected to a server. A typical flow looks like this:

  1. The client may send server/discover to learn which versions and capabilities the server supports.

  1. This step is optional, because every request already carries the protocol version and the client's capabilities in the _meta field.

  1. The client sends tools/list. The server returns the list of tools, each with a name, a description and an inputSchema (a JSON Schema describing the parameters).

  2. The host gives that list to the model. When the model decides to use a tool, the host asks the client to send tools/call with the name and arguments.

  1. The server runs the tool and returns content, an array of text, images, audio or links to resources. The result goes back to the model so it can continue its answer.

A tool-call request looks like this (shortened, without _meta):

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "add_note",
    "arguments": { "title": "demo", "text": "hello" }
  }
}

What stands out in the new version of the specification is that MCP does not keep per-connection state: each request carries everything needed to process it.

If a server needs to remember something across calls, it returns an explicit "handle" and receives it back as an ordinary parameter.

Older versions of the specification have an initialize handshake and sessions, so you may come across both styles in older documentation and tools.

Notifications when the list changes

The list of tools can change over time. A client that wants to know opens a subscriptions/listen stream and names the notification types it wants, such as toolsListChanged.

When the list changes, the server sends notifications/tools/list_changed; the client usually reacts by calling tools/list again.

The documentation notes that notifications are best effort, so a client should still ask again from time to time to keep its data fresh.

What MCP does not do

MCP only handles the exchange of context. It does not dictate how an application uses a language model or manages context.

It also does not make a tool safe by itself: permissions, authentication and letting the user approve actions are the responsibility of the host and the server.

This topic has its own article: Permissions and safety when letting AI call real tools through MCP.

In addition, specification 2026-07-28 marks roots, sampling (client features) and protocol logging (a server feature) as deprecated. A stdio server should log to stderr, or use OpenTelemetry.

Summary

MCP is the standard layer between AI applications and the outside world: the host creates one client per server, the parties speak JSON-RPC 2.0 over stdio or Streamable HTTP, and the server exposes tools, resources and prompts for the model to use.

Once you understand this picture, the next step is to build a small server yourself: see Writing your first MCP server in TypeScript: two tools over stdio.

After you can call tools, read the safety section carefully before connecting to real systems.

References

What is MCP: the protocol that connects AI applications to tools and data