MCP: connect your assistant to your tools and measure what they take up

Step-by-step guide to understand what MCP is, connect a server to Claude Code and Codex, use it, and measure how many tokens its tools take up in every call.

PublishedNovember 21, 2026
FreeDownload as PDF

Free resources

Create a free account to download

PDF guides and the other free resources are available with an account. It's free, and all you need is your email.

A skill tells your assistant how to do something. MCP gives it access: to your files, your calendar, your task manager. This guide explains what it is, connects a test server, and measures something that is rarely discussed: what the tools take up in every call to the model.

The steps and figures were verified on macOS with Claude Code 2.1.302 and Codex 0.157.0 (November 2026).

What you will achieve

Know what an MCP server is, connect one, check that your assistant uses it, and measure how much room its tools take up, so you can decide how many to keep connected.

What you need

  • Claude Code or Codex installed and signed in. A free ChatGPT account is enough for Codex.
  • Node.js, to start the test server with npx.
  • A folder with a text file. Here, notes with a file notes.txt.

Step 1. What MCP is

MCP (Model Context Protocol) is an open standard for connecting an AI assistant to external systems. It has three parts:

  • The MCP server: a small program that offers tools. A file server offers "read file" or "list folder"; a calendar server, "create event".
  • The client: your assistant (Claude, ChatGPT, Claude Code, Codex). It connects to the server and asks which tools it has.
  • The definition of each tool: its name, a description and the list of data it needs. It is what the model reads to know the tool exists and how to call it.
Diagram: the model, the client and the MCP server with its tools; below, the read_text_file definition with name, description and data
The three pieces. Each tool's definition travels to the model.

Keep the third part in mind: the cost we measure in step 5 comes from it.

Step 2. The connectors you already have

In the apps, MCP servers are called connectors.

  • Claude (app): Settings > Plugins, "Connectors" filter. To add your own: Plugins, in the sidebar > "Add" > "Add custom connector".
  • ChatGPT (desktop app): according to its documentation, in Settings > MCP servers. That configuration is the same one Codex uses.
Claude's Add menu with the Add custom connector option
Claude: “Add” > “Add custom connector”.
Outline of the steps in ChatGPT: Settings, MCP servers, Add server, server details, save and restart
ChatGPT: the steps according to its documentation. An outline, not a screenshot.

Every connector you turn on adds its tools to the list your assistant has available.

Step 3. Connect a test server

We use the official file server of the MCP project, which needs no account and no keys: it only sees the folder you point it to.

In Claude Code. Create a file mcp.json:

json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/alex/notes"]
    }
  }
}

And start Claude Code with it:

bash
claude --mcp-config mcp.json

In Codex. Add to ~/.codex/config.toml:

toml
[mcp_servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/Users/alex/notes"]

Check that it is active:

bash
codex mcp list

The filesystem row must show the status enabled.

Terminal with the output of codex mcp list: the filesystem row with status enabled
Codex: `codex mcp list` with the test server.

Step 4. Use a tool

Ask for the task. You don't need to name the tool, although here we do, to see it being used:

Use the filesystem tools to read notes.txt and reply with its first line only.

Both answered with the first line of the file. Codex also shows which tool it calls:

mcp: filesystem/list_allowed_directories started
mcp: filesystem/read_text_file started
monday sync - alex, sam, kim

The model did not read the file: it asked the server to read it and received the result.

Terminal: Codex calls filesystem/read_text_file, answers monday sync - alex, sam, kim and uses 25,525 tokens
Codex: the full run. Here the prompt also forbids the terminal, so it can only use the server.

Step 5. What nobody tells you: every tool takes up room

For the model to use a tool, it has to have read its definition. And the model remembers nothing between one call and the next: what it needs to know travels in every call.

We measured it with four test servers connected at once (files, memory, testing and browser): 72 tools, 19,400 tokens in definitions alone. A token is a piece of a word.

We sent the shortest possible message, "Reply with the single word OK.", and looked at how many input tokens it cost in Claude Code:

  • No MCP servers: 23,400 tokens.
  • The four servers with every definition loaded: 60,200 tokens.
  • The four servers with deferred loading, which is the default: 25,800 tokens.
Bar chart: 23,400 tokens without servers, 60,200 with everything loaded and 25,800 with deferred loading
The same answer, “OK”, in the three situations.

In other words: with everything loaded, every message, even an "OK", carries more than twice the tokens. Anthropic describes it the same way in its article "Code execution with MCP": most clients load every definition upfront, and in its "Advanced tool use" example about fifty tools take up about 72,000 tokens.

Two caveats, so we don't overstate it:

  • Current clients already avoid it. Claude Code defers the definitions and searches for them when needed; in Codex, the same message used 15,137 tokens with zero, one and four servers. The problem appears if you turn that feature off, in older versions and in other clients.
  • Money is not the main issue. In a real task, reading a file, 181,100 tokens were processed with everything loaded and 105,900 with deferred loading, but the cost was almost the same ($0.076 and $0.077), because what repeats comes from a cheaper cache. What you lose is working room: what the tools take up, your conversation cannot use.

Step 6. Measure it yourself

In Claude Code, type:

/context

Look for two lines. With everything loaded:

| System tools | 14.6k | 1.5% |
| MCP tools    | 19.4k | 1.9% |

With deferred loading:

| MCP tools (deferred) | 19.4k | 1.9% |

"Deferred" means the tools are available, but their definitions do not travel until they are needed.

Two terminals with the /context table: left, everything loaded, 47.7k tokens; right, deferred loading, 13.7k
Claude Code: `/context` with everything loaded (left) and with deferred loading (right).

In Codex, every run ends with the line tokens used and its figure. Compare it with and without your servers.

Step 7. Keep it under control

  • Leave tool search on. In Claude Code it is on by default. The variable ENABLE_TOOL_SEARCH=false turns it off: it is what we used to measure the worst case.
  • Disconnect what you don't use. A server connected "just in case" takes up room even if you never call it. In Codex, enabled = false turns it off without deleting it.
  • Limit the tools of a server. In Codex, according to its documentation, enabled_tools lets through only the ones you list and disabled_tools excludes the ones you don't want.
  • Measure again after each change with step 6.

Good practices

  • Connect by task, not by collection. Three servers you use are worth more than twenty you don't.
  • Read what a server can do before connecting it. Its tools act with your permissions.
  • Give access to a folder, not to the whole disk.
  • Measure before you form an opinion. The figure from your own machine is worth more than any general number, including the ones in this guide.

Common problems

  • The server does not show up: check that npx works in your terminal and that the folder path exists.
  • The assistant does not use the tool: name it in the message or say "use the filesystem tools".
  • The conversation runs out of room very soon: look at /context; if the tools take up a lot, apply step 7.
  • Codex does not see a server you just added: check the [mcp_servers.name] table and run codex mcp list.

What this guide leaves out

Definitions are not the only thing that takes up room: the result of every tool also passes through the model. If a tool returns a fifty-page document, those fifty pages enter the conversation. The solution proposed by Anthropic and Cloudflare is for the model to write code that calls the tools and keeps only what it needs. That is Code Mode: the next guide.