The MCP contract for context and tools

The part of the stack I come back to first, when an application needs data or a tool outside the model, is the Model Context Protocol. This page takes that contract in more detail than the protocols index.

What the specification standardizes

The official specification describes MCP as an open protocol that connects language model applications to data sources and tools, and that gives applications a standardized way to share context, expose tools and build composable integrations. Communication uses JSON-RPC 2.0 messages among three roles: the host, the LLM application that initiates connections; the client, the connector inside the host; and the server, the service that provides context and capabilities.

The spec itself says MCP takes some inspiration from the Language Server Protocol, which standardized how to add language support across an ecosystem of development tools. In a similar way, MCP standardizes how to integrate additional context and tools into the ecosystem of AI applications. The analogy is about standardizing an ecosystem.

The project's official introduction uses a different image, a USB-C connector: just as USB-C provides a standardized way to connect electronic devices, MCP provides a standardized way to connect AI applications to external systems. The official introduction uses that image as a metaphor for a standardized connector.

A server offers resources, prompts and tools. In this revision, the elicitation primitive on the client covers server-initiated requests for additional information from the user. The architecture documentation draws a clear boundary: MCP focuses solely on the protocol for context exchange, and does not dictate how the application uses the model or manages the context it receives.

History and stewardship

MCP was created at Anthropic by David Soria Parra and Justin Spahr-Summers, and released as an open standard. The Linux Foundation later announced the formation of the Agentic AI Foundation, or AAIF, with founding contributions of Anthropic's MCP, Block's goose and OpenAI's AGENTS.md. The project is now hosted there, under the Linux Foundation. The Foundation's note calls MCP "the universal standard protocol for connecting AI models to tools, data and applications"; that wording belongs to the Linux Foundation, not to the spec, and I leave it attributed.

The official versioning page states that the protocol uses string-based version identifiers in the YYYY-MM-DD format, and that the Current protocol version, "ready for use" in the page's own wording, is 2026-07-28. That revision may continue to receive backwards compatible changes. I treat 2026-07-28 as the official identifier of this revision.

The changelog for this revision records, among other changes, the removal of protocol-level sessions and of the initialize handshake, the declaration of version and client capabilities on every request in _meta, the required server/discover RPC, the Multi Round-Trip Requests pattern and the required resultType field, with the values complete or input_required.

How a host talks to a server

The host coordinates one or more clients. Each client maintains a connection to a server. A server may run as a local process, typically over the STDIO transport, or remotely, typically over Streamable HTTP. On Streamable HTTP, the same version identifier also travels in the MCP-Protocol-Version header.

Every request declares the version in _meta, under the key io.modelcontextprotocol/protocolVersion. The server must implement server/discover, to announce supported versions, capabilities and identity. The client may call it before other requests, and may also send any request and handle a version error if it skips that call. The typical tools cycle in the architecture overview runs from an optional server/discover to tools/list and tools/call, with an option to listen for changes through the subscription flow documented on the same page.

Official tutorials cover building a server and a client, and the SDKs page lists implementations in TypeScript, Python, C#, Go, Rust, Ruby, Java, Swift, PHP and Kotlin, in distinct tiers. That page notes that SDKs adopt new protocol revisions on their own schedules.

The spec, in the security section of the Overview, treats tools as arbitrary code execution, to be handled with the corresponding caution. The host must obtain explicit consent before invoking any tool.

An official example

The example below comes from the official architecture documentation for revision 2026-07-28, at https://modelcontextprotocol.io/docs/2026-07-28/learn/architecture. These are JSON-RPC messages from that revision: a tools/list request and a tools/call request.

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/list",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-client",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/clientCapabilities": {
        "elicitation": {}
      }
    }
  }
}
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "weather_current",
    "arguments": {
      "location": "San Francisco",
      "units": "imperial"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-client",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/clientCapabilities": {
        "elicitation": {}
      }
    }
  }
}

The official tutorial for building a server, in Python, opens with the excerpt below, also from the official documentation, at https://modelcontextprotocol.io/docs/2026-07-28/develop/build-server. I copy the block as the page publishes it, including the HTTP client it names.

from typing import Any

import httpx2
from mcp.server import MCPServer

# Initialize MCPServer
mcp = MCPServer("weather")

# Constants
NWS_API_BASE = "https://api.weather.gov"
USER_AGENT = "weather-app/1.0"

The fit as A2A describes it

The MCP specification does not define A2A. The official fit appears on the A2A side: MCP connects an agent to tools, APIs and data; A2A connects an agent to other agents; the two are used together. MCP, A2A and AGENTS.md appear as projects under the same AAIF.

I leave the byte-level rules in the Current specification. What I wanted here was the shape of the contract, and a pointer back to the index.

Sources