Comparison
MCP vs function calling vs a plain API
The same tool call wired three ways, compared on who defines, runs and reuses it, and which to pick.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkOn this page
A separate program that publishes tools over the Model Context Protocol so any MCP host can discover and call them.
Tool definitions you send in each model API request; the model returns a structured call and your code runs it.
Plain API client
Your code calls an HTTP API directly at a fixed point in the program, with no model choosing when or how.
| MCP server | Function calling | Plain API client | |
|---|---|---|---|
| Who describes the tool | The server, in tools/list with a JSON Schema | You, in the request's tools parameter | The API's docs or OpenAPI file, for developers |
| Who decides to call it | The model, through the host, with user consent | The model, inside your application | Your code, every time it runs |
| Where the code runs | In the server: a local process or a remote HTTP service | In your application | In your application |
| Wire format | JSON-RPC 2.0 over stdio or Streamable HTTP | The model provider's request and response format | Whatever the API defines, usually HTTP and JSON |
| Reuse across apps | Any MCP host: coding agents, chat apps, your own client | Per application, and per provider's schema format | Any program that can make the HTTP call |
| Strongest at | One integration shared by many AI clients | A few tools specific to one product | Steps that must always happen the same way |
MCP, function calling and a plain API client can all end in the same HTTP request to the same system; they differ in who decides to make it and who can reuse the wiring. Use function calling for a handful of tools inside one application you control, an MCP server when the same tools should work in several AI clients (Claude Code, Cursor, ChatGPT, your own agent), and a plain API call when no model needs to choose. Reuse and control usually decide.
Pick an MCP server when
The same capability should be available in more than one AI client, or to people who will never touch your code. An MCP server publishes its tools with a name, a description and an inputSchema; any MCP host lists them with tools/list and calls them with tools/call, so you write the integration once. The protocol also carries resources and prompts, can tell clients when the tool list changes, and runs locally over stdio or remotely over Streamable HTTP. The 2026-07-28 specification made requests stateless, so a server that needs state across calls returns an explicit handle instead.
The catch is one more moving part: a process to run, version and secure, and a tool description that the host passes to the model. The spec tells hosts to get explicit consent before invoking a tool and to treat tool annotations as untrusted unless the server is trusted. See what MCP is for hosts, clients and servers, and the Model Context Protocol tool page for clients and SDKs.
Pick function calling when
You are building one application and the tools belong to it. You send each tool’s name, description and JSON Schema with the request, the model replies with a structured call (tool_use in Claude’s API, function_call in OpenAI’s), your code runs it and sends back the result. Nothing else to deploy, and your code sees every call before anything happens, which makes it the natural place for validation and approval.
The catch is that the definitions live in your code and in one provider’s format. Switching providers or sharing the tools with another app means rewriting the wiring. Tool calling in the glossary has the short definition, and build your first agent in Python writes the loop by hand.
Pick a plain API client when
The step should happen every time, in a fixed order, with fixed arguments: fetch the order, then send the receipt. A model adds latency, cost and a chance of choosing wrongly, and buys you nothing when the decision is not open. Call the API from your code, describe it with an OpenAPI document if others need it, and keep the model for the parts that need judgement, such as summarising the order. Many good agents are mostly plain code with one or two model calls.
The same tool call, three ways
Take a get_weather(location) tool:
- As an MCP server, the server returns
get_weatherwith itsinputSchemafromtools/list. The host shows it to the model, the model asks for it, the host callstools/calland passes the result back. The host and the model can change; the server does not. - With function calling, your request includes
get_weatherintools. The model returns a call with{"location": "Paris"}, your code calls the weather API and returns the result in the next request. - As a plain API client, your code calls the weather API whenever the page loads. No tool definition, no model.
In every case the weather API gets the same HTTP request. The difference is who decides to send it and how many applications can use your wiring.
When model APIs speak MCP for you
Both large model APIs now accept remote MCP servers directly, which blurs the line:
- Claude’s MCP connector takes
mcp_serversin a Messages API request, in beta on 21 November 2026. It supports only MCP tool calls, not resources or prompts, and the server must be publicly reachable over HTTP; local stdio servers need your own MCP client. - OpenAI’s Responses API has an
mcptool type for servers on Streamable HTTP or HTTP/SSE, asks for approval before data goes to a server by default, and offers a tunnel for private servers.
This is still function calling from your application’s point of view, with the provider acting as the MCP client. It suits a server you already have; it does not remove the need to trust that server.
Security and approval
- An MCP server’s tool descriptions reach the model, so a malicious or compromised server can steer it. Hosts should show which tools are exposed and ask before calls; the MCP security risks article covers tool poisoning and token handling.
- With function calling, your code is the gate. Validate arguments against the schema (Claude and OpenAI both offer a
strictoption) and confirm destructive actions with the user. - A plain API call carries only the risks of the code around it.
Before you commit
- List who will use the capability. One app points to function calling; several AI clients point to MCP.
- Write down which calls change data. Those need an approval step whichever route you take.
- Check where the server must run. Local files and desktop apps suit stdio; shared services need Streamable HTTP and MCP authorization.
- If you choose MCP, start small: build an MCP server for an internal API with two read-only tools, then add it to your agent.
If the real question is whether to teach an agent a procedure or give it access to a system, read Agent Skills vs MCP. If the other side is another agent rather than a tool, see MCP vs A2A.
Check your understanding
MCP vs function calling vs a plain API quiz
When to use an MCP server, function calling or a plain API client, hosted MCP in model APIs, and where approval belongs.
7 questions · pass mark 70%
Review
Checked against
Related
- MCP explained: hosts, clients, servers and transports
What MCP is and how the Model Context Protocol connects AI apps to tools and data: hosts, clients, servers, transports and what the 2026-07-28 spec changed.
- Agent Skills vs MCP servers
When to package know-how as a skill and when to connect a system through MCP, compared on format, loading, security and upkeep.
- Build your first agent in Python
Three tools, a hard turn limit, a clear stop condition and a log of every tool call it makes.
- Build an MCP server for an internal API
Two read-only tools, tested in MCP Inspector and called from Claude Code, Codex or Cursor.
- MCP security: tool poisoning, token scope and the lethal trifecta
The real attacks on MCP setups, from tool poisoning and rug pulls to token passthrough and the lethal trifecta, what hosts do about them, and a checklist.