What Is MCP (Model Context Protocol)? A Developer's Guide
November 30, 2026 · 11 min read

Every useful AI agent needs to reach real systems: your database, your ticketing tool, your file storage, your internal APIs. Until recently, each AI application needed its own custom connector for each of those systems, which made integrations slow to build and painful to maintain. The Model Context Protocol fixed that by giving AI applications and tools one shared language.
This developer's guide explains the Model Context Protocol (MCP) from the ground up. You will learn what problem it solves, how its architecture works, the difference between tools, resources and prompts, what changed in the major 2026-07-28 revision, how MCP compares with APIs and A2A, and the security issues every developer should understand before connecting an agent to production data.
What Is the Model Context Protocol?
The Model Context Protocol is an open standard that defines how AI applications connect to external tools and data. Anthropic introduced MCP in November 2024, and it quickly became the most widely adopted way to plug tools into AI assistants and agents. People often describe it as "USB-C for AI": instead of a different cable for every device, you build one MCP server for your system and any MCP-compatible AI application can use it.
In December 2025, MCP was donated to the Agentic AI Foundation, a new fund under the Linux Foundation that also hosts AGENTS.md and the goose agent framework. That move put MCP under neutral governance, which matters to companies that do not want their integrations to depend on a single vendor.
Adoption is huge. According to the MCP project's 2026-07-28 release post, its Tier 1 SDKs see close to half a billion downloads a month, and the TypeScript and Python SDKs have each passed one billion total downloads.
Why MCP Exists: The Integration Problem
Imagine five AI applications (a chat assistant, a coding agent, an IDE, a support bot and an internal agent) that each need access to ten business systems. Without a standard, that is up to fifty separate integrations, each with its own authentication, data format and failure modes. Every new AI tool multiplies the work.
MCP turns this many-to-many problem into a many-to-one problem. Each system exposes its capabilities once through an MCP server, and each AI application implements an MCP client once. Any client can then talk to any server. That is why MCP spread so quickly: it saves work on both sides.
How MCP Works: Hosts, Clients and Servers
MCP has three roles:
- Host: the AI application the user interacts with, such as Claude, an IDE or your own agent.
- Client: the component inside the host that manages a connection to one MCP server.
- Server: a program that exposes tools, resources and prompts for one system, such as GitHub, a PostgreSQL database or your helpdesk.
Messages use JSON-RPC 2.0, a simple request-and-response format. MCP defines two standard transports. stdio runs the server as a local process and exchanges messages over standard input and output, which is ideal for tools on a developer's machine. Streamable HTTP runs the server as a web service, which suits remote and shared servers.
The Building Blocks: Tools, Resources and Prompts
An MCP server can expose three kinds of capability, and each has a different owner:
| Primitive | Controlled by | What it is | Example |
|---|---|---|---|
| Tools | The model | Functions the AI can call to take actions or fetch live data | create_ticket, search_orders, run_query |
| Resources | The application | Read-only data the host can add to the model's context | A policy document, a file, a database schema |
| Prompts | The user | Reusable templates or workflows the user can pick | "Summarise this incident", "Review this pull request" |
Tools get most of the attention because they let agents act. Each tool has a name, a description and an input schema. The description is effectively a prompt: the model reads it to decide when and how to call the tool, so clear wording matters as much as clean code.
What Changed in MCP 2026-07-28
The 2026-07-28 specification is the biggest revision since MCP launched. The headline change is a stateless core. Earlier versions opened a session with an initialisation handshake and tracked it with a session header, which made MCP servers awkward to run behind load balancers and on serverless platforms. As WorkOS explains, sessions and the initialisation handshake are gone, and every request now carries its own protocol version and client details.
Other important changes in the 2026-07-28 specification include:
- Routing headers: Streamable HTTP requests must include Mcp-Method and Mcp-Name headers, so gateways can route and filter calls without reading the body.
- Result types: every result carries a resultType field, either "complete" or "input_required".
- Multi round-trip requests: when a server needs more input, such as a user confirmation, it returns an input_required result and the client retries with the answer, replacing requests that needed long-lived connections.
- Cacheable lists: tool, prompt and resource lists can include caching hints, which cuts repeated discovery calls.
- Extensions: long-running tasks, MCP Apps and Enterprise-Managed Authorization are now official extensions rather than part of the core.
- Deprecations: Roots, Sampling and Logging are deprecated but keep working for at least twelve months, and the legacy HTTP+SSE transport is deprecated.
Here is what a tool call looks like on the wire under the new specification. Notice that the version and client details travel with the request itself:
POST /mcp HTTP/1.1
Host: tickets.example.com
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: list_tickets
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_tickets",
"arguments": { "status": "open" },
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientInfo": { "name": "support-agent", "version": "1.0.0" },
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}
And a successful response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"resultType": "complete",
"content": [
{ "type": "text", "text": "2 open tickets: T-101 (high priority), T-102 (low priority)" }
]
}
}
Most developers never write these messages by hand, because the official SDKs handle them. The release post confirms that the TypeScript, Python, Go and C# SDKs support 2026-07-28, with Rust in beta. Expect some migration work if your server relied on session IDs.
MCP vs APIs vs Function Calling vs A2A
MCP does not replace your APIs. It sits on top of them and makes them easy for AI to use. Here is how it compares with related ideas:
| Approach | What it connects | Key point |
|---|---|---|
| REST or GraphQL API | Software to software | Designed for developers who read documentation and write code |
| Function calling | One model to functions in one app | Vendor-specific format; tools live inside a single application |
| MCP | Any AI application to any tool or data source | Open standard; build a server once and reuse it across hosts |
| A2A (Agent2Agent) | Agents to other agents | Lets independent agents discover each other and delegate work |
MCP and A2A are complementary. MCP connects an agent to its tools, while A2A connects agents to each other. The Linux Foundation reported in April 2026 that A2A had passed 150 supporting organisations and reached a stable 1.0 specification. Our guide to multi-agent systems explains when you need agents talking to agents.
MCP also does not replace retrieval-augmented generation. A RAG pipeline can be exposed through MCP as a search tool or a set of resources. If you are building search over your own documents, our guide on how to build a RAG app covers the retrieval side.
Where MCP Is Used Today
MCP clients are built into most major AI tools, including Anthropic's Claude apps and Claude Code, OpenAI's developer tools, GitHub Copilot in VS Code and Cursor. On the server side, thousands of organisations publish MCP servers for their products, from developer tools to CRMs and cloud platforms.
To make servers easier to find, the project launched the official MCP Registry in preview in September 2025. An API Tracker snapshot from 17 October 2026 counted 44,805 registry records, although that figure counts listings rather than unique, maintained products. As with npm packages, quality varies, so review a server before you trust it.
Common MCP use cases include:
- Letting coding agents read issues, query databases and check deployment status.
- Giving support agents safe access to order, billing and ticketing systems.
- Connecting internal knowledge bases so assistants answer from approved documents.
- Exposing analytics so business users can ask questions in plain language.
MCP Security: What Developers Must Know
MCP makes it easy to give an AI model powerful access, and that cuts both ways. The biggest risk is prompt injection through tool results. In May 2025, Invariant Labs showed how a malicious issue in a public GitHub repository could hijack an agent connected to the GitHub MCP server and make it leak data from the user's private repositories. The server code had no bug. The problem was an agent with broad access reading untrusted text.
Follow these rules for every MCP deployment:
- Grant least privilege. Give each server the narrowest token it needs, ideally read-only.
- Require approval for writes. Payments, deletions, messages and code merges should need human confirmation.
- Treat tool output as untrusted data. Web pages, emails and issues can contain instructions aimed at your agent.
- Vet third-party servers. Check the publisher, pin versions and review updates, just as you would with any dependency.
- Use proper authorisation for remote servers. The 2026-07-28 revision tightens how MCP uses OAuth, as the Agentic AI Foundation explains, and the Enterprise-Managed Authorization extension lets companies control server access through their identity provider.
Our guides to AI agent security, AI agent identity and permissions and API security best practices cover these controls in depth.
How to Get Started With MCP
The fastest way to learn MCP is to use it, then build with it:
- Connect an existing server. Add a well-known server, such as a documentation or GitHub server, to an MCP client you already use and watch how the model calls its tools.
- Read the specification overview. The official MCP documentation explains the concepts with diagrams.
- Build a small server. Wrap one internal API with two or three tools. Our step-by-step tutorial shows you how to build an MCP server in TypeScript or Python in under an hour.
- Test with the MCP Inspector. The Inspector lets you call tools directly and see raw messages before any model is involved.
- Design the context carefully. Too many tools or oversized results crowd the model's working memory. Our guide to context engineering explains how to keep tool output lean.
If you are new to agents in general, start with our plain-English guide to agentic AI.
Frequently Asked Questions
Is MCP only for Claude?
No. Anthropic created MCP, but it is an open standard now governed under the Linux Foundation. Many AI applications from different vendors support it, and any developer can build MCP clients or servers.
Is the Model Context Protocol free to use?
Yes. The specification and official SDKs are open source and free. You only pay for whatever infrastructure, AI models or third-party services your own setup uses.
What is the difference between MCP and an API?
An API is built for developers to call from code. MCP is a standard layer that describes tools and data in a way AI applications can discover and use automatically. Most MCP servers call existing APIs behind the scenes.
What is an MCP server?
An MCP server is a program that exposes tools, resources and prompts for a particular system using the MCP standard. It can run locally over stdio or remotely over Streamable HTTP.
Does MCP replace RAG?
No. Retrieval-augmented generation is a technique for finding relevant information, while MCP is a way to connect AI to tools and data. You can expose a RAG search through an MCP server.
Is MCP secure?
The protocol supports strong authorisation, but security depends on how you deploy it. Least-privilege tokens, human approval for risky actions, vetted servers and defences against prompt injection are essential.
Build on the Standard
The Model Context Protocol has become the default way to connect AI agents to the real world, and the 2026-07-28 revision makes it ready for enterprise scale. Learning it now will save you from building one-off integrations for every new AI tool. If you want help designing MCP servers for your systems or connecting agents securely to your data, get in touch with our team.