MCP (Model Context Protocol) is an open standard for connecting AI applications to external tools and data. An AI app such as Claude, ChatGPT or an IDE assistant runs an MCP client. That client talks to MCP servers, and each server exposes tools the model can call, data it can read, or prompt templates a user can pick. One protocol replaces a custom integration per app and per tool.
| Quick facts | |
|---|---|
| What it is | An open protocol built on JSON-RPC 2.0 |
| Created by | Anthropic, announced November 25, 2024 |
| Hosted by | The Agentic AI Foundation, a Linux Foundation directed fund, since December 9, 2025 |
| Current spec | 2026-07-28 |
| Roles | Host, client, server |
| Server features | Tools, resources, prompts |
| Transports | stdio (local) and Streamable HTTP (remote) |
| Authorization | Optional; OAuth 2.1 for HTTP servers that use it |
| Supported by | Claude, ChatGPT, OpenAI Codex, Gemini CLI, VS Code with GitHub Copilot, Microsoft Copilot Studio, Cursor, and others |
Why MCP exists
Before MCP, connecting a model to an outside system meant writing glue code for that pair: this assistant to that database, that IDE to this ticketing tool. With M AI apps and N tools, that is up to M × N integrations, and each one breaks differently.
MCP turns that into M + N. Each AI app implements the client side once. Each tool or data source implements a server once. Any client can then use any server, as long as both support a common protocol version, the client can meet the server's authentication, and the server offers the capabilities the client needs. The project's docs compare it to a USB-C port: one connector, many devices. The value grows with every app and server that supports it, which is why adoption by OpenAI, Google and Microsoft mattered as much as the spec.
MCP is not a model, an agent framework or a hosted service. It is a contract for how an AI application asks an outside system what it can do, and then asks it to do it.
How MCP works: hosts, clients and servers
MCP has three roles:
- Host: the AI application the user works in, such as Claude Desktop, ChatGPT, VS Code or Cursor. The host decides which servers to connect to and what the model is allowed to see.
- Client: a connector inside the host. Each client talks to exactly one server, so a host connected to five servers runs five clients.
- Server: a program that exposes capabilities, such as access to a file system, a GitHub account, a CRM or a company's internal API.
All messages are JSON-RPC 2.0. The design borrows from the Language Server Protocol, which did the same M + N trick for code editors and programming languages.

What an MCP server exposes
An MCP server is a program that exposes tools, data or prompt templates to AI apps over MCP. It runs either on your machine, started by the AI app, or as a web endpoint that many users reach over HTTPS. Most servers wrap something that already exists: a file system, a Git repository, a database or a SaaS product's API.
Some real examples:
- Filesystem and Git, two of the reference servers maintained by the MCP project, give a model controlled access to local files and repositories.
- Fetch, another reference server, retrieves a web page and converts it into text a model can read.
- GitHub's MCP server lets an assistant read issues and pull requests and act on them. GitHub hosts a remote version and publishes a local one.
- Your own product's server, if you build one, turns your API into tools that customers' AI apps can call.
A server can offer three kinds of capability. The spec separates them by who is in control:
| Primitive | What it is | Who decides to use it | Example |
|---|---|---|---|
| Tools | Functions the model can call | The model | create_issue, search_invoices, run_query |
| Resources | Data addressed by a URI | The application | A file, a database schema, a customer record |
| Prompts | Reusable message templates | The user | "Summarize this pull request" |
Tools get most of the attention because they let a model act. Each tool has a name, a description the model reads, and a JSON Schema for its input. Here is what a server returns when a client lists its tools (shape from the 2026-07-28 tools spec; the tool is our example):
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"resultType": "complete",
"tools": [
{
"name": "search_invoices",
"title": "Search invoices",
"description": "Find invoices for the current customer by status or date range",
"inputSchema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": ["open", "paid", "overdue"]
},
"since": {
"type": "string",
"format": "date"
}
},
"required": ["status"]
}
}
],
"ttlMs": 300000,
"cacheScope": "private"
}
}
The client side has one active feature of its own: elicitation, which lets a server ask the user for missing input mid-task, either through a form or by sending them to a URL. The spec says sensitive data such as passwords or tokens must not be collected through form mode. Two older client features, sampling (a server asking the client's model for a completion) and roots (the client telling a server which directories it may use), still work but are deprecated as of 2026-07-28.
What happens when a model calls a tool
Here is a remote tool call, start to finish:
- Discover. The client can call
server/discoverto check versions and capabilities, then lists the server's tools withtools/list. - Show the model. The host adds those tool names, descriptions and schemas to the model's context.
- The model picks a tool. Asked "which invoices are overdue?", the model decides to call
search_invoiceswith{"status": "overdue"}. - Call. The client sends
tools/callto the server. - Run and return. The server runs the call against its own systems and returns content.
- Answer. The host passes the result back to the model, which writes the reply.
Over Streamable HTTP, step 4 looks like this:
POST /mcp HTTP/1.1
Host: mcp.example.com
Content-Type: application/json
Accept: application/json, text/event-stream
Authorization: Bearer eyJhbGciOi...
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: search_invoices
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "search_invoices",
"arguments": { "status": "overdue" },
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientInfo": {
"name": "ExampleClient",
"version": "1.0.0"
},
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}
Every request carries its own protocol version and client capabilities. There is no handshake and no session to look up, which is the main change in the current spec.
MCP vs APIs vs function calling
| REST or GraphQL API | Function calling | MCP | |
|---|---|---|---|
| What it is | An interface your app calls with code | A model feature: the model returns a structured call for your code to run | A protocol between AI apps and tool servers |
| Who writes the integration | A developer, per API | A developer, per app and per tool | The server author, once, for every MCP client |
| Discovery | Docs or an OpenAPI file, read by people | The app sends tool definitions with each request | Clients list tools at runtime |
| Portability | Any HTTP client | Tied to one model provider's format | Any MCP client |
| Best for | Deterministic app-to-app integration | One app with a few tools it owns | Letting many AI apps use your product |
MCP does not replace your API. Most MCP servers wrap an existing API and add a model-friendly layer: fewer, task-shaped tools, descriptions the model can read, and results trimmed for a context window. The two also work together: most hosts pass MCP tools to the model through the provider's function-calling API. For more on the comparison, see how MCP will do for AI agents what REST APIs did for SaaS.
Local vs remote MCP servers
MCP defines two standard transports:
- stdio: the host starts the server as a local process and exchanges messages over standard input and output. This is how most developer-tool servers run: a file-system or Git server on your laptop, acting with your local permissions.
- Streamable HTTP: the server is a web endpoint. Each message is an HTTP POST, answered with JSON or a short-lived event stream for that request. This is how SaaS companies offer MCP to their customers.
The older HTTP+SSE transport from the first spec version is deprecated, and new servers should not use it. Every Streamable HTTP server must validate the Origin header, and one running on your own machine should bind only to 127.0.0.1.
A local stdio server runs as you and takes credentials from its environment. A remote server is reachable over the internet by many users, so one that reaches private or customer-specific data needs authentication.
How MCP authorization works
Authorization is optional in MCP, but any remote server that touches user data needs it. For HTTP servers that use it, the spec builds on OAuth 2.1, with the MCP server acting as an OAuth resource server:
- The client calls the server without a token and gets
401 Unauthorizedwith a pointer to the server's metadata:HTTP/1.1 401 Unauthorized WWW-Authenticate: Bearer resource_metadata="https://mcp.example.com/.well-known/oauth-protected-resource", scope="invoices:read" - The client reads that Protected Resource Metadata (RFC 9728) to find the authorization server, then the authorization server's own metadata.
- The client identifies itself. The preferred path is a pre-registered client or, where the authorization server supports it, a Client ID Metadata Document, where the
client_idis an HTTPS URL the authorization server fetches. Dynamic Client Registration remains a supported compatibility path but is deprecated. - The user signs in and consents in the browser. The client uses PKCE and sends a
resourceparameter (RFC 8707) naming the MCP server, so the token is issued for that server only. - Every later request carries
Authorization: Bearer <token>. The server must check that the token was issued for it, and must not forward the token to any other API.
The spec stops at authentication and coarse scopes. Which tools a given user sees, which customer's data a call can touch, and who approves a risky action are left to the server. See authentication vs authorization for the general distinction and what OAuth is for the underlying flow.
What changed in the 2026-07-28 spec
Many MCP explainers still describe the 2025 protocol. The 2026-07-28 changelog changed these things:
- Stateless core. The
initializehandshake and theMcp-Session-Idheader are gone. Each request carries its protocol version and client capabilities. - Discovery. Servers must implement
server/discover. - Asking the user mid-call. Instead of the server sending its own requests to the client, it returns a result saying input is required, and the client retries with the answers.
- Deprecated: sampling, roots, logging and Dynamic Client Registration (replaced by Client ID Metadata Documents). Deprecated features normally stay in the spec for at least 12 months before removal; for an active security risk, maintainers can shorten that to no less than 90 days.
- Removed:
ping,logging/setLeveland resumable event streams. - Notifications now arrive through
subscriptions/listen, replacing the HTTP GET stream andresources/subscribe. - Every result carries a
resultType, such as"complete"or a request for more input. - Tasks, for long-running work, moved out of the core into an official extension.
- Caching hints on list results (
ttlMs,cacheScope) and issuer checks on authorization responses (RFC 9207).
If a tutorial starts with an initialize request, it was written for an older version.
The July 2026 specification is the current protocol revision, but existing MCP clients, SDKs and servers may still implement older ones. Before deploying, check which protocol versions your client, SDK and server actually support. Older handshake-based implementations aren't broken; they follow an earlier revision.
MCP security risks
MCP gives a model the ability to act, so its risks are about what a model can be talked into doing and what a server can be tricked into reaching. The MCP security best practices and the wider industry name these:
- Prompt injection through tool results. A document, email or web page returned by a tool can contain instructions. The model may follow them, for example by calling another tool to send data out.
- Tool poisoning. A malicious or compromised server puts instructions in a tool's description, which the model reads as trusted context.
- Token passthrough. A server accepts a token that was not issued for it, or forwards the client's token to a downstream API. This bypasses the audience checks that keep tokens scoped. The spec forbids it.
- Confused deputy. An MCP server that proxies to a third-party API with its own static credentials can be used to reach things the user never consented to. Proxy servers must get consent per client.
- Local server compromise. Installing a stdio server runs code on your machine. MCP's security guidance requires clients that offer one-click setup to show the full command and get consent.
- SSRF during discovery. Clients fetch metadata URLs supplied by servers, which an attacker can point at internal addresses.
The practical defenses are ordinary identity hygiene applied to a new caller: authenticate callers of protected remote MCP servers, validate that tokens were issued for the intended audience, keep scopes narrow, show users what an agent is about to do, require approval for sensitive actions, and log every tool call with who it was for.
Exposing your SaaS product through MCP: what to decide first
If you run a B2B SaaS product, customers will ask whether their AI tools can use it. Implementing the protocol is only the beginning. These decisions take longer:
- Which tenant is this call for? A remote server serves many customers. Derive the acting tenant from verified, server-trusted authorization context on every request: for example, an active-tenant claim in a validated access token, or an authoritative server-side membership lookup. Never treat a tenant ID supplied by the model as proof of access. If you hand out state handles for multi-step work, bind them to the authenticated user and tenant too: holding a handle is not proof of access.
- Which tools does this user see? The spec allows
tools/listto differ by the authorization on the request. Use that to show each user only the tools their role and plan allow, and re-check on everytools/call. - Who controls agent access in the customer's account? Enterprise admins will want to switch tools off, require approval for writes, or limit access to certain roles. Those rules belong to the tenant, inside the limits you set.
- What happens when someone leaves? Disabling an identity at the customer's IdP may stop future sign-ins, while SCIM can deprovision application access. Your MCP server must also define how existing access tokens, tenant memberships and in-flight work are invalidated. Test the time between removal and effective denial.
- Can you answer "who did this"? Logs need the tenant, the human user, the AI client and the tool, so a customer can tell an agent action from a human one.
Here is the failure the first question prevents. A user at Acme, one of your customers, asks an AI assistant about an invoice, and the assistant calls a get_invoice tool with {"invoice_id": "inv_9081"}. That invoice belongs to Globex, another customer. The tool is visible to the user and the token is valid, so the call reaches your server. It must still fail: the server resolves the acting tenant as Acme, finds that inv_9081 is not Acme's, and returns an error without reading Globex's data. Exposing a tool is not the same as authorizing every call to it.

These are the same tenant-isolation and access-control problems as any multi-tenant architecture, with a new kind of client. For more on how agents fit into identity, see AI agent identity management.
Agen.co by Frontegg handles this layer as a managed MCP gateway in front of your existing APIs. It generates tools from your OpenAPI or GraphQL specs, authenticates every call with Frontegg or your current OIDC provider, and lets you set deny, step-up and approval policies that each customer's admins can tighten for their own account. Tool calls, policy decisions and approvals are recorded in an audit trail. See the Agen.co docs.
Who supports MCP
MCP clients ship in most major AI tools:
- Anthropic: Claude apps (docs) and Claude Code (docs)
- OpenAI: ChatGPT, Codex and the Responses API's remote MCP tool (docs)
- Google: Gemini CLI (docs) and the Gemini API for remote servers
- Microsoft: VS Code with GitHub Copilot (docs) and Copilot Studio, which supports MCP tools and resources (docs)
- Cursor and many other editors and agent frameworks
To find servers, the official MCP Registry lists metadata for public servers. It is still in preview.
How to start with MCP
- To use MCP: add a server in a client you already have. Most clients take a command for a local server or a URL for a remote one; the vendor docs linked above say which kinds each supports.
- To build a server: start from an official SDK. The project maintains SDKs for TypeScript, Python, Java, Kotlin, C#, Go, PHP, Ruby, Rust and Swift, and the reference servers show each feature in working code.
- To offer MCP to your customers: settle the tenant, permission and audit questions above before you publish a remote server.
FAQ
Is MCP only for Claude?
No. Anthropic created it, but it is now governed by the Agentic AI Foundation under the Linux Foundation, co-founded by Anthropic, Block and OpenAI. ChatGPT, Gemini CLI, VS Code and Copilot Studio all support it.
Is an MCP server an API?
It is a server that speaks a specific protocol to AI clients. Most MCP servers sit in front of an existing API and translate it into tools a model can discover and call.
What is the difference between an MCP server and an AI agent?
An agent decides what to do. An MCP server gives it things to do. The agent, running in a host, calls tools that MCP servers provide.
Do I need to run an MCP server locally?
Only for tools that need your machine, such as a file system or local Git repository. Services such as GitHub, or your own SaaS product, run remote MCP servers that clients reach over HTTPS.
Is MCP secure?
The protocol defines OAuth-based authorization for remote servers and a list of security requirements, but a server is only as safe as its implementation. Install local servers only from sources you trust, and expect remote servers to authenticate you and scope their tokens.
Put this into practice with Frontegg
Frontegg is customer identity and access management (CIAM) for B2B SaaS. It's free up to 7,500 monthly active users, including 5 SSO/SCIM connections.
Start for freeThe Complete Guide to SaaS Multi-Tenant Architecture
Read the guide