Model Context Protocol (MCP)
The Model Context Protocol (MCP) is an open standard for connecting AI applications to external tools and data, in which a server exposes tools, resources or prompts that any compatible client, such as a coding agent, can use.
Anthropic released it as an open-source protocol in November 2024. A server wraps a system (an issue tracker, a database, a browser) behind one interface, so that any client that speaks MCP can use it without a custom integration. Claude Code and Codex CLI both connect to MCP servers, and in both, /mcp lists what is configured.
For token usage, what matters is how a server's tools reach the model. Each tool is described by a name, a description and an input schema, and a model can only call what has been described to it in the request. When those definitions are loaded up front, every connected server adds them to every request, whether or not the task at hand ever touches it.
Agents handle this differently, and the behaviour changes over time. As of September 2026, Claude Code defers MCP tool definitions by default: only tool names and server instructions enter the context until Claude decides to use a specific tool, and its full schema is fetched then. Its documentation still describes command-line tools such as gh as more context-efficient than an MCP server, because they add no per-tool listing at all.
Results are the other half of the cost. An MCP tool's output joins the conversation like any tool result and is re-sent on every later turn. Claude Code, as of September 2026, warns when one exceeds 10,000 tokens and caps it at 25,000 by default, adjustable through MAX_MCP_OUTPUT_TOKENS. Disabling the servers a project does not use, from /mcp, removes both costs.