← Guides

MCP AI Agent: How AI Agents Use the Model Context Protocol (2026)

What an MCP AI agent is in November 2026: how the Model Context Protocol connects agents to tools and data, what changed in the stateless 2026-07-28 spec, MCP vs APIs and CLIs, security risks, where to run MCP agents with prices, and how SPIRITT connects to MCP servers and builds new ones for you.

Flat risograph illustration of an MCP AI agent: a friendly robot holds a universal plug while app tiles for a calendar, a document, a database, a chat and a folder connect by identical cables into one shared hub, and a person gives a thumbs up

An MCP AI agent is an AI agent that reaches tools and data through the Model Context Protocol (MCP), the open standard that lets any AI application connect to any compatible server for files, databases, SaaS apps or internal APIs through one common interface. Anthropic introduced MCP in November 2024 and donated it to the Linux Foundation's Agentic AI Foundation in December 2025; it is supported by Claude, ChatGPT, Gemini, Microsoft Copilot, Cursor and VS Code, and its current spec (2026-07-28) makes the protocol stateless. SPIRITT, the operating system for AI transformation, connects its agents to apps through APIs and MCP servers across 1,500+ integrations, and because it codes, ships and runs work end to end, it can write, deploy and govern a new MCP server for a system that does not have one. This guide explains how MCP works for agents, what changed this year, how it compares with plain APIs and CLIs, the security questions to ask and where to run an MCP agent.

What MCP does for an AI agent

Before MCP, every agent framework needed its own connector for every app: one for Slack in LangChain, another for Slack in a custom agent, another in an IDE. MCP turns that many-to-many problem into one protocol. A server exposes capabilities once, and any client (the AI application hosting the agent) can use them.

An MCP server can offer three kinds of things:

  • Tools. Functions the model can call, such as create_invoice or search_tickets, each with a JSON schema for its inputs.
  • Resources. Read-only data the application can load into context, such as a file, a database row or a document.
  • Prompts. Reusable templates a user can pick, such as "summarize this pull request".

Clients can in turn offer servers sampling (the server asks the client's model to generate text), elicitation (the server asks the user for missing input) and roots (which folders the server may touch). Servers run locally over standard input and output, or remotely over Streamable HTTP with OAuth for authorization.

How an MCP AI agent works, step by step

  1. Discover. The client connects to each configured server and learns which tools, resources and prompts it offers, and which protocol versions it supports.
  2. Plan. The model receives the user's request plus the tool descriptions and decides which tool to call with which arguments.
  3. Call. The client sends the tool call to the server, which runs it against the real system and returns a result.
  4. Loop. The model reads the result and decides on the next call or the final answer.
  5. Govern. A good client asks a person before risky calls, logs every call and enforces which servers each agent may use.

What changed in MCP in 2026

The 2026-07-28 specification is the biggest change since launch:

  • Stateless by default. The initialize handshake and protocol-level sessions are gone. Every request carries its protocol version and client capabilities, which makes MCP servers much easier to scale behind ordinary load balancers.
  • server/discover. Servers must advertise their supported versions, capabilities and identity, so clients can choose a version up front.
  • Subscriptions in one stream. A single subscriptions/listen stream replaces older endpoints for change notifications.
  • Tasks as an official extension. Long-running operations moved out of the core into the io.modelcontextprotocol/tasks extension, with polling.

Around the protocol, an official MCP Registry lists public servers, and SDKs exist for every major language.

Code execution with MCP: fewer tokens, better agents

A practical limit of MCP agents is context: loading every tool definition and passing every intermediate result through the model gets expensive. In November 2025 Anthropic showed an alternative: present MCP servers to the agent as code modules and let it write a short script that calls them inside a sandbox. In its example, moving a meeting transcript from Google Drive into Salesforce dropped from about 150,000 tokens to about 2,000. Cloudflare calls the same pattern Code Mode. The trade-off is that you now need a secure place to run model-written code, which is exactly what an agent with its own isolated computer provides.

MCP vs API vs CLI for AI agents

ApproachWhat the agent usesStrengthsWatch out for
MCP serverStandard tools, resources and prompts over one protocolWorks across Claude, ChatGPT, Cursor, VS Code and more; discovery built in; OAuth for remote serversTool definitions cost context; quality depends on the server
Direct APICode or a tool wrapper calling REST or GraphQLFull coverage of the app, exact control, no extra layerOne integration per framework; you handle auth and rate limits
CLIShell commands such as gh, aws or kubectlVery token efficient; models know popular CLIs wellNeeds a sandbox; output parsing; weaker permission boundaries

Most production agents use all three. The question is less "MCP or API" than "which tool surface gives this agent the right access with the least risk".

MCP security: questions to ask before you connect a server

  • Who wrote the server? Prefer official servers from the vendor or servers you build. A malicious tool description can carry hidden instructions, a risk often called tool poisoning.
  • What can it write or delete? Separate read tools from write and destructive tools, and require approval for the latter.
  • Where do the credentials live? Tokens should be scoped to the minimum and kept out of the model's reach.
  • Is every call logged? You need an audit trail of which agent called which tool with which arguments.
  • Can untrusted content reach a powerful tool? Text from email, web pages or tickets can try to steer the agent; keep a person in the loop for actions that move money or data.

For the broader picture, see our guides to AI agent identity management and secure sandboxes for AI agents.

Where to run an MCP AI agent (checked November 2026)

OptionMCP supportBest forPrice
Claude (apps and Claude Code)Connectors directory and custom MCP serversIndividuals and teams working with ClaudePro $20 a month
ChatGPTMCP-based apps and connectorsChatGPT users adding company toolsPlus $20 a month
GitHub Copilot in VS CodeMCP servers in agent modeDevelopers in VS Code and GitHubPro $10 a month
CursorMCP servers in the editor agentDevelopers in CursorFree; paid from $8 a month
ComposioHosted MCP access to 1,700+ appsBuilders who need many app connections fastFree plan; extra tool calls $0.005 each
SPIRITTConnects to MCP servers and APIs, builds and hosts new MCP serversTeams that want agents running real work across apps with approvals and budgetsFree to start; Starter $32, Pro $256, Max $1,024 a month

How SPIRITT uses MCP

SPIRITT runs sales, ops, admin and engineering work end to end, and MCP is one of the ways it reaches your systems. It connects to 1,500+ apps through ready integrations, APIs and MCP servers, and when a system has neither, it works inside the app on its own cloud computer like a person would. As a state-of-the-art coding agent it can also write a new MCP server for your internal API, test it, deploy it and keep it running, so your other AI tools can use it too.

Every call goes through the same controls: keys are injected at the network boundary so agents never see them, each integration has Read, Write and Destructive rules set to allow, ask or never, risky actions wait for single-use approvals, and every action is in the audit trail with an itemized cost. SPIRITT composes models from several labs within each task, and it runs code inside an isolated cloud computer, which is what the code-execution pattern above needs. To see what your MCP agents are doing over time, read our guide to AI agent observability.

FAQ

What is an MCP AI agent?

It is an AI agent that uses the Model Context Protocol to discover and call tools and read data from MCP servers. The agent's host application is the MCP client; each connected system, such as GitHub, a database or a CRM, is exposed by an MCP server.

What is MCP for AI agents?

MCP is an open protocol, now governed by the Linux Foundation's Agentic AI Foundation, that standardizes how AI applications connect to external tools and data. For agents it means one integration works across many AI products.

Is MCP an AI agent?

No. MCP is the connection standard. The agent is the model plus the loop that decides what to do; MCP is how it reaches tools and data.

How do I build an AI agent with MCP?

Pick a client or framework that supports MCP (Claude Agent SDK, OpenAI Agents SDK, LangGraph, Google ADK and others do), connect the servers the agent needs, describe the task, and add approvals for write actions. Or describe the job to SPIRITT and it builds, deploys and runs the agent and any missing MCP server.

What is the difference between MCP and an API?

An API is a specific app's interface. MCP is a common layer on top that describes tools in a standard way so any compatible AI client can discover and call them. Many MCP servers are thin wrappers over an existing API.

MCP vs CLI for AI agents: which is better?

CLIs are token efficient and models know popular ones well, but they need a sandbox and give weaker permission boundaries. MCP adds discovery, standard schemas and OAuth. Many teams use both, plus direct API calls.

What is agentic AI MCP?

It refers to agentic systems, where AI agents plan and take multi-step actions, using MCP as their standard way to reach tools. The 2026 spec and the tasks extension are designed for those long-running, multi-step workloads.

How we checked

SPIRITT publishes this guide. Protocol facts come from modelcontextprotocol.io, including the 2026-07-28 specification changelog, read on November 23, 2026. The Agentic AI Foundation facts come from Anthropic's and the Linux Foundation's announcements of December 9, 2025. The token figures come from Anthropic's engineering post "Code execution with MCP" of November 4, 2025. Prices come from each vendor's pricing page in November 2026. We read the current Google top results for "MCP AI agent" in the US to cover the questions searchers ask. SPIRITT facts come from spiritt.ai and the SPIRITT product.

Give your agent every tool, safely

Buy from builders who use what they sellBuilt usingSPIRITT