Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

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.

By Checked
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page
  • MCP server

    A separate program that publishes tools over the Model Context Protocol so any MCP host can discover and call them.

  • Function calling

    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 vs function calling vs a plain API: summary
MCP serverFunction callingPlain API client
Who describes the toolThe server, in tools/list with a JSON SchemaYou, in the request's tools parameterThe API's docs or OpenAPI file, for developers
Who decides to call itThe model, through the host, with user consentThe model, inside your applicationYour code, every time it runs
Where the code runsIn the server: a local process or a remote HTTP serviceIn your applicationIn your application
Wire formatJSON-RPC 2.0 over stdio or Streamable HTTPThe model provider's request and response formatWhatever the API defines, usually HTTP and JSON
Reuse across appsAny MCP host: coding agents, chat apps, your own clientPer application, and per provider's schema formatAny program that can make the HTTP call
Strongest atOne integration shared by many AI clientsA few tools specific to one productSteps 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_weather with its inputSchema from tools/list. The host shows it to the model, the model asks for it, the host calls tools/call and passes the result back. The host and the model can change; the server does not.
  • With function calling, your request includes get_weather in tools. 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_servers in 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 mcp tool 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 strict option) 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%

Question 1 of 70 answered
  1. Your team wants the same ticket-lookup tool to work in Claude Code, Cursor and an internal agent. Which wiring fits best?

Checked against

Back to top