Skip to content
GuidesUpdated · 11 min read

MCP vs API: why MCP is a layer on your API, not a replacement

MCP is a protocol for AI clients that sits on top of your API. A spec-led guide to the 2026-07-28 stateless revision, transports, OAuth, the security risks and a decision matrix for building an API, an MCP server or both.

Elgrith Editorial TeamStrategy, design & SEO · 11 min read
Share
A central hub with many cables, one blue, fanning out to blocks and a laptop: one protocol connecting many tools vs a single direct API cable
FIG 01A central hub with many cables, one blue, fanning out to blocks and a laptop: one protocol connecting many tools vs a single direct API cable
TL;DR

Key takeaways

  1. 01An API is how software talks to your service; MCP is a standard way for AI assistants to discover and call tools built on top of it. The API still does the work.
  2. 02Since spec 2026-07-28, MCP is stateless: the initialize handshake and the Mcp-Session-Id header are gone, and servers must implement server/discover (checked 23 Oct 2026).
  3. 03MCP has two current transports: stdio for local servers and Streamable HTTP for remote ones. HTTP+SSE is deprecated.
  4. 04Remote MCP servers act as OAuth 2.1 resource servers: they must publish RFC 9728 metadata, clients must send RFC 8707 resource indicators, and token passthrough is forbidden.
  5. 05Build an MCP server when AI clients are real users of your product, keep your API as the system of record, and treat prompt injection and tool poisoning as design inputs.

An API is how software talks to your service; MCP (Model Context Protocol) is a standard way for AI assistants to discover and call tools built on those APIs. MCP does not replace your API. Since the 2026-07-28 spec, the protocol is stateless, so an MCP server is a thin layer you add when AI clients are customers.

Most "MCP vs API" articles were written for an older version of the protocol. Several still say MCP is stateful, which stopped being true when the 2026-07-28 revision removed protocol-level sessions. This guide works from the specification itself. The versioning page says "The current protocol version is 2026-07-28." Every spec detail below was checked on 23 October 2026, and the protocol moves quickly, so recheck before you build.

How do MCP and a REST API compare?

REST (or GraphQL) APIMCP server
Who calls itYour web app, mobile app, partners and scriptsAn AI host such as Claude, ChatGPT, Cursor or VS Code, through its MCP client
Who decides what to callA developer, at build timeThe model, at run time, with user consent
DiscoveryDocs, an OpenAPI file, an SDKRuntime listing of tools, resources and prompts
SchemaYour own endpoint designJSON Schema for every tool's input and output
Message formatHTTP verbs and your JSONJSON-RPC 2.0 messages
AuthWhatever you chose: API keys, OAuth, sessionsOptional; when used over HTTP, OAuth 2.1 with RFC 9728 and RFC 8707
TransportHTTPstdio (local) or Streamable HTTP (remote)
StateYour choiceStateless since 2026-07-28; state travels as explicit handles
Where business logic livesIn the APIStill in the API; the MCP server translates

The last row is the important one. An MCP server is an adapter. It describes a set of task-shaped tools to an AI client, checks who is calling, and turns each tool call into calls on the systems that actually hold your data and rules.

What is MCP in 2026?

The specification describes MCP as "an open protocol that enables seamless integration between LLM applications and external data sources and tools". It uses JSON-RPC 2.0 messages between three roles:

  • Hosts: the AI applications people use, such as a chat app or a code editor.
  • Clients: connectors inside the host, one per server.
  • Servers: services that provide context and capabilities. This is the part you build.

A server can offer three kinds of feature. Tools are "functions for the AI model to execute", such as "create an invoice" or "search orders". Resources are context and data for the user or the model, such as a document or a record. Prompts are templated messages and workflows that users pick. Clients can offer elicitation, which lets a server ask the user for missing information. Optional extensions sit beyond the core, including Tasks for long-running work and MCP Apps for interactive UI rendered inside a conversation.

What changed in MCP between 2025 and 2026?

Spec versionMain changes
2025-03-26OAuth 2.1 authorization framework; Streamable HTTP replaced HTTP+SSE; JSON-RPC batching added; tool annotations such as read-only or destructive
2025-06-18Batching removed; structured tool output; servers classified as OAuth resource servers; clients must implement RFC 8707 resource indicators; elicitation; resource links; MCP-Protocol-Version header
2025-11-25OpenID Connect Discovery; icons; incremental scope consent; URL-mode elicitation; tool calling inside sampling; Client ID Metadata Documents recommended; experimental tasks
2026-07-28Sessions, the Mcp-Session-Id header and the initialize handshake removed; server/discover required; subscriptions/listen for change notifications; tasks moved to an extension; Roots, Sampling, Logging and Dynamic Client Registration deprecated

Sources: the official changelogs for 2025-03-26, 2025-06-18, 2025-11-25 and 2026-07-28, read 23 Oct 2026.

The 2026 release is the big one. The MCP blog post describes it as "transforming from a bidirectional stateful protocol into a request/response stateless protocol". In practice:

  • Every request carries its own context. The protocol version and client capabilities travel in each request's metadata instead of being agreed once in a handshake.
  • server/discover is mandatory. Servers must implement it to advertise their versions, capabilities and identity, and clients may call it first.
  • State becomes explicit. A server that needs to remember something across calls, such as a cart or a workflow, mints a handle and receives it back as an ordinary tool argument.
  • Server-initiated requests are replaced. Instead of the server calling back into the client, it returns an "input required" result and the client retries the original request with the answers.
  • A formal deprecation policy with a minimum twelve-month window now governs removals.

For engineering teams this matters because stateless servers are easy to run behind a load balancer or on serverless infrastructure. You no longer need sticky sessions to keep an MCP connection alive.

Which transports does MCP support?

TransportWhere the server runsTypical authGood for
stdioOn the user's machine, launched by the host as a local processCredentials from the environmentDeveloper tools, file and repo access, CLIs
Streamable HTTPOn your infrastructure, reached over HTTPSOAuth 2.1SaaS products, shared company tools, anything multi-user
HTTP+SSERemoteVariesLegacy only: deprecated since 2025-03-26

The transports page says that with Streamable HTTP "each message is an HTTP POST to a single MCP endpoint". The 2026 revision also dropped SSE stream resumability: if a response stream breaks, the client re-issues the request with a new ID, so make write tools idempotent. Some hosts still accept the old transport: OpenAI's MCP guide says its API "works with remote MCP servers that support either the Streamable HTTP or the HTTP/SSE transport protocols". Build new servers on Streamable HTTP.

How does authentication work for a remote MCP server?

The authorization spec starts by saying "Authorization is OPTIONAL". If your server is local and uses stdio, it should not use the OAuth flow at all and should read credentials from the environment. If it is remote and protected, the rules are specific:

  • The MCP server is an OAuth 2.1 resource server. It accepts access tokens; it does not have to be the authorization server. You can keep your existing identity provider.
  • Servers MUST implement RFC 9728 (Protected Resource Metadata), which tells clients which authorization server to use.
  • Clients MUST implement RFC 8707 resource indicators, naming the exact MCP server a token is for.
  • Client registration uses Client ID Metadata Documents (recommended), pre-registration or Dynamic Client Registration, which is now deprecated.
  • Clients must validate the issuer (RFC 9207) before redeeming an authorization code, which defends against mix-up attacks.
  • Tokens must be issued for the MCP server. The spec says servers "MUST NOT accept or transit any other tokens", and the security best practices state that "Token passthrough is explicitly forbidden".

So if your API already uses OAuth, the MCP server validates its own tokens, then calls your API with credentials scoped to that user. Ask for narrow scopes first and step up when a privileged tool is used.

Why doesn't MCP replace your API?

Because the API is where the rules live. Rate limits, versioning, validation, permissions, billing, audit logs and every non-AI consumer (your web app, your mobile app, partner integrations, webhooks) still depend on it. An MCP server that bypasses the API and talks to the database directly duplicates logic and creates a second, weaker security boundary.

MCP also shouldn't mirror your API endpoint by endpoint. A model works best with a small set of clear, task-shaped tools, each with a precise description and schema. "Refund an order" is a better tool than four raw endpoints the model has to chain in the right order. The 2026 spec also nudges servers towards caching: tools should be listed in a deterministic order, and list results carry freshness hints so clients don't keep re-fetching them.

If you don't have an API yet, build the API first. MCP is a layer, and it needs something solid underneath. Our API integration team designs both.

Should you build a REST API, an MCP server or both?

Your situationBuildTransport
Only your own apps and partners call your serviceAPI onlyHTTP
Staff want an AI assistant to use internal systemsMCP server over your internal APIRemote Streamable HTTP inside your network, or stdio for developer tools
Your SaaS customers already work in Claude, ChatGPT or CursorBoth: public API plus a remote MCP serverStreamable HTTP with OAuth
You ship a developer tool or CLIMCP server plus CLIstdio locally, Streamable HTTP for teams
You need an AI feature inside your own productYour own agent calling your API (MCP optional)In-process or HTTP
You only need the model to read documentsRetrieval (RAG) first; MCP resources if many hosts need itEither

Rule of thumb: add MCP when an AI host is where your users will meet your product. For internal agents, an MCP server is still useful because the same tools then work in every host your team uses. For a model choosing between retrieval and training, see RAG vs fine-tuning.

What security risks does an MCP server add?

The spec's own principles say "Tools represent arbitrary code execution and must be treated with appropriate caution" and that hosts must get explicit user consent before invoking any tool. The risks below are the ones to design for.

RiskWhat happensMitigation
Prompt injectionOWASP LLM01:2025: "Indirect prompt injections occur when an LLM accepts input from external sources, such as websites or files." A tool result carries instructions the model then followsTreat tool output as data; require confirmation for write and payment tools; limit what each tool can reach
Tool poisoningInvariant Labs showed instructions hidden in tool descriptions, "invisible to users but visible to AI models"Install servers only from sources you trust; review descriptions; pin versions
Token passthroughA server forwards a client's token to a downstream APIForbidden by the spec; validate audience and issue your own downstream credentials
Confused deputyA proxy server with one static client ID lets an attacker skip user consentPer-client consent before the third-party OAuth flow; exact redirect URI matching
SSRFA malicious server points OAuth discovery at internal addressesEnforce HTTPS; block private and link-local ranges; use an egress proxy
Local server compromiseA one-click install runs a malicious startup commandShow the full command before running it; sandbox local servers
State handle hijackingAn attacker guesses another user's cart or workflow handleRandom handles bound to the authenticated user; never treat a handle as authentication
Over-broad scopesA stolen token unlocks everythingMinimal initial scopes; step-up challenges for privileged tools

OpenAI's guide adds a blunt warning for anyone connecting third-party servers: a "malicious server can exfiltrate sensitive data from anything that enters the model's context." Its API asks for approval "before any data is shared with a connector or remote MCP server" by default. Keep that default for anything that writes, pays or deletes.

Who supports MCP?

  • Governance: on 9 December 2025, Anthropic donated MCP to the Agentic AI Foundation, "a directed fund under the Linux Foundation", co-founded by Anthropic, Block and OpenAI. The same post counted "more than 10,000 active public MCP servers" at that date, and said MCP had been adopted by ChatGPT, Cursor, Gemini, Microsoft Copilot and Visual Studio Code.
  • OpenAI: the Responses API connects to remote MCP servers, as quoted above.
  • Google Cloud: on 29 April 2026, Google Cloud said "more than 50 Google-managed Model Context Protocol (MCP) servers are generally available or in preview".

Support is broad, but feature support varies by host and by spec version. Test your server in each host your users rely on, and use server/discover to negotiate versions rather than assuming them.

Case: how does Kenerate AI use MCP and a CLI?

Our flagship build, Kenerate AI, designed and engineered by Elgrith, is an all-in-one AI image and video studio: one app, one login and one credit balance. It also ships an MCP server and a CLI on top of its own product. On kenerateai.com the section is headed "Kenerate inside Claude, ChatGPT and Cursor", and the site says it "Works in 19+ AI apps: Claude, ChatGPT, Cursor, Codex, VS Code, Gemini CLI". It lists 29 tools for AI apps, and sign-in reads "Sign in with Kenerate — no API key needed".

That is the pattern this guide recommends. The product stays the system of record: the same account and credit balance serve the web app and the AI apps. The MCP layer exposes task-shaped tools, and an OAuth sign-in means users never paste an API key into a chat window. A CLI covers scripted and developer workflows that don't need a chat host at all.

How can Elgrith help?

Elgrith has delivered 1,000+ projects for 250+ clients since 2015, from our New Delhi headquarters and client-partnership centers in New York, London and Shanghai. Our AI agent development team designs MCP servers and the agents that call them, our LLM integration team connects models to your data safely, and our API integration team builds the API underneath. Deciding between a conversational bot and an agent? Read AI agent vs chatbot. You own the code and IP, and you get a fixed written quote after a free call. Book a call or start a project.

FAQ

Frequently asked questions

Sources 16 linked

  1. 01Model Context Protocol — Versioning (current version 2026-07-28, read 23 Oct 2026)modelcontextprotocol.io(opens in a new tab)
  2. 02Model Context Protocol — Specification 2026-07-28 overviewmodelcontextprotocol.io(opens in a new tab)
  3. 03Model Context Protocol — 2026-07-28 changelogmodelcontextprotocol.io(opens in a new tab)
  4. 04Model Context Protocol blog — 2026-07-28 release post (28 Jul 2026)blog.modelcontextprotocol.io(opens in a new tab)
  5. 05Model Context Protocol — 2025-11-25 changelogmodelcontextprotocol.io(opens in a new tab)
  6. 06Model Context Protocol — 2025-06-18 changelogmodelcontextprotocol.io(opens in a new tab)
  7. 07Model Context Protocol — 2025-03-26 changelogmodelcontextprotocol.io(opens in a new tab)
  8. 08Model Context Protocol — Transports (2026-07-28)modelcontextprotocol.io(opens in a new tab)
  9. 09Model Context Protocol — Authorization (2026-07-28)modelcontextprotocol.io(opens in a new tab)
  10. 10Model Context Protocol — Security Best Practicesmodelcontextprotocol.io(opens in a new tab)
  11. 11OWASP GenAI — LLM01:2025 Prompt Injectiongenai.owasp.org(opens in a new tab)
  12. 12Invariant Labs — MCP security notification on tool poisoning (1 Apr 2025)invariantlabs.ai(opens in a new tab)
  13. 13Anthropic — Donating MCP and establishing the Agentic AI Foundation (9 Dec 2025)anthropic.com(opens in a new tab)
  14. 14OpenAI — Connectors and MCP servers (read 23 Oct 2026)developers.openai.com(opens in a new tab)
  15. 15Google Cloud — 50+ fully managed MCP servers now available (29 Apr 2026)cloud.google.com(opens in a new tab)
  16. 16Kenerate AI — MCP and CLI (read 23 Oct 2026)kenerateai.com(opens in a new tab)
Elgrith Editorial TeamStrategy, design & SEO · 11 min read

Published

Share
  • #MCP
  • #API integration
  • #AI agents
  • #LLM integration
  • #AI security

Related guides

All guides

Next step

Want this done for you?

Tell us where you want to be in 12 months. We’ll reply within one business day with a plan, a timeline and a fixed quote.

Book a free call

Open

Pick a day. You'll choose a time in your own time zone on the next step.

See all times