Contents
- 1. What MCP is: one shared contract between AI and tools
- 2. What happened in the two years since launch
- 3. How it works: host, client, server, and two transports
- 4. What changed in the current spec, 2026-07-28
- 5. How to register servers in the main apps, and where the config lives
- 6. Servers you can use today, and where to find more
- 7. Try it in 10 minutes: let Claude Code read a folder
- 8. Build your own MCP server: a minimal example
- 9. Security: the key points of the official Security Best Practices
- 10. MCP vs. API vs. Skills vs. A2A
- 11. Don't install or build too much
- Summary
- FAQ
MCP (Model Context Protocol) is an open specification that lets AI apps (Claude Code, ChatGPT, VS Code and others) use external tools and data (GitHub, databases, internal systems and so on) in one standard way. Build a tool once as an "MCP server," and every app that supports MCP can use it. Because it works like a single cable that fits any device, it is often called "the USB-C of AI."
Anthropic released it on November 25, 2024, and in December 2025 donated it to the Agentic AI Foundation (AAIF) under the Linux Foundation. The current version of the spec is 2026-07-28, and with it MCP became stateless: there is no longer a per-connection "session." This article covers how MCP works, what changed in the current spec, how to register servers in the main apps, a 10-minute hands-on, and the official security rules, based on the MCP specification and each vendor's official documentation (checked on November 12, 2026).
Host (the AI app)
Claude Code, ChatGPT, VS Code…
Its clients connect to one server each and receive the list of tools
MCP server
GitHub, Notion, your own
Exposes three kinds of things: Tools, Resources, Prompts
Tools and data
APIs, databases, files
What the server actually reads and writes
Inside your own machine the transport is stdio; over the network it is Streamable HTTP. The AI decides which tool to use and when, and the host gets the user's approval before calling it.
1. What MCP is: one shared contract between AI and tools
Before MCP, every AI app connected to tools in its own way. To use a "post to Slack" tool from three apps, you built it three times. MCP turned that connection layer into a single specification. With M apps and N tools, what used to be M×N integrations becomes M+N implementations. The spec itself says it takes inspiration from the Language Server Protocol (LSP), which standardized language support across editors.
The three things a server can expose
| Feature | What it is | Examples |
|---|---|---|
| Tools | Functions the AI calls | Create an issue, return stock levels, query a database |
| Resources | Documents and data for the user or the AI to read | File contents, table schemas, internal documents |
| Prompts | Instruction templates the user picks and runs | A "review this PR" procedure |
In the other direction, the client (the app side) can offer servers Elicitation, which lets a server ask the user for additional information. Roots (telling a server which folders it may work in) and Sampling (letting a server ask the app's model to generate text), which existed in earlier versions, are deprecated in the current version (section 4).
2. What happened in the two years since launch
MCP spec versions are named after "the last date backwards-incompatible changes were made." Here are the main events alongside those versions.
- November 25, 2024Anthropic published the spec and SDKs. The first version was 2024-11-05.
- March 26, 2025Version 2025-03-26 added Streamable HTTP for remote servers and OAuth-based authorization, and deprecated the older HTTP+SSE transport. The same day (US time), OpenAI's Sam Altman said OpenAI would support MCP across its products (TechCrunch report).
- June 18, 2025Version 2025-06-18 added structured (typed) tool output and Elicitation.
- November 25, 2025Version 2025-11-25 added Tasks for long-running work (experimental) and Client ID Metadata Documents, which let a client identify itself by a URL.
- December 9, 2025Anthropic donated MCP to the AAIF, co-founded by Anthropic, Block and OpenAI and supported by Google, Microsoft, AWS, Cloudflare and Bloomberg. The announcement that day cited more than 10,000 active public MCP servers and 97M+ monthly SDK downloads across Python and TypeScript, and named ChatGPT, Cursor, Gemini, Microsoft Copilot and VS Code as adopters.
- July 28, 2026The current version, 2026-07-28, removed the handshake (initialize) and sessions and made MCP stateless (section 4).
MCP spread because the spec is a thin layer on top of JSON-RPC 2.0 and JSON Schema that is easy to implement, because it was published as an open spec early, and because the donation meant it no longer belonged to any one company. With competing vendors on the same spec, tool builders only have to build once.
3. How it works: host, client, server, and two transports
The spec has three roles. The host is the AI app the user works in, a client is the connector the host runs for each server (one per server), and the server is the side that exposes tools and data. Messages use JSON-RPC 2.0: the client receives the list of tools (tools/list), calls the tool the AI chose with arguments (tools/call), and gets the result back.
| Transport | Where it runs | Good for | Authentication |
|---|---|---|---|
| stdio | Your own machine (the app starts the server as a process and talks over standard input and output) | Files, local Git, a local database | The spec's authorization flow is not used; credentials are passed through environment variables and the like |
| Streamable HTTP | The service's side (you connect by URL) | Services such as GitHub and Notion, servers shared inside a company | The spec's Authorization, based on OAuth 2.1 |
| HTTP+SSE | The older remote transport | Not for new use | Deprecated (move to Streamable HTTP) |
4. What changed in the current spec, 2026-07-28
According to the spec's versioning page, the current version is 2026-07-28. Compared with the previous version, 2025-11-25, the way connections work changed significantly. The main differences, per the changelog:
| Item | Up to 2025-11-25 | 2026-07-28 |
|---|---|---|
| Starting a connection | An initialize handshake settles the version and capabilities | No handshake; every request carries the version and capabilities in _meta, and the server reports supported versions via server/discover |
| Sessions | Streamable HTTP uses Mcp-Session-Id | No protocol-level sessions; state that spans calls is passed as a server-minted ID in tool arguments |
| Change notifications | An HTTP GET stream, resources/subscribe | Consolidated into a single subscriptions/listen stream |
| Requests from the server | The server sends requests (sampling/createMessage, elicitation/create and so on) | The server returns an "input required" result (input_required) and the client retries the same request with the answers (Multi Round-Trip Requests) |
| Broken streams | Redelivery via SSE event IDs | No resumption; the client re-sends the request with a new ID |
| Long-running work (Tasks) | An experimental core feature | Moved to an official extension (io.modelcontextprotocol/tasks) |
| Deprecated | HTTP+SSE | Roots, Sampling, Logging, HTTP+SSE, and OAuth Dynamic Client Registration (in favor of Client ID Metadata Documents) |
Under the spec's feature lifecycle policy, deprecated features stay for at least twelve months before they can be removed (or as little as 90 days when there is an active security risk, such as a published vulnerability or in-the-wild exploitation that can't be mitigated in place). The spec also describes a backward-compatible way to talk to peers that still use the pre-2026 handshake (2025-11-25 and earlier).
What it means for users and builders
- Users
If your app supports it, there is nothing to do
Claude Code supports 2026-07-28 through its "v2 runtime," built on MCP TypeScript SDK 2.0. It asks each server whether it supports the newer version and uses it if so; otherwise it connects with the older handshake. The v2 runtime is the default from v2.1.232 in sessions that fetch feature flags, and from v2.1.274 in sessions that don't. To stay on the older protocol, set the environment variable
MCP_PROTOCOL_NEGOTIATION=legacy(Claude Code MCP documentation). - Builders
Move to the 2.x SDKs and don't adopt deprecated features
The Python SDK is on 2.x (
mcp2.3.0 on PyPI, released October 2, 2026), and the TypeScript SDK 2.x supports 2026-07-28. In 2.x the TypeScript packages are split into@modelcontextprotocol/serverand@modelcontextprotocol/client(2.4.0 on npm), while the older@modelcontextprotocol/sdkstays on 1.x (1.32.2). In new servers, pass folders through tool arguments or configuration instead of Roots, and log to standard error or OpenTelemetry instead of Logging. For state that spans several calls, mint unguessable IDs and bind them to the user (section 9). - Extensions
Opt-in "extensions" now sit outside the core
The spec overview lists notable extensions: Tasks for long-running work, MCP Apps for interactive UI such as charts and forms inside a conversation, and Skills over MCP for delivering agent instructions through MCP (under discussion in a working group). An extension is used only when both client and server support it.
5. How to register servers in the main apps, and where the config lives
The same MCP server is registered differently, and stored in a different file, in each app. Here is what each vendor's official documentation says (checked November 12, 2026).
| App | How to register | Where the config lives | Watch out for |
|---|---|---|---|
| Claude Code | claude mcp add | ~/.claude.json for personal use, .mcp.json in the project root to share with a team | Check connection status with /mcp |
| Claude Desktop | Edit the config file | claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\, Linux: ~/.config/Claude/) | Restart the app after editing (official guide) |
| Codex (CLI) | codex mcp add | The [mcp_servers.name] table in ~/.codex/config.toml (trusted projects can also use .codex/config.toml) | For OAuth servers, run codex mcp login name |
| Gemini CLI | gemini mcp add | mcpServers in settings.json (.gemini/ or ~/.gemini/) | trust: true skips every call confirmation, so use it only for servers you control (the official page notes at the top that for unpaid-tier and Google One users, Gemini CLI was replaced by Antigravity CLI on June 18, 2026) |
| VS Code | "MCP: Add Server" in the Command Palette | Follow the guided flow and choose workspace or global | The docs warn that local servers run code on your machine |
| ChatGPT | "Add custom MCP server" under Plugins (no need to turn on developer mode first) | Set up in the workspace UI (a public HTTPS endpoint or a Secure MCP Tunnel) | Business, Enterprise and Edu on the web only (in Business only admins and owners can connect; in Enterprise and Edu, members granted permission can too; only admins and owners publish to the workspace) (OpenAI Help) |
Sources: the MCP documentation for Claude Code, Codex, Gemini CLI and VS Code. Connectors (remote MCP servers) you add in claude.ai also show up in Claude Code's /mcp, but they are not loaded when you are signed in with an API key (what to do when connectors are disabled).
6. Servers you can use today, and where to find more
| Server | What it does | Typical use |
|---|---|---|
| filesystem (reference server) | Reads and writes files only inside folders you allow | Let the AI read documents or code |
| fetch (reference server) | Fetches a web page and converts it into an AI-friendly form | Hand it a URL and get a summary |
| git (reference server) | Reads history from and operates on a local Git repository | Have it explain diffs from the history |
| GitHub (remote server run by GitHub) | Issues, PRs and repository operations | Review PRs, turn bugs you find into issues |
| Notion (remote server run by Notion) | Works with your Notion workspace | Find and summarize internal documents |
To find servers, start from the MCP Registry, the list of public servers, and the Anthropic Directory of connectors Anthropic has reviewed. The official repository now keeps seven reference servers (Everything, Fetch, Filesystem, Git, Memory, Sequential Thinking, Time); its README describes them as educational examples for developers building their own servers and asks you to evaluate your own security requirements. The GitHub, PostgreSQL, Slack and other servers that used to live there moved to servers-archived (GitHub's now lives with GitHub itself, and Slack's is maintained by Zencoder). Don't follow old tutorials as-is.
7. Try it in 10 minutes: let Claude Code read a folder
Using the official filesystem server, you let Claude Code read only one folder you choose. This assumes Node.js (npx) is installed.
- Create a test folder. Make an empty folder with nothing important in it (for example
~/mcp-test) and put one shortREADME.mdin it. The server can touch only this folder. - Register the server. On macOS and Linux, run the following. Everything after
--is passed as the server's start command.
On native Windows (not WSL) you can register it the same way, writing the folder asclaude mcp add --transport stdio files -- npx -y @modelcontextprotocol/server-filesystem ~/mcp-testC:\mcp-test. Ifnpxfails to start, wrap it incmd /c, as the reference server's README shows for Windows.
Adjust the folder path to your own environment.claude mcp add --transport stdio files -- cmd /c npx -y @modelcontextprotocol/server-filesystem C:\mcp-test - Check the connection. Start Claude Code, open
/mcp, and check thatfilesshowsconnected. If it showsfailed, see how to fix MCP server connection errors. - Use it. Ask "Summarize the README in mcp-test." Claude Code asks for permission before using the tool; look at the tool name and arguments before you allow it.
- Clean up. When you're done, remove it with
claude mcp remove files.
Remote servers are registered by URL (for example claude mcp add --transport http notion https://mcp.notion.com/mcp); after registering, finish authentication from /mcp. There are three scopes: the default local is just you in that project, --scope project writes to .mcp.json in the project root to share with your team, and --scope user makes it available in all your projects. Keep servers whose credentials you don't want in version control in local.
8. Build your own MCP server: a minimal example
Using servers is useful on its own, but MCP really pays off when you open your own in-house tools to AI. With the Python SDK (2.x), a dozen or so lines are enough. The example is a server that "returns current stock levels."
Install the SDK with uv add "mcp[cli]" (or pip install "mcp[cli]"). The [cli] extra adds the mcp dev and mcp run commands used below.
from mcp.server import MCPServer
mcp = MCPServer("inventory-server")
@mcp.tool()
def get_stock(sku: str) -> int:
"""Return the current stock level for a SKU"""
# Query your internal inventory DB here
return query_internal_db(sku)
if __name__ == "__main__":
mcp.run(transport="stdio")
- Test
uv run mcp dev server.py, from the SDK README, opens the official testing UI (MCP Inspector) so you can check the tool list and call results without an AI in the loop. - Register
In Claude Code:
claude mcp add --transport stdio inventory -- python server.py. The function's docstring becomes the tool description the AI sees, so say concretely what it returns. - Share
To share it inside your company,
uv run mcp run server.py --transport streamable-httpturns it into an HTTP server. In that case, follow the authorization and token rules in section 9.
The official SDKs are TypeScript, Python, C#, Go, Rust and Ruby (Tier 1), Java (Tier 2), and Swift, PHP and Kotlin (Tier 3). Tiers reflect feature completeness and maintenance commitment, and each SDK adopts new spec versions on its own schedule.
9. Security: the key points of the official Security Best Practices
The spec treats tools as "arbitrary code execution" and states that hosts must obtain explicit user consent before invoking any tool. Tool descriptions and annotations are to be treated as untrusted unless they come from a trusted server. On top of that, the official Security Best Practices list attacks specific to MCP and their mitigations.
| Attack | What happens | What the spec requires | Who it concerns |
|---|---|---|---|
| Local MCP server compromise | A start command slipped into a config runs arbitrary commands, such as sending your SSH keys elsewhere | Clients with one-click setup must show the exact command without truncation and get approval (MUST), and should run servers sandboxed with minimal privileges (SHOULD) | Users, app builders |
| Token passthrough | A server accepts a token issued for another service and forwards it to a downstream API | Do not accept tokens that were not issued for the MCP server (MUST NOT) | Server builders |
| Confused deputy | A proxy server for a third-party API skips the consent screen and an authorization code gets stolen | Get per-client consent before the third-party authorization (MUST), and match redirect_uri exactly | Builders of proxy servers |
| SSRF | A malicious server puts internal addresses (for example 169.254.169.254) in OAuth URLs and makes the client fetch them | Require HTTPS and block requests to private IP ranges (SHOULD) | Client builders |
| State handle hijacking | Someone guesses a server-minted ID, such as a shopping-cart ID, and manipulates another user's state | Don't treat holding an ID as authentication (MUST NOT), and generate unguessable random IDs bound to the user (SHOULD) | Server builders |
| Overly broad scopes | One stolen token unlocks unrelated tools and data | Start with minimal, mostly read-only scopes and elevate step by step when needed | Server builders |
Five things users should check before installing a server
| What to check | Where to look / examples |
|---|---|
| ① Who runs it | A server run by the service itself (for example GitHub's https://api.githubcopilot.com/mcp/ or Notion's https://mcp.notion.com/mcp), a reference server, or a third party (search the MCP Registry and the Anthropic Directory) |
| ② Did you read the full start command | npx -y and uvx fetch and run a package as soon as you register it, so check that it isn't a look-alike package and that no extra commands follow |
| ③ Is it still maintained | The GitHub, PostgreSQL and Slack servers in the official repository have moved to servers-archived |
| ④ How much access you grant | Issue narrowly scoped tokens (Claude Code's documentation also shows a GitHub example using a fine-grained token limited to the target repositories) |
| ⑤ Does it pull in outside content | Servers that fetch web pages or email are an entry point for prompt injection (Claude Code's documentation also warns you to verify that you trust a server before connecting it) |
If a string returned by a server says "ignore your previous instructions and…," the AI can be hijacked. Treat server output as data, and have a person confirm irreversible actions such as sending, deleting or paying every time. We cover the thinking behind this in precautions for what you feed into AI prompts. If you build agents yourself, the design side (how to give tools, minimizing permissions, separating dangerous operations) is covered step by step in the MCP and tool connections chapter of our AI agent development course.
10. MCP vs. API vs. Skills vs. A2A
| What you want | Best fit | Why |
|---|---|---|
| Give the AI external data or actions and let it decide when to use them | An MCP server | The AI receives the tool list and calls tools itself when needed |
| Reuse one connection from several apps such as Claude Code, Codex and VS Code | An MCP server | Build it once and any MCP-capable app can use it |
| Call a fixed process from your own program in the same order every time | A plain API call | If the AI never has to choose, there's no reason to put MCP in between |
| Make the AI follow procedures or writing rules (no external connection needed) | Skills | What you need is a playbook, not a connection |
| Hand work to an AI agent built by another team or company | A2A | The other side is an agent, not a tool (if MCP is the "vertical" link to tools, A2A is the "horizontal" link between agents) |
These four aren't mutually exclusive. For example: fetch fresh data through MCP, shape it with a Skill's procedure, and hand it to another department's agent via A2A. MCP servers can also be bundled into Claude Code plugins and distributed to your team together with skills and hooks.
11. Don't install or build too much
- Context
Tool results consume context
Claude Code uses tool search by default: at session start it loads only tool names and server instructions, and loads definitions when they are needed. Tool results still use context, though: Claude Code warns when one output exceeds 10,000 tokens and caps it at 25,000 tokens by default (adjustable with
MAX_MCP_OUTPUT_TOKENS). - Design
Don't turn everything into MCP
The more tools one request calls, the more time and money it costs. If the AI doesn't need to choose, an ordinary program or API call is faster and more reliable.
- Spec
Build expecting the spec to change
Some versions, like 2026-07-28, change how connections work. Deprecated features normally stay for at least twelve months (as little as 90 days for an active security risk), but review your own servers as the SDKs update.
- Revenue
Can your server make money?
MCP itself has no billing mechanism. We compare sales channels and fees in can MCP servers be monetized.
Summary
- MCP is an open specification that connects AI apps to external tools and data. Anthropic released it in November 2024 and donated it to the AAIF under the Linux Foundation in December 2025.
- The roles are host, client and server. Servers expose Tools, Resources and Prompts, over stdio or Streamable HTTP.
- The current version is 2026-07-28. It removed the handshake and sessions to become stateless, and deprecated Roots, Sampling and Logging.
- Claude Code, Codex and Gemini CLI register servers with an
mcp addcommand, Claude Desktop with a config file, and VS Code from the Command Palette. - Start by trying the filesystem reference server on an empty folder and confirm the connection with
/mcp. - A custom server takes a dozen or so lines with the Python SDK. Test it in MCP Inspector before registering it.
- The official Security Best Practices call for showing the full start command and getting approval, rejecting tokens not issued for the server, unguessable IDs, and minimal scopes.
FAQ
Q1. Do I need special training to use MCP?
Not to use it. In Claude Code it's one claude mcp add line, and in Claude Desktop a few lines in a config file. Even building your own, the SDK takes care of the JSON-RPC details, so you can start by writing a function and adding a decorator.
Q2. Can I use MCP in ChatGPT?
Yes. According to OpenAI's help page, checked on November 12, 2026, connecting your own MCP servers to ChatGPT (full MCP support including write actions) is available on ChatGPT Business, Enterprise and Edu, on the web. You add the server's public HTTPS endpoint (or a Secure MCP Tunnel) from Plugins with "Add custom MCP server" and acknowledge the risk warning; you don't need to turn on developer mode first. In Business only admins and owners can connect servers; in Enterprise and Edu, admins can also grant that permission to selected members through role-based access control (RBAC). Only admins and owners can publish to the workspace, and connecting from mobile isn't supported. See OpenAI Help for details.
Q3. Will older servers stop working with the 2026-07-28 version?
Not right away. The spec includes a backward-compatible procedure for talking to peers that use the handshake from 2025-11-25 and earlier, and Claude Code connects to servers that don't support the newer version using the older protocol. Deprecated features also normally stay in the spec for at least twelve months (as little as 90 days only when there is an active security risk). For your own servers, check whether they rely on Roots, Sampling or Logging when you move to the 2.x SDK.
Q4. Is it safe to open an internal database to AI via MCP?
It depends on how you design permissions. If you use a read-only connection and expose only fixed queries with strictly validated arguments as tools, it's far safer than letting the AI write raw SQL. A tool that "can run any SQL" is dangerous. If you share it over HTTP, accept only tokens issued for your server, keep scopes minimal and keep logs, as described in section 9.
Q5. Are MCP and function calling (tool calling) different things?
They sit at different layers. Function calling is the format inside a model API for saying "I want to call this function with these arguments," while MCP is the communication contract between an app and external servers. An MCP-capable app passes the tool list it received from servers to the model in its tool-calling format, then sends the call the model chose to the server over MCP.