Limited-period launch offer: 80% OFF · MCP Builder’s Handbook at ₹98 instead of the regular ₹499 · See details
Roori eBooks
Free resource · printable

MCP cheat sheet (protocol revision 2026-07-28)

Everything to remember about the Model Context Protocol on one page. Use your browser’s Print to save it as a PDF.

Roles

  • Host: the AI app the user talks to
  • Client: one connection per server, inside the host
  • Server: exposes tools, resources, prompts

Server features

  • Tools: functions the model may call
  • Resources: read-only data by URI
  • Prompts: reusable templates

Client features: elicitation, sampling, roots (optional)

Transports

  • stdio: newline-delimited JSON-RPC to a subprocess. Never print to stdout; log to stderr. Credentials from the environment.
  • Streamable HTTP: each message is an HTTP POST to one endpoint. Follow the MCP authorization spec.

2026-07-28 request model

  • No initialize handshake, no session
  • Every request carries protocol version and client capabilities in params._meta
  • Optional server/discover returns supported versions and capabilities
  • HTTP also sends the MCP-Protocol-Version header

Required _meta keys (seen in a real run)

"_meta": {
  "io.modelcontextprotocol/protocolVersion": "2026-07-28",
  "io.modelcontextprotocol/clientCapabilities": {}
}

Observed with the Python SDK 2.3.0: missing keys return error -32602.

Security rules

  • Read-only by default; approve consequences
  • No raw shell, SQL or URL tools
  • Least privilege; authorise per user and per tool
  • Treat tool output as untrusted (prompt injection)
  • Bound inputs and outputs; time out and rate-limit
  • Never put secrets in client apps

Use MCP when…

  • Several AI apps need the same capability
  • Tools are naturally model-callable functions

Skip MCP when only your own code calls a fixed API. Use REST or function calling.

Python quickstart (tested)

uv add "mcp==2.3.0"
from mcp.server import MCPServer
mcp = MCPServer("demo")
@mcp.tool()
def add(a: int, b: int) -> int: ...
mcp.run()  # stdio

Sources: official MCP specification 2026-07-28 and a real run of the Python SDK, checked 19 October 2026. Author guidance is labelled in the guides.

₹98 ₹499 80% OFF
Buy the MCP e-book