Sonith Manakkat

Claude AI, part 10 of 1211 min read13 visuals

MCP vs API: what is the difference, and when do you need which

A picture-led comparison of the Model Context Protocol and ordinary APIs: who calls whom, how tools are discovered, why they are partners rather than rivals, the security picture, and how to try an MCP server safely in Claude Code.

  • An API is a menu for one kitchen
  • MCP is one standard way for an AI to ask any kitchen
  • They are partners, because an MCP server usually wraps an API
  • Treat every MCP server as code you are choosing to trust

Share on LinkedIn

Share
Reading level

You will hear two similar-sounding terms around AI tools: MCP and API. People often ask which one to use, as if they were competitors. They are not. This article draws the difference, shows how they fit together, and ends with one safe first step you can try. Facts come from the official MCP documentation and Claude Code documentation, checked on 2026-10-21 and listed at the end. Where something is my own view or analogy, it is labelled.

MCP: one standard way inAI appMCPstandardServer AFilesServer BDatabaseServer CCodeAPI: a menu for each kitchenWeb / appAPIgatewayService AFilesService BDatabaseService CCodeEither way, the same three systems sit at the end of the line.
The same three systems, reached two ways. Top: an AI app uses one standard protocol. Bottom: an app calls services through a gateway. My own drawing.

The USB-C idea

The official MCP introduction describes MCP as an open-source standard for connecting AI applications to external systems, and offers a comparison: think of MCP like a USB-C port for AI applications. Just as USB-C gives electronic devices one standard way to connect, MCP gives AI applications one standard way to reach files, databases, search engines and other tools.

Before a standard port

  • A different cable for every gadget
  • Each pairing is built separately

With a standard port

  • One kind of socket on the device
  • Any gadget that fits can connect
The cable analogy (the port comparison is from the official introduction).

The waiter and the menu

  1. The AI app is the dinerIt wants something done
  2. The MCP client is the waiterOne waiter, one standard way of asking
  3. The server lists what is on offerTools, resources and prompts
  4. The kitchen does the workOften by calling its own API
One order, told as a restaurant story.

Who is the caller, and how are tools found

With a normal API, a developer reads the documentation, writes code that calls specific addresses, and hard-codes the details. With MCP, an AI application connects to a server and asks it what it offers, and the model decides during the conversation whether to use something.

Ordinary API

  • A developer reads the documentation
  • Calls are written into the code ahead of time

MCP

  • The client asks the server for its tools
  • The model picks a tool as the conversation needs it
Discovery: reading docs versus asking the server.

One request in each world

  1. The app sends an HTTP requestOften REST with JSON
  2. The gateway checks itSign-in, limits, routing
  3. A service does the workThen sends back JSON
  4. The developer's code uses itExactly as it was programmed
A request through an API (a developer wrote every step).
  1. You ask Claude somethingIn an AI application
  2. The client already listed the toolsFrom each connected server
  3. The model asks to use oneYou may be asked to approve
  4. The server runs it and repliesThe result goes back into the chat
A request through MCP (the model chooses during the chat).
YouClaudeMCP serverList toolsTool namesAskPick a toolApprove?Yes or noCall the toolResultAnswer123456789
  1. Claude to MCP server When it connects, the client sends a tools list request.
  2. MCP server to Claude (reply) The server describes the tools it offers.
  3. You to Claude You ask for something one of the tools can do.
  4. Claude (to itself) The model chooses a tool that fits the request.
  5. Claude to You You may be asked first. The specification says a human should be able to deny tool calls.
  6. You to Claude (reply) If you decline, the call does not happen.
  7. Claude to MCP server The client sends a tools call request.
  8. MCP server to Claude (reply) The server runs it, often through its own API, and replies.
  9. Claude to You (reply) The result goes back into the chat and Claude writes the reply.

Takeaway. The model proposes, a human can veto, and the server does the work.

One MCP tool call from start to answer. The approval step follows the specification's human-in-the-loop guidance.

Partners, not rivals

AI applicationthe part you talk toMCP client and serverthe standard conversationThe API behind itthe existing doorway to the systemThe system itselffiles, records, code
Typical stacking: MCP sits in front, the API sits behind.

Why a shared standard helps, as simple arithmetic:

  • 12Custom links: 3 AI apps times 4 tools
  • 7With a standard: 3 apps plus 4 servers
An illustration with made-up round numbers, not a statistic.

The official introduction summarises the benefit as "build once and integrate everywhere". The numbers above only show the shape of the idea.

How it compares

AspectAPIMCP
PurposeLet software call other softwareLet AI applications use tools and data in a standard way
Typical callerA developer's programAn AI application, on behalf of the model
DiscoveryRead documentation, write codeAsk the server what it offers
Message formatVaries: REST with JSON is commonJSON-RPC 2.0
Where it runsOver the network, usually HTTPLocally over stdio, or remotely over Streamable HTTP
StateVaries by designThe current MCP revision is described as stateless
Sign-inAPI keys, tokens, OAuthOptional; OAuth-based for HTTP servers, environment credentials for local ones
Best forAnything that is not an AI clientGiving AI applications a reusable connection
DrawbackEach integration is custom workEvery server you add is more code and more trust

Safety: the part not to skip

  • PermissionsGive each server only the access it needs
  • Approval promptsThe specification says a human should be able to deny tool calls
  • Prompt injectionText a tool fetches can contain instructions meant to trick the model
  • TrustA server is code or a service you choose to run or talk to
The security picture, in plain words.

Which should I use?

  1. Is an AI application the one calling?If not, a normal API is the answer
  2. Does a trusted MCP server already exist?Use it before building your own
  3. Do you need a custom connection?Build a small server that wraps your API
  4. Start read-only and smallAdd write access later, with approval on
A short decision path (my own rule of thumb).
  1. 1Should everyone on the project get it through version control?Yes Project scope, stored in .mcp.json. Claude Code asks each person for approval before using it.No keep going
  2. 2Do you want it in all your own projects, private to you?Yes User scope.No keep going
  3. 3OtherwiseLocal scope, the default: only in this project, private to you. Best for trying a server out.

Takeaway. Start with local scope, and widen it only once you trust the server.

Where to save an MCP server in Claude Code, from the three documented scopes.

Try it: one safe first step

Expert viewHow the messages work

MCP uses JSON-RPC 2.0 for its messages, in two layers: a data layer that defines the messages and primitives, and a transport layer that carries them. The standard transports are stdio (a client-launched subprocess, usually serving one client) and Streamable HTTP (HTTP POST with optional streaming, usually serving many). Claude Code's documentation marks the older SSE transport as deprecated. A client lists tools with a tools list request and runs one with a tools call request. In the current revision (2026-07-28), the protocol is stateless: each request carries the protocol version and capabilities, and a discover request lets a client learn a server's capabilities before anything else. Earlier revisions used an initialize handshake, so older servers behave differently.

Expert viewSign-in and remote servers

Authorization is optional in MCP. For HTTP-based transports, the specification describes an OAuth 2.1 based flow, with the server acting as a resource server, and it says to use scopes that follow least privilege. For stdio servers, it says implementations should not follow that flow and should retrieve credentials from the environment instead. In Claude Code, you complete a remote server's sign-in with the /mcp command, and the documentation says tokens are stored securely and refreshed automatically.

Expert viewContext cost and scale

Every tool definition takes space in the model's context. Claude Code's documentation says tool search is enabled by default for MCP tools: only tool names and server instructions load at session start, and full definitions are fetched when Claude needs them, so extra servers have minimal effect on context. Skills follow a similar load-on-demand idea; see Skills explained and Context explained. Tool output size is also limited: Claude Code warns when an MCP tool result exceeds 10,000 tokens and caps it at 25,000 by default.

Expert viewTrust, supply chain and sharing

A local server is a program you download and run, so it carries ordinary software supply-chain risks: a malicious startup command, a malicious package, or an insecure local service. The official guidance recommends consent dialogs that show the exact command, sandboxing and minimal privileges, and for servers meant to run locally, the stdio transport so only the client can reach them. In Claude Code, servers can be saved at local, project or user scope; project scope writes a .mcp.json file that can be shared through version control, and Claude Code asks for approval before using project-scoped servers. For team use, see Reuse context and share it with your team.

An API is the doorway to one building. MCP is a standard way for an AI to knock on any door.

Frequently asked questions

Does MCP replace APIs?

No. MCP is a standard way for AI applications to connect, and many servers call ordinary APIs behind the scenes.

Do I need MCP to use Claude?

No. Claude works without it. MCP is for connecting Claude to your own tools and data.

Is every MCP server safe?

No. Treat each server like software you are choosing to trust, and review what it can do.

Is this the same as Skills?

No. Skills package instructions and know-how for Claude; MCP connects Claude to outside systems. They can be used together.

Sources

Last checked: 2026-10-21. These are official pages. Check them for anything that may have changed since.

  1. What is MCP
  2. MCP architecture overview
  3. MCP specification: transports
  4. MCP specification: authorization
  5. MCP specification: tools
  6. MCP security best practices
  7. Claude Code: connect to tools via MCP
  8. Claude Code: security

Back to all articles