← All notes

MCP for agents

Summary

The Model Context Protocol is how an AI application connects to programs that offer tools, data, and prompt templates. It does not decide how that application calls a model or stores context. A separate abstract about multi-turn coding agents is useful next to that, because tool schemas and tool output are a large part of the token bill once an agent runs for many turns.

Who talks to whom

An MCP host is the AI application. The page names Claude Code, Claude Desktop, and Visual Studio Code. The host opens one client per server. That client keeps the connection and fetches context for the host.

A server is the program that serves context, local or remote. Standard input and output usually serves one client and has no network hop. Streamable HTTP usually serves many, using POST, optional server-sent events, and HTTP credentials. The docs recommend OAuth for tokens. The same JSON-RPC 2.0 messages ride on either transport.

MCP does not say how the application calls a model or stores the context it receives. SDKs hide framing. The useful part is the data layer.

What to call

The protocol is stateless. Every request carries the protocol version and the relevant capabilities, and clients should name themselves unless told not to. Servers must implement discovery. Calling it first is optional. A rejected version comes back with the versions the server supports.

Servers expose three primitives. Tools are functions the app can run, such as file, API, or database work. Resources are data, such as a file or a record. Prompts are reusable templates. Clients list them, then read or call. Names must match the list, and tool arguments must match the input schema. Results come back as content objects. The host routes the model's tool call to the client that owns that tool and puts the result back in the conversation.

Clients can offer elicitation so a server can ask the user for input or confirmation. Sampling and client-side logging are deprecated as of the protocol version on the page. New servers should call a model API themselves, and should log to standard error on the local transport or use OpenTelemetry.

Change notices are opt-in, expect no reply, and are best effort across reconnects, so also poll. A tasks extension can hand back a handle for a long request.

Tokens on a long tool-using run

The cost abstract is not about MCP. It measures a compression gateway between coding agents and frontier models, and splits the bill into tool-schema filtering, compression of file reads and tool output, and history summarization. Those levers did not save at the same rate.

Schema filtering removes a fixed block every turn. It grows in a straight line with turn count, and it was the only lever the abstract calls unambiguously and reproducibly positive.

Compressing read content saves only a small share of the cache-priced prefix on one turn. The compressed text stays in history and is sent again later, so the cumulative saving grows much faster until the window caps it. If the agent can pull original bytes back, each recall resends exactly the segment just removed. That extra cost is bounded, but heavy recall spends the saving one segment at a time.

A strong single-shot compression score is a different result. The abstract says it is orthogonal to multi-turn agent cost and must not be cited as proof of savings.

Attach fewer or smaller tool schemas first. If you compress tool output, assume it will be replayed, and assume recalls give some of the saving back.

Claims

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Model Context Protocol, Architecture overview - Model Context Protocol, CC BY 4.0 (docs); arXiv, An Empirical Cost Attribution of Context-Compression Gateways in Multi-Turn Coding Agents, CC BY 4.0.

Cite this

Permanent ID: iil:note:b2x8dp5b

iinventedlight. 2026. "MCP for agents." iinventedlight Library, iil:note:b2x8dp5b, version of 2026-11-03. https://iinventedlight.com/library/notes/ao-mcp/. License: CC-BY-4.0.

@misc{iil_note_b2x8dp5b,
  author = {{iinventedlight}},
  title = {{MCP for agents}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-03},
  url = {https://iinventedlight.com/library/notes/ao-mcp/},
  note = {Permanent ID iil:note:b2x8dp5b. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/ao-mcp.md.