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.

Key takeaways
- 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.
- 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).
- 03MCP has two current transports: stdio for local servers and Streamable HTTP for remote ones. HTTP+SSE is deprecated.
- 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.
- 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) API | MCP server | |
|---|---|---|
| Who calls it | Your web app, mobile app, partners and scripts | An AI host such as Claude, ChatGPT, Cursor or VS Code, through its MCP client |
| Who decides what to call | A developer, at build time | The model, at run time, with user consent |
| Discovery | Docs, an OpenAPI file, an SDK | Runtime listing of tools, resources and prompts |
| Schema | Your own endpoint design | JSON Schema for every tool's input and output |
| Message format | HTTP verbs and your JSON | JSON-RPC 2.0 messages |
| Auth | Whatever you chose: API keys, OAuth, sessions | Optional; when used over HTTP, OAuth 2.1 with RFC 9728 and RFC 8707 |
| Transport | HTTP | stdio (local) or Streamable HTTP (remote) |
| State | Your choice | Stateless since 2026-07-28; state travels as explicit handles |
| Where business logic lives | In the API | Still 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 version | Main changes |
|---|---|
| 2025-03-26 | OAuth 2.1 authorization framework; Streamable HTTP replaced HTTP+SSE; JSON-RPC batching added; tool annotations such as read-only or destructive |
| 2025-06-18 | Batching 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-25 | OpenID Connect Discovery; icons; incremental scope consent; URL-mode elicitation; tool calling inside sampling; Client ID Metadata Documents recommended; experimental tasks |
| 2026-07-28 | Sessions, 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?
| Transport | Where the server runs | Typical auth | Good for |
|---|---|---|---|
| stdio | On the user's machine, launched by the host as a local process | Credentials from the environment | Developer tools, file and repo access, CLIs |
| Streamable HTTP | On your infrastructure, reached over HTTPS | OAuth 2.1 | SaaS products, shared company tools, anything multi-user |
| HTTP+SSE | Remote | Varies | Legacy 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 situation | Build | Transport |
|---|---|---|
| Only your own apps and partners call your service | API only | HTTP |
| Staff want an AI assistant to use internal systems | MCP server over your internal API | Remote Streamable HTTP inside your network, or stdio for developer tools |
| Your SaaS customers already work in Claude, ChatGPT or Cursor | Both: public API plus a remote MCP server | Streamable HTTP with OAuth |
| You ship a developer tool or CLI | MCP server plus CLI | stdio locally, Streamable HTTP for teams |
| You need an AI feature inside your own product | Your own agent calling your API (MCP optional) | In-process or HTTP |
| You only need the model to read documents | Retrieval (RAG) first; MCP resources if many hosts need it | Either |
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.
| Risk | What happens | Mitigation |
|---|---|---|
| Prompt injection | OWASP 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 follows | Treat tool output as data; require confirmation for write and payment tools; limit what each tool can reach |
| Tool poisoning | Invariant 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 passthrough | A server forwards a client's token to a downstream API | Forbidden by the spec; validate audience and issue your own downstream credentials |
| Confused deputy | A proxy server with one static client ID lets an attacker skip user consent | Per-client consent before the third-party OAuth flow; exact redirect URI matching |
| SSRF | A malicious server points OAuth discovery at internal addresses | Enforce HTTPS; block private and link-local ranges; use an egress proxy |
| Local server compromise | A one-click install runs a malicious startup command | Show the full command before running it; sandbox local servers |
| State handle hijacking | An attacker guesses another user's cart or workflow handle | Random handles bound to the authenticated user; never treat a handle as authentication |
| Over-broad scopes | A stolen token unlocks everything | Minimal 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
- 01Model Context Protocol — Versioning (current version 2026-07-28, read 23 Oct 2026)modelcontextprotocol.io(opens in a new tab)
- 02Model Context Protocol — Specification 2026-07-28 overviewmodelcontextprotocol.io(opens in a new tab)
- 03Model Context Protocol — 2026-07-28 changelogmodelcontextprotocol.io(opens in a new tab)
- 04Model Context Protocol blog — 2026-07-28 release post (28 Jul 2026)blog.modelcontextprotocol.io(opens in a new tab)
- 05Model Context Protocol — 2025-11-25 changelogmodelcontextprotocol.io(opens in a new tab)
- 06Model Context Protocol — 2025-06-18 changelogmodelcontextprotocol.io(opens in a new tab)
- 07Model Context Protocol — 2025-03-26 changelogmodelcontextprotocol.io(opens in a new tab)
- 08Model Context Protocol — Transports (2026-07-28)modelcontextprotocol.io(opens in a new tab)
- 09Model Context Protocol — Authorization (2026-07-28)modelcontextprotocol.io(opens in a new tab)
- 10Model Context Protocol — Security Best Practicesmodelcontextprotocol.io(opens in a new tab)
- 11OWASP GenAI — LLM01:2025 Prompt Injectiongenai.owasp.org(opens in a new tab)
- 12Invariant Labs — MCP security notification on tool poisoning (1 Apr 2025)invariantlabs.ai(opens in a new tab)
- 13Anthropic — Donating MCP and establishing the Agentic AI Foundation (9 Dec 2025)anthropic.com(opens in a new tab)
- 14OpenAI — Connectors and MCP servers (read 23 Oct 2026)developers.openai.com(opens in a new tab)
- 15Google Cloud — 50+ fully managed MCP servers now available (29 Apr 2026)cloud.google.com(opens in a new tab)
- 16Kenerate AI — MCP and CLI (read 23 Oct 2026)kenerateai.com(opens in a new tab)
