What is mcp in AI?

Updated 2026-08-02AI-assisted draft · citations disclosedPart of the 1,478-question editorial index· AI agents and tools · Source & maintenance record
Short answer

MCP, or Model Context Protocol, is an open protocol for connecting AI applications to external systems such as files, databases, search services and business tools. An MCP host uses a client to connect to an MCP server, which can expose resources, prompts and executable tools. MCP standardizes the connection; it does not make a server trusted, grant unlimited permission or make model output safe.

Why — the first-principles explanation

MCP is a connection protocol around an AI application, not a new model and not an autonomous agent.

The participants. An AI application is the MCP host. It creates an MCP client for each MCP server it connects to. The server is a program that provides context or actions, and it can run locally on the same machine or remotely over the network. The protocol lets the host discover what a server offers and exchange structured messages without every app inventing a different connector.

The two layers. The data layer uses JSON-RPC semantics and defines capability discovery, notifications and the core primitives. The transport layer handles how messages move and how the connection is authorized. The official architecture documentation describes local STDIO transport and remote Streamable HTTP transport; remote authorization commonly uses OAuth, while local processes often receive credentials from their environment.

The primitives. A server can expose resources such as file contents or database records, prompts such as reusable interaction templates, and tools such as functions that query, create, update or delete something. Resources provide context; tools can create side effects. That distinction matters more than the label “MCP.” A read-only database query and a tool that sends money may use the same protocol but require completely different approvals.

What MCP changes. Without a shared protocol, an AI app and each data source need bespoke integration code. MCP supplies a common discovery and call shape so a client can list available tools, retrieve resources and invoke an allowed tool. It reduces connector duplication; it does not remove the need to design the connector, map data, validate inputs or handle failures.

What MCP does not change. MCP is not a permission bypass, an identity provider, a database, a safety certification or a guarantee that a model understands the tool correctly. A host still decides which servers to trust, which tools to import, what credentials and scopes to provide, and whether a person must approve each call. A tool response can be wrong, malicious or prompt-injection content, and remote servers can see the data sent to them.

The security boundary. The MCP security guidance calls out confused-deputy authorization flaws, token passthrough and SSRF. OpenAI's MCP documentation warns that a malicious remote server can exfiltrate sensitive data in the model context and recommends approval and careful review. Use exact server URLs, least-privilege scopes, allowlisted tools, per-client consent, audience-validated tokens, network isolation, logging and a revocation path. Treat the server and every tool description as untrusted until reviewed.

For a practical decision, start with the smallest read-only connection that proves value. Add write tools only after you have an acceptance test, approval gate, rollback path and audit trail. MCP standardizes the plug; your architecture still decides what is connected, what can change and who is accountable.

An example that makes it click

A research assistant can connect to an internal documentation server. The server exposes a resource containing approved handbook pages and a read-only search tool. The host discovers those primitives, asks for a citation-backed answer and keeps a human review step. If you later add a tool that edits a ticket or sends an email, give it a separate scope and approval gate; the fact that both are MCP tools does not make their risk equivalent.

How to do it

  1. Write the workflow and side effects first: read a document, search a database, draft a change, update a record or send an external message.
  2. Choose local STDIO or remote Streamable HTTP based on the trust boundary, network policy, latency and deployment model. Do not expose a local credential or private service merely to make remote access convenient.
  3. Inspect the server identity, source code or vendor controls, transport endpoint, data it can receive, dependencies, update process and incident contact before connecting it.
  4. Inventory the primitives. Separate resources and prompts from tools, and mark every tool as read-only, reversible write, or irreversible/high-impact action.
  5. Apply least privilege: allowlist only the tools needed, scope credentials to the smallest data set, validate token audience and use per-client consent for OAuth flows.
  6. Keep approval before sensitive calls. Show the server, tool name, arguments, data leaving the boundary and expected side effect; require a person to approve or reject the action.
  7. Test with representative data, prompt-injection text, malformed arguments, tool errors, timeouts, revoked credentials and oversized outputs. Verify that failures stop rather than silently broaden access.
  8. Log discovery, authorization, tool calls, results, approvals and actor identity without storing unnecessary secrets. Add rate limits, timeouts, rollback and a kill switch.
  9. Measure the accepted result, latency, token/tool cost and review burden. Keep the connection read-only or remove it if it does not beat a simpler API, search or workflow.

Key facts

Infographic: What is mcp in AI — short answer and key facts
Visual summary — What is mcp in AI?

Choose MCP by the trust boundary, not the acronym

Start with a read-only task, then compare permissions, hosting, review, cost and rollback before exposing production systems.

▶ The 60-second explainer (script)

What is MCP in AI? MCP stands for Model Context Protocol, an open protocol for connecting an AI application to external systems such as files, databases, search and business tools. The host creates one client per MCP server. A server can expose resources for context, prompts for reusable instructions and tools that perform actions. Local servers commonly use STDIO; remote servers use HTTP transports and their own authorization. MCP reduces custom connector work, but it is not a safety certificate or an unlimited permission grant. A remote server can receive sensitive context, a tool can change data, and a malicious response can contain prompt injection. Use exact server URLs, least-privilege scopes, allowlisted tools, approval before side effects, token-audience validation, logs and a kill switch. Start with a read-only connection and add writes only after testing rollback and review. The protocol is standardized; your trust boundary still belongs to your architecture.

What authoritative sources say

Model Context Protocol — Introductionofficial — The MCP project defines MCP as an open standard for connecting AI applications to external systems including data sources, tools and workflows. source ↗
Model Context Protocol — Architecture overviewofficial — The official architecture describes the host-client-server participants, local and remote servers, JSON-RPC data layer, transport layer and the resources/prompts/tools primitives. source ↗
Model Context Protocol — Specificationofficial — The MCP specification defines implementation requirements for clients and servers and the protocol's current capability and message semantics. source ↗
Model Context Protocol — Security Best Practicesofficial — MCP security guidance covers confused-deputy attacks, token passthrough, SSRF, per-client consent, redirect/state validation and token audience controls. source ↗
Model Context Protocol — Authorizationofficial — MCP authorization guidance makes HTTP authorization optional for implementations, distinguishes HTTP and STDIO credential patterns, and requires protected-resource discovery and audience-valid token handling when authorization is used. source ↗
Anthropic — Introducing the Model Context Protocolofficial — Anthropic introduced MCP as an open standard for connecting AI assistants to data sources and described the client/server architecture and open-source components. source ↗
OpenAI API — MCP and Connectorsofficial — OpenAI documents connectors and remote MCP servers, explicit approval controls, tool filtering, OAuth, and the risk that a malicious remote server can exfiltrate data from model context. source ↗
Anthropic — Donating MCP to the Agentic AI Foundationofficial — Anthropic announced donating MCP to the Linux Foundation's Agentic AI Foundation and described the governance goal of a neutral, open, community-driven standard. source ↗

People also ask

What does MCP stand for in AI?

MCP stands for Model Context Protocol. It is an open protocol for connecting AI applications to external data sources, tools and workflows through a common client-server interface.

How does MCP work?

An AI host creates an MCP client for an MCP server. The client discovers the server's capabilities and can retrieve resources, use prompts or call allowlisted tools over a local or remote transport. Authorization and approval remain part of the surrounding system.

What is an MCP server?

It is a program that implements the server side of MCP and exposes context or actions to a client. It may run locally or remotely. The name does not prove that the server is official, safe or appropriate for your data.

What is the difference between MCP and an API?

An API is an interface for a particular service. MCP is a protocol for AI hosts and servers to discover and exchange contextual data and tool operations using common semantics. An MCP server may call one or more underlying APIs; MCP does not replace their business rules or security.

Does MCP make an AI agent more intelligent?

It can give an application access to relevant data or tools, which may make a workflow more useful. It does not change the model's reasoning guarantee, make outputs factual or turn a tool connection into general intelligence.

Is MCP safe?

MCP itself is not a safety certification. Safety depends on the server, transport, credentials, scopes, tool implementation, data handling, approvals, network isolation and monitoring. Treat remote servers and tool outputs as untrusted until reviewed.

Can MCP tools change files or send messages?

They can if a server exposes write-capable tools and the host supplies permissions. Separate read and write scopes, allowlist tools and require approval before changing records, sending messages, spending money or deleting data.

Can ChatGPT use MCP?

OpenAI documents remote MCP servers and connectors in the Responses API, with tool listing, filtering, OAuth and approval controls. Product availability and compatibility depend on the current OpenAI product and model documentation.

How much does MCP cost?

The protocol itself is open, but a deployment may cost for hosting, network traffic, OAuth, the underlying API, model tokens, tool calls, logging, review and incident controls. Compare total cost per accepted task, not only connector setup time.

The same question, asked other ways

This page answers one intent expressed in 4 phrasings. How the index is organized →

Related questions