Claude Code MCP: what an MCP server is and what it costs
By Marco Kohns, Co-founder of ENLIX, lecturer in AI and growth
· 12 min read
An MCP server is the piece of software that connects Claude Code to a program it cannot operate on its own. MCP stands for Model Context Protocol, an open standard for how AI applications reach external systems (modelcontextprotocol.io). Anthropic's documentation puts it this way for Claude Code: MCP lets it use tools beyond its built-in set, such as searching an issue tracker, querying a database or driving a web browser (Claude Code docs).
Connecting one is a single command and two minutes. What the guides leave out is the second half: every server you attach costs you room in the context window before you type a word. So both halves are below. What an MCP server is, how you connect one, which storage location is the right one, and what a stack of four servers actually brings with it, counted in the session that wrote this article.
What is an MCP server in Claude Code?
It is one half of a plug. Claude Code brings its own tools: it reads files, runs commands, searches the web. Everything else, your inbox, your calendar, your database, your ad account, simply does not exist as far as the session is concerned. An MCP server makes exactly one of those reachable.
The protocol's own documentation compares MCP to a USB-C port for AI applications: a standard way to connect external systems, instead of building a bespoke integration for every combination of model and program (modelcontextprotocol.io). The specification is open, and the same servers work in other clients, from Claude through VS Code to Cursor.
In the course we explain the three building blocks as a team. The agent is the role, the skill is the playbook, and the MCP server is the key. Without a key an agent only produces text. How role and playbook differ is in our piece on Claude Code skills, and what an agent actually is sits in our take on AI agents.
A server comes in two shapes. A local server is a program Claude Code starts as a subprocess
on your machine, over the stdio transport. That is the route for anything needing local access,
such as a browser or your file system. A hosted server sits behind a URL and is reached over
HTTP. Anthropic names HTTP the recommended option for remote servers; the older SSE transport is
marked deprecated, and WebSocket can only be configured through JSON
(MCP reference).
What do you actually need an MCP server for?
For the jobs where you currently copy between two windows. The docs name that exact signal: when you keep copying data into chat from another tool, that is the moment for a server.
The difference is not that the work disappears. The difference is which steps hang on you.
The same job, once by hand and once through an MCP server
step you do yourself
Copying by hand
- you open the program in a browser
- you find the right page
- you copy the text
- you paste it into the session
- Claude works with it
- you copy the result back
- you check it was entered correctly
6 of 7 steps are yours
Through the MCP server
- you state the job once
- Claude calls the server's read tool
- the server returns the page as text
- Claude works with it
- Claude writes back through the write tool
- you check the result
2 of 6 steps are yours
Lane 2 is the flow this article used to pull its own assignment out of Notion, on 12 October 2026.
Six manual steps become two, and the two are the ones worth keeping: setting the job and checking the result. That is the point where a chat window turns into something that takes work off your desk.
The word to notice in the right-hand lane is tool. A server offers individual tools, not blanket access. Whatever is not offered as a tool, Claude cannot do through that server, and that is a property rather than a shortcoming.
How do you connect an MCP server?
With one command in the terminal, not inside a running session. You wire the server up before you start the conversation.
For a hosted server, here the Claude Code documentation server, which needs no sign-in and so makes a good first one to practise on:
claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp
For a local server, here the Playwright server, which hands Claude a browser:
claude mcp add playwright -- npx -y @playwright/mcp@latest
Three things in those two lines are easy to skim past, and each one is a place where people get stuck:
- The name is yours to pick.
claude-code-docscould just as well bedocs. Claude Code uses it to label the server's tools in its output, and to address the server again inclaude mcp remove. - The
--separates two worlds. In front of it sit Claude Code's own options, such as--transport,--envor--scope. Everything after it is the command that starts the server, passed through untouched. Leave the--out and you get an entry that never starts. - The local example omits
--transporton purpose.stdiois the default.
Then you check that the connection stands:
claude mcp list
The list shows a status per server, and the status names are the fastest route to a cause.
✔ Connected means ready, ! Needs authentication means reachable but not signed in,
✘ Failed to connect means no answer. On a local server the first check can still fail while
npx downloads the package. Wait a moment, run it again.
Inside a running session, /mcp does the same work: check status, sign in, reconnect a server or
switch one off. Hosted services such as Sentry, Linear and Notion run their servers behind OAuth,
and the sign-in goes through /mcp and your browser. Servers that take a static token instead
accept it at add time through --header "Authorization: Bearer <token>".
Where does Claude Code keep the configuration, and which scope is right?
In two files across three scopes. Which one you pick decides who sees the server later, and that is the single decision nobody thinks about on their first server and then rebuilds twice.
| Scope | File | Available to |
|---|---|---|
local (default) | ~/.claude.json, under this project's entry | only you, only this project |
project | .mcp.json at the project root | anyone who clones the project |
user | ~/.claude.json, under the mcpServers key | only you, all projects |
The default is local, and that produces the most common misreading: a server you added in one
project is missing in the next, and /mcp there reports that none is configured. That is not a
fault, that is the scope. For anything you need everywhere, use --scope user.
--scope project writes to .mcp.json at the project root, and that file gets committed.
Everyone who clones the repository then gets the same servers, but has to approve them on first
start. That prompt is deliberate: a repository you clone must not start processes on your machine
without your consent.
The file route is also the only one that survives a cloud session. If you run Claude Code in the
browser or as a scheduled routine, you put .mcp.json in the repository, because there is no
terminal standing there for anyone to type claude mcp add into. Which surface suits which job is
something we took apart in our comparison of the Claude Code surfaces.
On Windows ~/.claude.json becomes %USERPROFILE%\.claude.json. And one trap the docs call out
by name: paths such as ~/.claude/mcp.json or ~/.claude/config/mcp.json are not read. Write
there and you have a correct file in the wrong place.
What does an MCP server cost you?
The server rarely anything, your context window always. The docs say it in a side note that almost every guide drops: every connected server takes up room in the context window, because its tool names and server instructions are loaded into every session. Removing the ones you no longer use keeps that room free.
This routine is a decent measuring point for that. The article you are reading is produced in a scheduled cloud session that pulls its assignment from Notion and reports its result to Slack. We counted four of the servers that were connected in that session.
Tools per MCP server, counted in this session
151 tool definitions across four servers. Counted on 12 October 2026 in the session that wrote this article.
| GitHub | 54 |
|---|---|
| Notion | 49 |
| Supabase | 28 |
| Slack | 20 |
151 tools, before a single job had been set. Each one brings a name and a description, and both sit in the context whether they are needed or not. Four servers is a lean stack. Collect twenty out of a directory and you do not have the problem slightly, you have it five times over.
That produces a rule we state at the same point in the course: your three, not a hundred off the
internet. Not as a matter of taste, but because a context window is finite and every unused
server occupies a slice of it that was meant for your files. Inside a running session you switch
servers off with /mcp without removing them. What context translates to in money is what our
Claude Code cost calculator works out.
Which MCP servers are worth it, and which are not?
The ones whose tools you need more than once a week. Everything else is a key on the ring that opens no lock.
A second point from the same run, and one you will not find in a setup guide: connected is not
the same as capable. An Ahrefs server was connected and authenticated in this session. The call
for search volume still answered Insufficient plan, because Keywords Explorer is locked on that
plan. The search volume figure behind this article therefore comes from a dated CSV file in the
repository rather than from the server. The same block has been in our notes for weeks, and it
reproduced again today.
That is why a server needs a real job after setup, not just a ✔ Connected. A status checks the
connection. It does not check your permissions, your plan, or whether the tool does what its name
promises.
A workable order to start in:
- One server with no sign-in, so you see the flow once. The documentation server in the example above is enough.
- One server for the program you copy out of most. Not the most interesting one, the most frequent one.
- Only then a local server, once a job genuinely has to reach your own machine.
What goes wrong, and what should you check first?
Two kinds of problem, and only one of them is technical.
The technical kind is in the docs with symptom and cause. A Failed to connect on a hosted server
you test with curl -I <url>: a 404 or 405 means the server is alive, because many MCP
endpoints only answer POST. A 401 or 403 means you need to sign in. No answer at all means the
URL or the network. For a local server you run the configured command yourself once in the
terminal and read what is missing. If startup takes longer than the default 30 seconds,
MCP_TIMEOUT raises the limit, in milliseconds: MCP_TIMEOUT=60000 claude. And if edits to
.mcp.json do nothing: Claude Code reads that file at session start, so quit the session and
start it again.
The other kind matters more. The docs put it as a warning: verify you trust each server before connecting it, because servers that fetch external content can expose you to prompt injection risk. Translated, that means whatever a server returns as text arrives in the same session as your own instructions. A server that pulls in other people's web pages, other people's tickets or other people's email also pulls in whatever somebody wrote there.
Three checks follow from that, before a server goes near a real project:
- Who runs it? A server from the maker of the program is a different category from a package in a directory that somebody built over a weekend.
- What is it allowed to do? Reading and writing are two separate rights. Reading is usually enough to begin with.
- Where does its content come from? Your own data is one case, other people's content is another.
And a fourth that pays for itself in daily use: register every server with the smallest reach that
works. local rather than project, read rather than write, and out again once the job is done.
A stack that only ever grows is what eventually fills your context window while your own files
compete for what is left.
Whether MCP is due at all when you are starting out is answered in how to learn Claude Code: not at the beginning.
If you would rather build this as a system than try one server after another: that exact order, role, playbook and key, is its own block in The Claude Code System.
Frequently asked
What is an MCP server in Claude Code?
A program or a hosted service that hands Claude Code tools it does not have on its own: query a database, search an issue tracker, drive a browser. MCP stands for Model Context Protocol, an open standard for how AI applications reach external systems. Claude Code is the client, the server supplies the tools.
How do I add an MCP server to Claude Code?
In the terminal, not inside a running session. For a hosted server: claude mcp add --transport http <name> <url>. For a local one: claude mcp add <name> -- <command>, for example claude mcp add playwright -- npx -y @playwright/mcp@latest. Then claude mcp list checks the connection status. Inside a session, /mcp manages the servers.
Where does Claude Code store the MCP configuration?
In two files across three scopes. The default local scope and the user scope both live in ~/.claude.json, which on Windows is %USERPROFILE%\.claude.json. The project scope lives in .mcp.json at the project root and is checked into version control. Paths like ~/.claude/mcp.json are not read at all.
Does an MCP server cost anything?
The server usually nothing, your context window always. Anthropic's own documentation says every connected server takes up space in the context window, because its tool names and server instructions are loaded into every session. We counted four servers in the session behind this article and reached 151 tool definitions before the first line was typed.
Which MCP scope should I use?
Use user for anything you need everywhere, such as a documentation server. Use project only for servers that belong to the project and that colleagues need too, because .mcp.json gets committed. The default, local, is the narrowest case: only you, only this project, which is exactly why the server is missing in the next one.
Keep reading
Claude Code CLI: Terminal, IDE, Desktop or Web?
Four surfaces, one program. Which one to use for what, decided on 224 commits from our own repository.
5 October 2026
Claude Code Skills: When a Skill, When the CLAUDE.md
A skill is a folder with a SKILL.md in it. What belongs inside, where it has to live, and what measuring our own library turned up.
25 September 2026
What Is an AI Agent, and Where Must It Stop?
An AI agent is a program with three parts: a trigger, tools, and a stop condition. Here is one that has been running on this site since September.
2 October 2026
