Announcing CIMD support for MCP Client registration
Learn more

MCP vs API: How They Differ for AI Agents and When to Use Each

MCP vs API diagram: an agent calls Google's Gmail MCP server, which wraps the Gmail REST API, while your code calls the API directly to send mail
Hrishikesh Premkumar
Founding Architect

MCP (Model Context Protocol) is an open protocol that lets an AI agent discover and call tools through one standard interface. An API is the interface a service exposes to other software, such as the Slack Web API. An MCP server usually sits on top of an API. Use MCP when a model picks tools at runtime, and call the API directly when your code already knows the call.

For agents, the differences that matter are tool discovery, per-user credentials, transport, state and rate limits. The two are layers: an MCP server such as Slack's calls Slack's API for the agent, and production MCP integrations often use both. The video below gives a short overview.

TL;DR

  • MCP standardizes how an agent finds and calls tools (tools/list and tools/call over JSON-RPC). An API is each vendor's own interface. An MCP server usually exposes part of that API: Google's Gmail MCP server lists 23 tools, and none of them sends mail.
  • The MCP spec defines an optional OAuth 2.1 sign-in for remote servers, with metadata discovery, though vendors add their own rules. Direct API calls use each vendor's own scheme. A product with many users needs one credential per user on either path.
  • Use MCP where the model chooses the tool, and the API for known calls, webhooks, bulk jobs and anything the server leaves out. Many production agents use both.

MCP essentials: what each one is

An API (application programming interface) is the contract a service publishes for other software: endpoints, parameters, authentication and limits. REST over HTTP is the most common style, and GraphQL and gRPC are others. Many REST APIs also publish an OpenAPI document, a machine-readable description of every endpoint. Developers read it or generate a client from it.

MCP is an open protocol for connecting AI applications to external systems, and its own documentation compares it to a USB-C port for AI applications. It uses JSON-RPC 2.0 messages between a host (the AI application), the clients inside it and servers. Servers offer tools for the model to call, resources for context and prompts for users. The current revision of the specification is dated 2026-07-28.

The two usually stack. Each tool on an MCP server is a handler, and the handler typically calls the vendor's API. Google's Gmail MCP server is a clear example. Its tools/list returns 23 tools for searching, reading, labeling, trashing and drafting mail, and none of them sends a message. Sending stays on the Gmail API's users.messages.send method. An MCP server exposes the parts of an API that its author chose for agents.

MCP vs API comparison

MCP vs REST API, side by side: a remote MCP server compared with a REST API your code calls directly.

Aspect
MCP (remote server)
REST API (called directly)
Who chooses the call
The model, from the tools the server lists at runtime
Your code, written against the API's documentation
Tool discovery
tools/list returns each tool's name, description and input schema; servers can notify clients when the list changes
Docs or an OpenAPI file, read at build time; a new endpoint needs a code change
Interface
One protocol for every server; each server still defines its own tools
Each API has its own endpoints, payloads, pagination and errors
Authentication
Optional in the spec; over HTTP, OAuth 2.1 with protected resource metadata, and tokens must be issued for that server
Each vendor's own scheme: API keys, OAuth 2.0, app installation tokens
Per-user credentials
One token per user per server
One credential per user per API
Transport
stdio for local servers, Streamable HTTP for remote ones
HTTP request and response
State
No protocol session since the 2026-07-28 revision (earlier revisions open one with initialize); cross-call state travels in server-minted handles
Stateless by design; state lives in resources and IDs
Rate limits
Set by each server; the spec requires servers to rate limit tool calls
Published per API, often with headers such as x-ratelimit-remaining
Coverage
The subset the vendor chose for agents
The full surface, including webhooks and bulk endpoints
Best fit
Agents and assistants where the model picks tools
Known, repeatable calls, background jobs and high volume

Core technical differences for agents

Protocol standardization

Each API has its own style, whether REST, GraphQL, SOAP or gRPC, plus its own auth scheme and error format. MCP standardizes the messages. Every server speaks JSON-RPC 2.0, lists tools the same way and returns results in the same shape, so one client works with any server on a revision it supports. What the tools do is still up to each server: Slack's and GitHub's differ in names, arguments and coverage.

Dynamic tool discovery

A client calls tools/list and gets each tool's name, description and inputSchema, a JSON Schema for its arguments. When the list changes, a server that declares listChanged notifies clients that subscribed through subscriptions/listen, so a new tool can appear without a client release. The tools specification also lets the list vary with the authorization on the request, for example showing only the tools a user's granted scopes allow.

APIs have machine-readable descriptions too. The difference is when they are read: an OpenAPI file is usually consumed at build time to generate a client, while an MCP tool list is fetched by the running agent.

Discovery has a cost, because every tool definition goes into the model's context. The MCP project's client best practices recommend loading tools on demand once definitions pass a small share of the context window, such as 1 to 5 percent. In Scalekit's benchmark of GitHub tasks, the MCP agent used 4 to 32 times more tokens than a CLI agent, mostly from 43 tool schemas loaded on every run (MCP vs CLI). Give each agent only the tools it needs.

Authentication and per-user credentials

For HTTP servers, the MCP authorization specification builds on OAuth 2.1. The server publishes protected resource metadata (RFC 9728), linked from its 401 response or served at a well-known URL, and the client finds the authorization server there. The client names the MCP server in a resource parameter (RFC 8707). The server must accept only tokens issued for itself, and must not pass a client's token through to the upstream API it calls. For client registration, the 2026-07-28 revision prefers pre-registration and Client ID Metadata Documents and deprecates Dynamic Client Registration. Authorization itself is optional, and stdio servers should skip it and read credentials from the environment. The MCP authorization guide covers each step.

Vendors still differ in the details. Linear's server supports dynamic client registration and also accepts a Linear API key, while Slack's requires a registered Slack app and does not support dynamic registration. A direct API call has no shared discovery step at all: you implement each vendor's scheme, whether an API key, an OAuth 2.0 flow or a GitHub App installation token.

For a product with many users, both paths end in the same place: one credential per user, stored, refreshed and revocable for that user alone. MCP standardizes how a client gets a token. It does not store tokens for your users. Per-user OAuth for MCP integrations covers the designs, and a test that proves one user's session cannot return another user's data.

Transport

MCP defines two standard transports. With stdio, the client launches the server as a subprocess and exchanges newline-delimited JSON-RPC messages over standard input and output. With Streamable HTTP, each message is an HTTP POST to one endpoint, and the reply comes back as JSON or as an event stream for that request. The older HTTP+SSE transport is deprecated. A REST API uses plain HTTP, with a URL per resource. Remote vs local (stdio) MCP servers explains when each fits.

Context management and state

Up to the 2025-11-25 revision, an MCP client opened a session with an initialize handshake, and HTTP servers could assign an Mcp-Session-Id. The 2026-07-28 revision removed both. Every request now carries its protocol version and client capabilities in _meta. A server that needs state across calls mints a handle, such as a cart or workflow ID, and receives it back as an ordinary tool argument.

Servers on 2025-11-25 or an earlier revision still expect the handshake: Notion's client guide, for example, still describes an initialize request that may return an Mcp-Session-Id. The spec lets one implementation support both eras, and the MCP Python SDK's Client, used below, probes with server/discover and falls back to initialize on older servers.

At the protocol level, then, MCP now matches REST: each request stands alone, and the conversation history an agent relies on lives in the host application and the model's context. The MCP security best practices warn about handle hijacking, where someone who obtains another user's handle acts on that user's state, so bind each handle to the user who created it. Scalekit's Virtual MCP servers keep no session either: tools/list and tools/call work without an initialize call, and the server sends no Mcp-Session-Id.

Rate limits and errors

APIs publish their limits and report where you stand. GitHub's REST API allows 5,000 requests per hour for a user's token and 15,000 for a GitHub App owned by an Enterprise Cloud organization, and returns x-ratelimit-remaining and x-ratelimit-reset on each response.

The MCP spec requires servers to rate limit tool invocations and leaves the numbers to each server. Many inherit the underlying API's limits: Slack applies the same rate limits to its MCP tools as to the matching Web API methods. An agent can reach those limits sooner than hand-written code, because the model decides how often to call a tool.

Errors also have a different reader. A REST error goes to your code. An MCP tool error comes back as a result with isError: true, and the spec says clients should pass it to the model so it can fix its arguments and try again.

Developer considerations

API development

Building on an API gives you control. You choose the endpoints, handle pagination, retries and versioning, and can generate a typed client from an OpenAPI file. The cost is repeated work: each new service brings its own auth, data model and failure modes, and its breaking changes land in your code.

MCP development

With MCP, one client talks to every server, and a server publishes its tools once for every MCP client, from Claude and Cursor to your own agent. Vendors maintain their official servers, so new tools arrive without a release on your side. In exchange you get less control: the tools the vendor chose and per-call overhead from definitions in context. Reliability depends on the server too. In the same benchmark, 7 of 25 MCP runs failed with connection timeouts to GitHub's server, while every CLI run completed.

To offer your own API to agents, put an MCP server in front of it. Should you wrap MCP around your existing API? covers the design choices.

Code comparison

Both snippets list a user's Slack channels. The first calls the Slack Web API directly. Your code names the method, sends the user's token (from SLACK_TOKEN) and parses the response.

import os import requests # Your code picks the endpoint, the credential and the fields. resp = requests.post( "https://slack.com/api/conversations.list", headers={"Authorization": f"Bearer {os.environ['SLACK_TOKEN']}"}, data={"types": "public_channel", "limit": 20}, timeout=10, ) data = resp.json() if not data["ok"]: raise RuntimeError(data["error"]) for channel in data["channels"]: print(channel["name"])

The second connects to an MCP server over Streamable HTTP with the MCP Python SDK (pip install mcp), lists the tools and calls one. In an agent, you pass the tool list to the model and run the call it returns. Set MCP_SERVER_URL to the server's URL and MCP_TOKEN to an access token for the user; the tool name comes from that server's list.

import asyncio import os import httpx2 from mcp import Client from mcp.client.streamable_http import streamable_http_client URL = os.environ["MCP_SERVER_URL"] TOKEN = os.environ["MCP_TOKEN"] async def main(): headers = {"Authorization": f"Bearer {TOKEN}"} async with httpx2.AsyncClient(headers=headers, timeout=30) as http: transport = streamable_http_client(URL, http_client=http) async with Client(transport) as mcp: # The server says what it offers, at runtime. listing = await mcp.list_tools() for tool in listing.tools: print(tool.name, "-", (tool.description or "")[:60]) # In an agent, the model picks the tool and the arguments. result = await mcp.call_tool( "slack_list_channels", {"limit": 20} ) print("failed" if result.is_error else result.content[0].text) asyncio.run(main())

The MCP version never names a Slack endpoint, and apart from the tool name the same client code works against any other server. The token still belongs to one user.

Dynamic discovery in practice

Discovery pays off when the tool set is open-ended, as in a coding assistant that connects to whatever servers a developer adds. A nightly sync that always calls the same three endpoints gains nothing from it.

Discovery also moves trust onto the server. The spec says clients must treat tool annotations as untrusted unless the server is trusted, and that a human should be able to deny tool calls. Vet third-party MCP servers before you connect them, and keep approval on for tools that write.

Official remote MCP servers in 2026

Many SaaS vendors now run their own remote MCP server. Each wraps part of the vendor's API, and each signs users in its own way. Each guide shows what the server covers and where you still need the API.

App guide
Official server URL
How clients sign in
api.githubcopilot.com/mcp/
OAuth, or a personal access token as a bearer token
mcp.slack.com/mcp
Confidential OAuth through a registered Slack app
mcp.notion.com/mcp
OAuth with PKCE
mcp.linear.app/mcp
OAuth 2.1 with dynamic client registration, or an API key
gmailmcp.googleapis.com/mcp/v1
Google OAuth 2.0; in Developer Preview
mcp.hubspot.com
OAuth with PKCE through an MCP connector
mcp.stripe.com
OAuth, or an agent API key as a bearer token
mcp.atlassian.com/v2/mcp
OAuth 2.1, or an API token if an org admin enables it

Where to use APIs, and where MCP makes sense

Call the API directly when:

  • The call is known in advance, as in syncs, reports, webhook handlers and scheduled jobs. Code is cheaper, faster and deterministic.
  • You need something the MCP server does not expose, such as sending Gmail messages, event subscriptions, bulk endpoints or admin operations.
  • Volume is high or latency matters, and tool definitions in every model call add up.
  • The job runs with no user present and the vendor's server only supports interactive sign-in.

Use MCP when:

  • A model decides which tool to call, and the set of tools may change.
  • One integration should work across clients such as Claude, ChatGPT, Cursor, VS Code and your own agent.
  • The vendor's official server covers what the agent needs, and you would rather not maintain the integration yourself.
  • Your users bring their own tools to your agent.

Not everyone expects MCP to last as a separate layer. In a 2025 Hacker News thread, one commenter called it "an indirection layer to the actual APIs" whose value depends on adoption. For one developer automating their own work, a CLI or a direct API call is often cheaper, as Scalekit's benchmark found. For a product acting for many customers' users, a standard way to discover tools and sign each user in is usually worth the overhead.

How MCP and APIs work together

In a typical stack, the agent speaks MCP and the MCP server speaks to the API:

  1. The agent's MCP client lists the tools and calls them with a token for the current user.
  2. The MCP server checks the token, turns each tool call into one or more API requests and returns the result.
  3. The API enforces the user's permissions and its own rate limits.

Your product sits around that loop. Webhooks, backfills and scheduled jobs usually call the API directly. Tie both paths to the same per-user connection, so that revoking a user's access in one place stops both. The tokens themselves differ: a spec-compliant MCP server accepts only tokens issued for it, and the API needs its own.

Scalekit's AgentKit is an MCP gateway built for this shape, with 600+ connectors and 30,000+ tools. Each user connects their apps once, and Scalekit stores and refreshes their tokens. A Virtual MCP server is one URL that all your users share, exposing only the tools you choose. Before each run you mint a session token bound to one user and one server; it lasts one hour by default (60 seconds to 24 hours) and is minted again rather than refreshed. For endpoints no tool covers, the API proxy calls the app as the same user. Both paths, from one connected account:

import os from datetime import timedelta from scalekit import ScalekitClient actions = ScalekitClient( env_url=os.environ["SCALEKIT_ENVIRONMENT_URL"], client_id=os.environ["SCALEKIT_CLIENT_ID"], client_secret=os.environ["SCALEKIT_CLIENT_SECRET"], ).actions user_id = "user_123" # your app's ID for this user # MCP path: a session token for one user on one Virtual MCP server. session = actions.mcp.create_session_token( mcp_config_id=os.environ["MCP_SERVER_ID"], identifier=user_id, expiry=timedelta(hours=1), ) # Give the agent's MCP client the server URL and session.token. # API path: call an endpoint no tool covers, as the same user. resp = actions.request( connection_name="slack", identifier=user_id, method="GET", path="/api/team.profile.get", ) print(resp.status_code, resp.json().get("ok"))

You can try this on a free account: sign up for Scalekit, or book a call to plan a rollout with the team.

Key takeaways

Three questions decide most MCP vs API choices:

  • Who picks the call? If the model does, expose tools over MCP. If your code does, call the API.
  • Does the vendor's MCP server cover the job? Compare its tool list with the API, and keep anything missing on the API.
  • Whose credentials does each call use? For many users, plan per-user tokens from the start, on both paths.

FAQs

Is MCP an API?

MCP is a protocol, and an MCP server exposes an interface of its own: JSON-RPC methods such as tools/list and tools/call. That interface is the same on every server and is written to be read by a model. MCP servers for SaaS apps usually call the vendor's REST API underneath.

What is the difference between MCP and a REST API?

A REST API exposes resources at URLs, and your code decides which endpoint to call. MCP exposes tools through one protocol, and the agent discovers them at runtime and lets the model choose. Remote MCP servers also run over HTTP, the current MCP revision has no protocol session, and the MCP spec adds an optional OAuth 2.1 sign-in for remote servers.

Will MCP replace APIs?

No. MCP servers are usually built on APIs and expose a subset of them, so the API remains the source of truth for webhooks, bulk work and everything the server leaves out. MCP adds a standard layer for agents on top.

How do I convert an API to MCP?

Write an MCP server with an official MCP SDK, and give it a small set of task-shaped tools whose handlers call your API. Write the tool descriptions for a model, mark read-only tools, and add OAuth if the server is remote.

Can an AI agent call an API directly?

Yes. Model APIs support tool calling, so you can describe an endpoint as a tool and run the call your code gets back. You then write and maintain each tool's schema and auth yourself, which MCP moves into a server any client can reuse.

Is MCP stateful?

Not at the protocol level in the current revision. The 2026-07-28 specification removed the initialize handshake and the Mcp-Session-Id header, so every request carries its own version and capabilities. A server that needs state across calls returns a handle that the client passes back as a tool argument. Servers on 2025-11-25 or earlier still use initialize, and one server can support both.

How does MCP authentication differ from API authentication?

The MCP spec defines one optional OAuth 2.1 profile with metadata discovery, so one client implementation can find out how to sign a user in to any remote server that follows it. APIs each define their own scheme, from API keys to OAuth 2.0 to app installation tokens. Either way, a product with many users needs one credential per user.

Details checked October 2026.

No items found.
Agent
Auth Quickstart
On this page
Share this article
Scalekit
Find us on ProductHunt

Acquire enterprise customers with
‍zero upfront cost.

Every feature unlocked. No hidden fees.