Software Engineeringunpacked

What is MCP? The Model Context Protocol, explained with Claude

MCP, the Model Context Protocol, is an open standard for connecting AI applications to outside systems: files, databases, APIs and workflows. An MCP server exposes tools (actions), resources (data to read) and prompts (templates); an AI app such as Claude Code connects to it once and can use all of them. The official docs compare it to a USB-C port for AI.

What is MCP?

The Model Context Protocol (MCP) "is an open-source standard for connecting AI applications to external systems", in the words of its official introduction. With it, an AI application can reach data sources (local files, databases), tools (search engines, calculators) and workflows (specialized prompts).

The docs' analogy is a USB-C port. Before USB-C, every device needed its own cable; before MCP, every AI app needed its own integration for every system. With MCP you build a server once, and any app that speaks the protocol can plug it in: Claude, ChatGPT, Visual Studio Code, Cursor and many others support it.

How the Model Context Protocol works: hosts, clients and servers

MCP has three participants:

Underneath sit two layers. The data layer is a JSON-RPC 2.0 protocol that defines discovery, the primitives and notifications. The transport layer carries those messages: stdio for a local server started as a process on the same machine, and Streamable HTTP for a remote server, with standard HTTP authentication (MCP recommends OAuth to obtain tokens).

What an MCP server exposes: tools, resources and prompts

Primitive What it is Example for a bike-rental support agent Methods
Tools Executable functions the AI app can invoke to act lookup_booking, issue_refund tools/list, tools/call
Resources Data sources that give context The list of rental locations, the refund policy, a booking schema resources/list, resources/read
Prompts Reusable templates for interactions A "summarize this damage claim" template with few-shot examples prompts/list, prompts/get

The choice between a tool and a resource matters. A tool is an action the model decides to take; a resource is content the app can put in front of the model. Exposing a catalog as a resource (the docs, the issue summaries, a database schema) saves the agent from spending tool calls just to find out what exists.

Servers can also ask the client for things: elicitation lets a server request input or a confirmation from the user mid-task.

Local and remote MCP servers

Local (stdio) Remote (Streamable HTTP)
Where it runs A process on your machine On a server, often the vendor's platform
Typically serves One client Many clients
Example A filesystem server A hosted issue tracker or error-monitoring server
Authentication The process's own environment Bearer tokens, API keys, OAuth

Using an MCP server with Claude Code

Claude Code is an MCP host. Add a remote server with one command:

bash claude mcp add --transport http notion https://mcp.notion.com/mcp

A local server takes its start command after a double dash, and anything after -- goes to the server untouched:

bash claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable -- npx -y airtable-mcp-server

Every server has a scope, which decides who sees it:

Scope Loads in Shared with the team Stored in
local (default) The current project only No ~/.claude.json
project The current project only Yes, through version control .mcp.json at the project root
user All your projects No ~/.claude.json

A shared .mcp.json should never contain secrets. Use environment variable expansion instead: ${API_KEY} reads a variable, and ${API_BASE_URL:-https://api.example.com} falls back to a default. Claude Code asks for your approval before using project-scoped servers from a .mcp.json in an interactive session.

Day to day: claude mcp list, claude mcp get <name> and claude mcp remove <name> manage servers, and /mcp inside a session shows their status and handles sign-in. Resources appear in the @ menu (@github:issue://123), and a server's prompts become commands such as /mcp__github__pr_review 456. Tool search is on by default, so tool definitions load only when Claude needs them; MCP tool output is capped at 25,000 tokens unless you raise MAX_MCP_OUTPUT_TOKENS.

MCP with the Claude API and the Agent SDK

You don't need Claude Code to use MCP. The Claude Agent SDK connects to MCP servers as one of its built-in capabilities, and the Messages API can reach remote MCP servers through the MCP connector, without writing your own MCP client. How these pieces fit together is in Claude Agent SDK vs Claude Code vs the API vs MCP.

Tool descriptions decide whether Claude uses your MCP server

Claude knows an MCP tool only through its name, description and input schema. Tools from all connected servers are discovered when the connection opens and offered together, so a vague description loses to a clear one, including Claude's own built-in tools. Write what the tool does, when to use it and when not to, what each parameter means and what it returns. The same rule drives Claude skills: the description is what gets matched.

What changed in MCP version 2026-07-28

The current protocol revision changed the foundations:

Material written before this revision describes an initialize handshake and a stateful session. That still explains older servers, but new work follows the current specification.

MCP on the Claude Certified Architect exam

MCP sits in Domain 2, Tool Design & MCP Integration, worth 18% of the Claude Certified Architect exam. Task statement 2.4 expects you to know project scope in .mcp.json for shared team tooling against user scope for personal servers, environment variable expansion for credentials, that tools from every configured server are available at once, and MCP resources as content catalogs that cut exploratory tool calls.

One difference from today: the guide contrasts two scopes, while Claude Code now has three, and the default is local. Answer the exam the guide's way; configure your own projects with the current docs.

Read more in all articles, or start from the home page.

Sources: What is MCP; MCP architecture overview; Claude Code: connect to tools via MCP; MCP connector; Claude Agent SDK overview; Claude Certified Architect Foundations exam guide v1.0, task statement 2.4.

FAQ

What is an MCP server?

A program that provides context to AI applications through the Model Context Protocol. It can expose tools Claude may call, resources Claude may read and prompt templates. It can run locally over stdio or remotely over Streamable HTTP.

Is MCP only for Claude?

No. MCP is an open protocol supported by many clients, including Claude, ChatGPT, Visual Studio Code and Cursor, so one server can serve all of them.

What is the difference between MCP tools and resources?

Tools are executable functions the model can invoke to act, such as running a query. Resources are data sources that provide context, such as a file, a schema or a list of issues, which the application can read without running an action.

Where does Claude Code store MCP servers?

Local scope (the default) and user scope are stored in ~/.claude.json; project scope is stored in a .mcp.json file at the project root, which you can commit so the whole team shares it.

Is MCP stateful?

Not since protocol version 2026-07-28. Every request carries the protocol version and capabilities in its _meta field, so a server can process each request on its own; clients can call server/discover to learn what a server supports.