What Is MCP? Model Context Protocol Explained

MCP is an open standard that lets AI apps such as Claude and ChatGPT use outside tools and data through one protocol. How it works, what it costs, the risks.

By Published

What MCP stands for, and what “an MCP” means

MCP stands for Model Context Protocol. The model is the AI model that reads text and writes answers. The context is everything it can see while it works: the conversation, documents and the results of tools it called. A protocol is an agreed message format, the way browsers and websites agree on HTTP.

The specification names three roles. A host is the AI application a person uses. A client is a connector inside the host that holds one connection to one server. A server is a program that offers capabilities to that client. The messages use JSON-RPC 2.0, a simple format for one program asking another to run a named method, written in JSON, a common text format for structured data.

When people say “an MCP” or “we need an MCP for our CRM”, they almost always mean an MCP server: the piece that sits in front of a system and exposes it to AI apps. “Claude supports MCP” means Claude can be the host.

The problem MCP solves

Before MCP, each pairing of an AI app and a system needed its own integration. Anthropic's launch post put it plainly: every new data source needed its own custom implementation. Three apps and three systems meant nine integrations, each with its own format, sign-in and ways to break.

MCP turns that into a plug standard. Each app builds an MCP client once, and each system offers one MCP server. Then any app can connect to any server without new integration code on either side.

With a shared protocol, the lines between apps and systems stop being separate projects. Each side is built once and every pairing works the same way. Illustrative: the shape is the point, not the figures.

The shared protocol leaves each side's rules in place: each server still sets its own permissions, and the app still decides when to ask the person.

How MCP works: hosts, clients and servers

In the architecture guide, a host creates one client for each server it connects to. A code editor connected to a remote error-tracking server and a local file server runs two clients. Underneath sit two layers: the data layer, which is the JSON-RPC messages, and the transport layer, which is how they travel.

A host runs one client per server. Requests and results use the same message format whether the server is across the internet or on the same machine. Source: adapted from the MCP specification, revision 2026-07-28, and its architecture guide.

What a server can offer

  • Tools are functions the model can call, such as search records or create a ticket. Each has a name, a plain-language description and an input schema, a JSON Schema listing its arguments. The tools section calls them model-controlled, which is why the host should let a person refuse a call.
  • Resources are data, such as a file or a record, for the app or the model to read.
  • Prompts are templated messages and workflows offered to the person.

Each has a list method, such as tools/list, and a method that acts: tools/call, resources/read or prompts/get.

What a client can offer

In revision 2026-07-28 the one client feature the specification lists is elicitation: a server can ask the person for a missing value or a confirmation mid-task by returning a result marked input_required, and the client sends the request again with the answers. Two older client features, sampling and roots, are deprecated, as the changelog records. Under the versioning policy, a deprecated feature stays in the specification for at least twelve months, or ninety days under an expedited exception, before it can be removed. Opt-in extensions such as Tasks, Skills over MCP and MCP Apps sit on top.

Transports: how the messages travel

The transports section defines two standard ways to carry messages.

  • stdio (standard input and output): the client starts the server as a program on the same computer, and they exchange one JSON message per line. Nothing crosses the network.
  • Streamable HTTP: the server has one web address, such as https://example.com/mcp. The client sends each message as an HTTP POST, with headers naming the protocol version and the method, and the server answers with JSON or a stream of events for that request.

An older transport built on Server-Sent Events, a way for a server to push a stream of updates, was deprecated in revision 2025-03-26. One more change matters if you read older tutorials. Earlier revisions opened each connection with an initialize handshake and could keep a session. Revision 2026-07-28 removed both: each request carries its protocol version and the client's capabilities in a _meta field, and a server/discover method tells a client what a server supports.

One request from start to finish

Take a question to a chat app with a weather server connected: what is the weather in New York? The messages below follow the examples in the specification's tools section for revision 2026-07-28, with the _meta field every request must carry added and the optional icon and paging fields left out.

The person asks, the client fetches the tool list, the model proposes a call, the person approves, the server runs it, and the model answers from the result. Source: adapted from the MCP specification, revision 2026-07-28, tools section.

First the client asks which tools the server has.

Request: list the tools
{  "jsonrpc": "2.0",  "id": 2,  "method": "tools/list",  "params": {    "_meta": {      "io.modelcontextprotocol/protocolVersion": "2026-07-28",      "io.modelcontextprotocol/clientInfo": {        "name": "example-client",        "version": "1.0.0"      },      "io.modelcontextprotocol/clientCapabilities": {}    }  }}

In the response, ttlMs and cacheScope say how long, in milliseconds, the client may reuse the list and how widely a cached copy may be shared.

Response: one tool, get_weather
{  "jsonrpc": "2.0",  "id": 2,  "result": {    "resultType": "complete",    "tools": [      {        "name": "get_weather",        "title": "Weather Information Provider",        "description": "Get current weather information for a location",        "inputSchema": {          "type": "object",          "properties": {            "location": {              "type": "string",              "description": "City name or zip code"            }          },          "required": [            "location"          ]        }      }    ],    "ttlMs": 300000,    "cacheScope": "public"  }}

The host gives that list to the model with the question. The model proposes get_weather for New York, the host shows the person the call, the person approves, and the client sends it.

Request: call get_weather
{  "jsonrpc": "2.0",  "id": 3,  "method": "tools/call",  "params": {    "name": "get_weather",    "arguments": {      "location": "New York"    },    "_meta": {      "io.modelcontextprotocol/protocolVersion": "2026-07-28",      "io.modelcontextprotocol/clientInfo": {        "name": "example-client",        "version": "1.0.0"      },      "io.modelcontextprotocol/clientCapabilities": {}    }  }}

The server runs the tool and returns content. If a tool fails, the result has isError set to true and a message the model can read and recover from. A malformed request, such as an unknown tool name, gets a JSON-RPC error instead.

Result: the tool output
{  "jsonrpc": "2.0",  "id": 3,  "result": {    "resultType": "complete",    "content": [      {        "type": "text",        "text": "Current weather in New York:\nTemperature: 72°F\nConditions: Partly cloudy"      }    ],    "isError": false  }}

At no point did the model talk to the server: the host's client carried every message, and the host decided what the model saw.

Local and remote MCP servers

A local server runs on the same computer as the host and talks over stdio. It usually serves one person, reaches what that computer can reach, and takes credentials from its environment rather than a sign-in. A remote server runs on the network, talks over Streamable HTTP and serves many people, each signing in. Vendor servers, such as Salesforce's, are remote. Two differences decide which you need.

  • Where the host runs. Claude's custom connectors connect from Anthropic's cloud, so the server must be reachable from the public internet. A desktop or command-line host can reach a server on your own machine or network.
  • What a local server can touch. It is a program running with your permissions. The MCP security best practices say a client that offers one-click local setup must show the exact command and get explicit consent first, and should run the server in a sandbox, a fenced-off space with limited access.

Servers that listen over HTTP have duties of their own. The Streamable HTTP rules say a server must check the Origin header to block DNS rebinding, a trick that lets a web page reach a server on your machine; should listen only on 127.0.0.1 when local; and should authenticate every connection.

Sign-in and permissions

Authorization is optional in the specification. A remote server that needs sign-in should follow the authorization rules, built on OAuth 2.1, the open standard for letting one app act for you in another without your password. The MCP server is the resource server being protected, the MCP client is the OAuth client, and an authorization server, often the system's own login, issues tokens. The first time you add such a server:

  1. The client calls without a token. The server answers 401 and points to a metadata document naming its authorization server and its scopes, the named permissions it supports.
  2. The client identifies itself with a client ID registered in advance or a Client ID Metadata Document, a small file at a web address the client controls that describes it. Dynamic client registration is deprecated.
  3. Your browser opens the sign-in page, where you sign in, not in the AI app, and approve access. PKCE, a one-time check against anyone intercepting the hand-off, protects this step, and the request names the one server the token is for.
  4. The client receives an access token, a pass proving you approved it, and sends it with every request.
  5. If a call needs more, the server answers 403 with insufficient_scope, and the client asks you to approve more.

The server must check that each token was issued for it and must not accept or pass along tokens meant for other services, and the client should request only the scopes it needs. What a token reaches is still decided by the system behind the server. In Salesforce that is the user's own permissions and sharing, covered in our Salesforce MCP security guide.

MCP compared with an API, function calling, RAG and an agent

These terms often appear in the same system, at different layers.

TermWhat it isWho decides what runsHow it relates to MCP
API (application programming interface)A system's own interface for programs, with its own address, format and sign-in.The developer who writes the calling code.An MCP server usually calls an API underneath.
Function calling, or tool useThe app describes functions, the model returns a structured call, and the app runs it.The model chooses; the app runs it.MCP standardizes where those tools come from.
RAG (retrieval-augmented generation)Finds relevant text, such as document passages, and adds it to the prompt.The app's retrieval step.A RAG search can be offered as an MCP tool or resource.
AgentA model working toward a goal over several steps, choosing tools as it goes.The model, within limits the app sets.An agent often reaches its tools through MCP.
MCPAn open protocol connecting AI apps to tools, data and prompts.The model proposes; a person should be able to deny.The shared plug between the other pieces.

Anthropic's tool use docs describe the middle step: Claude picks a tool and returns a structured call that your application runs. MCP is how a host fills that tool list. Our guide to Salesforce AI architecture with Agentforce, MCP and RAG shows how the layers fit in a Salesforce org.

Which products support MCP

Claude, ChatGPT and the OpenAI API, VS Code, Microsoft Copilot Studio, Cursor and Gemini CLI can all connect to MCP servers, and Salesforce runs MCP servers of its own. Each row uses the product's own docs and its own word for the feature. Plans change, so check the linked page.

ProductIts word for itWorth knowing, from its docs
ClaudeCustom connectors, using remote MCPFree and paid plans; Free is limited to one custom connector. Tool approval requests, with an Allow always option.
Claude CodeMCP serversAdded with claude mcp add, over HTTP or stdio. The older SSE transport is deprecated.
ChatGPTCustom MCP serversFull support on Business and Enterprise/Edu; Pro can connect with read and fetch permissions only.
OpenAI APIRemote MCP servers, via the mcp tool in the Responses APIAsks for approval by default before sharing data with a server; allowed_tools limits which of a server's tools are imported.
VS CodeMCP serversHTTP or stdio. Shows server trust requests and tool approval requests.
Microsoft Copilot StudioModel Context Protocol tools and resourcesRequires generative orchestration. Advises connecting only servers you trust.
CursorModel Context Protocol (MCP)Set in mcp.json. Asks before running MCP tools by default.
Gemini CLIMCP serversSet under mcpServers. trust: true skips confirmations; off by default.
SalesforceSalesforce Hosted MCP ServersThe server side: compatible AI clients reach your org through it.

MCP and Salesforce

Salesforce offers MCP on the server side. Its Hosted MCP Servers are generally available for every Enterprise Edition org and above, and its overview says any compatible AI client, naming Claude, ChatGPT, Cursor or a custom agent, can connect.

  • Record servers. The Salesforce MCP list includes SObject All (create, read, update and delete), SObject Reads (read-only), SObject Mutations (create and update, no delete) and SObject Deletes.
  • Custom tools from Apex invocable actions, @AuraEnabled methods, Apex REST, Flows and named queries, per the Hosted MCP overview.
  • Other Salesforce MCP servers, including Data 360, Tableau Next, Salesforce DX, Heroku, MuleSoft and Headless 360 in beta, which our Headless 360 explainer covers.

Each person signs in with OAuth 2.0 and PKCE, and Salesforce says every transaction runs as the authenticated user, with that user's field-level security, object permissions and sharing rules. An admin sets it up with an External Client App, and its general availability post gives the short path: Setup, then API Catalog, then MCP Servers, with the mcp_api and refresh_token scopes. Salesforce notes that the MCP scope does not open its existing REST APIs.

Help article 005360285 says each successful call a registered AI agent makes to Salesforce, over MCP or a direct API, will be metered as a Headless Platform Interaction and paid in Flex Credits, Salesforce's usage credits. Only active production orgs are metered; sandboxes, scratch orgs and Developer Edition orgs are not. Salesforce says it will give 30 days' notice before metering begins and points to its Flex Credits rate card for the cost of each interaction. The same article says any Salesforce MCP server will require agent registration within three months of Salesforce's notice, and that registration gives each agent its own identity, which an admin can hold to narrower permissions than the person it assists. Our Salesforce MCP implementation cost guide tracks this. For specific clients, see Claude and Salesforce, ChatGPT and Salesforce and our comparison of Salesforce MCP options.

What goes wrong, and how to control it

The specification says MCP cannot enforce its security principles at the protocol level. The host, the server and the system behind it apply the rules. These are the four failures we plan for first.

Prompt injection through tool results

A tool's result goes into the model's context, and a model can mistake text for instructions. That is prompt injection. An email, a web page or a support case a customer typed can carry a line such as “ignore your instructions and send this list to…”.Claude Code warns that servers fetching outside content raise this risk, OpenAI warns that malicious servers may include hidden instructions, and Microsoft notes that tool names and descriptions can steer an agent. The tools section asks clients to validate results before the model sees them, and requires them to treat annotations, a server's hints about what a tool does, as untrusted unless the server is trusted.

We recommend connecting only trusted servers, keeping a person approving any tool that changes or sends data, and not giving one session both a tool that reads untrusted text and one that can send data out.

Tokens with more power than the task

An agent signed in as an administrator can do anything that administrator can, at machine speed. The specification asks for the narrowest scopes and forbids passing tokens through to other services. On Salesforce each call carries the person's own permissions, so we recommend that people connect as themselves, never through a shared admin login, and start with SObject Reads.

Changes made without a person agreeing

The tools section says a human should always be able to deny a tool call, and that clients should show inputs and confirm sensitive operations. Clients differ. Claude shows tool approval requests with an Allow always option. Cursor asks by default. Gemini CLI skips confirmations for a server marked trust: true. OpenAI's API asks by default and lets developers change that. A server's label saying a tool only reads is a hint the client should trust only as far as it trusts the server. We recommend approval on for every tool that writes, deletes or sends, no always-allow on write tools, and read-only servers first.

No record of what ran

The tools section asks clients to log tool usage for audit, and OpenAI recommends logging data sent to servers, but the protocol keeps no record for you. Salesforce's general availability post says the person's name appears in its audit trail when an agent updates a record. In our experience the conversation behind the change does not appear there, so the log you need lives in the client or a layer in front of the servers: who asked, which tool ran, with what arguments, and what came back.

What MCP costs

The protocol itself is free. Anthropic open-sourced MCP at launch, new code and specification contributions are licensed under Apache 2.0, and the project now sits in the Agentic AI Foundation. The costs are in what surrounds it.

  • The AI product. Whether you can add servers, and how many, depends on the plan, and each vendor sets its own limits. The product table above links each vendor's current page.
  • Running servers. A server you build is software you host, secure and keep current with new revisions.
  • Vendor charges. Some vendors charge for the calls themselves. Salesforce plans to charge Flex Credits for each successful call a registered agent makes to a production org, at the rate on its Flex Credits rate card.
  • Model usage. Anthropic's tool use docs count each tool's name, description and schema, and each tool result, as input tokens, so long tool lists and large results add to usage-based model bills.
  • Setup work. In our experience the largest line: choosing servers, scoping permissions, testing approvals and setting up logging.

For Salesforce, our guide to Salesforce MCP implementation cost explains what is metered and how to estimate it.

What an MCP gateway is, and when it is worth it

An MCP gateway sits between AI apps and MCP servers: the apps connect to the gateway, and the gateway connects to the servers. Salesforce's GA announcement describes gateways as similar to API gateways but built for the protocol, names MuleSoft AI Gateway as one, and suggests that enterprises using MCP across several vendors explore them for central access control.

Apps connect once to the gateway, and the gateway holds sign-in, tool permissions, approval rules and the log for every server behind it. Illustrative: the shape is the point, not the figures.

A gateway turns each app's separate settings into one set of rules and one log. We think it is worth it with several AI apps, servers or Salesforce orgs, with regulated work that needs one audit trail, or when security must approve tools centrally. We would skip it for one team, one app and one vendor server with good controls of its own. A gateway is also one more system in every call's path, so it needs the same scrutiny as the servers behind it.

We build and run an MCP gateway called ApexGenius, so weigh our view of gateways with that in mind. ApexGenius keeps your apps, skills and memory in one connection, so your whole setup goes with you from agent to agent.

When MCP is the wrong tool

MCP fits when a model decides, in the moment, which tool to use. If nothing needs deciding, we recommend something simpler.

  • A fixed, repeating job, such as copying paid invoices into the CRM every night, is a scheduled API call.
  • When one system must tell another that something happened, a webhook, where the sender calls a web address the moment the event occurs, does it directly.
  • Large data moves belong in a bulk API job. In our experience, routing them through a model call by call is slower and costs more.
  • A step that must happen every time, such as a compliance check, belongs in code or platform rules, where it runs whatever the model decides.

How a team starts

This is the order we recommend for a first MCP project.

  1. Pick one task and one owner. Note which systems it touches and whether each step reads or changes data.
  2. Look for an existing server before building one, starting with the vendor's docs. The official MCP Registry, still in preview, lists public servers' metadata, not their code, and leaves security scanning to package registries and aggregators, so treat a listing as a lead to check.
  3. Use the AI app your team already has, and confirm its plan lets you add servers.
  4. Start read-only in a test environment. In Salesforce, that is SObject Reads in a sandbox, where agent calls are not metered.
  5. Have each person sign in as themselves, with the narrowest scopes.
  6. Keep approval on for every write, and decide where the tool-call log lives before real use.
  7. Test failures on purpose: a planted instruction, a request beyond the person's permissions, a tool that errors. Check that the agent refuses, stops or reports each one.
  8. Add write tools one at a time, after the read-only version has been reviewed.
  9. Before production, register the agent where the vendor requires it, as Salesforce will, and estimate calls against its metering.

Frequently asked questions

What is MCP in simple terms?

MCP, the Model Context Protocol, is a shared language that lets AI apps such as Claude and ChatGPT use outside tools and data. A system offers its tools through an MCP server, and any AI app that supports MCP can connect to it, so each app does not need its own custom integration with each system.

What does MCP stand for in AI?

MCP stands for Model Context Protocol. The model is the AI model, the context is everything the model can see while it works, and the protocol is the agreed format for the messages. When people say "an MCP", they usually mean an MCP server.

Is MCP free?

Yes. The protocol is open source and free to use, and it now sits in the Agentic AI Foundation under the Linux Foundation. What costs money is everything around it: the AI product plan that lets you add servers, hosting any server you run yourself, vendor charges for the calls, such as Salesforce's planned Flex Credit metering, and the setup work.

Is Salesforce MCP free?

Salesforce Hosted MCP Servers are available for every Enterprise Edition org and above. Salesforce has announced a usage-based charge on top: calls that registered AI agents make to production orgs will draw Flex Credits, with 30 days' notice before metering starts. Sandboxes, scratch orgs and Developer Edition orgs are not metered. Salesforce help article 005360285 and its Flex Credits rate card carry the current terms.

How much does Salesforce MCP cost?

The platform charge is usage-based. Once metering starts, each successful call a registered agent makes to a production org, over MCP or a direct API, is metered as a Headless Platform Interaction and paid in Flex Credits, at the rate on Salesforce's Flex Credits rate card. The rest of the cost is setup work: permissions, approvals, testing and logging.

How much does an MCP gateway cost for enterprise teams?

There is no standard price. A gateway is either a product you license or software you run, so the cost is the vendor's price or your own hosting, plus the work of setting policies and reviewing logs. Ask each vendor to price your real numbers: people, AI apps, connected servers and calls per month. We build an MCP gateway ourselves, so weigh our view accordingly.

Is MCP the same as an API?

No. An API is one system's own interface for programs. MCP is a common protocol that AI apps use to discover and call tools, and an MCP server usually calls a system's API underneath. MCP gives AI apps one way to reach many APIs; it does not replace them.

What is an MCP server?

An MCP server is a program that offers tools, data and prompt templates to AI apps over MCP. It can run on your own computer and talk over standard input and output, or run remotely and talk over HTTP, usually with a sign-in so each person's own permissions apply.

Is MCP safe to use?

The protocol carries messages but cannot enforce safety on its own, and its specification says so. Safety comes from connecting only servers you trust, signing in with narrow permissions, keeping a person approving changes, guarding against instructions hidden in tool results, and logging every tool call.

Who created MCP, and who owns it now?

Anthropic created MCP and released it as an open source project in November 2024. In December 2025 Anthropic donated it to the Agentic AI Foundation, a directed fund under the Linux Foundation co-founded by Anthropic, Block and OpenAI. The project's maintainers still decide changes to the specification.

Does ChatGPT support MCP?

Yes. ChatGPT can connect to custom MCP servers. OpenAI's help center gives full support to Business and Enterprise/Edu workspaces and read and fetch access to Pro. Developers can also connect remote MCP servers to OpenAI's Responses API through its mcp tool.

Do I need to write code to use MCP?

Not to use an existing server. In an app such as Claude, you add a remote server by its URL and sign in. Building your own server, or turning your own logic, such as Salesforce Apex or Flows, into tools, takes development work.

Official references

GAT Solutions is an independent Salesforce consultancy. Salesforce, MuleSoft, Tableau and Heroku are trademarks of Salesforce, Inc. Claude is a trademark of Anthropic, PBC, and ChatGPT is a trademark of OpenAI. Other product names belong to their owners.

Continue the decision

View all resources →

Free consultation

Planning MCP for your team? Tell us what it should reach.

Never send us a key or password.

See AI and Agentforce consulting

Book a call, or send us what is stuck.

Prefer to talk it through?

Pick a 30-minute time with Gray. Bring the backlog or the thing that broke.

Loading available times…