Explainers

MCP vs function calling vs APIs: when to use which

Function calling lets a model pick a tool, MCP puts tools in a server any app can use, plain APIs need no model. What each looks like and how to pick.

Bogdan Carbune

Bogdan Carbune

8 min read

Three paper envelopes in a row: one tied by a single thread to a small toolbox, one fanning out threads to five toolboxes, and one sealed with no thread at all

Function calling is a model feature: you describe a few tools in your API request, the model answers with a structured call, and your own code runs it. MCP is a protocol one layer up: tools live in a server that any MCP app can discover and call, and the app still uses function calling to show those tools to the model. A plain API call is code you write where no model decides anything. So the choice is rarely either-or. Use a plain API call when the steps are fixed, use function calling when a handful of tools belong to one app you own, and use MCP when the same tools should work in several apps or someone else maintains them. The rest of this guide shows what each looks like on the wire, what each costs you, and how to pick.

What is function calling?

Function calling, which Anthropic calls tool use, is how a model asks your program to do something. Anthropic's tool use overview(checked November 2026) puts it this way: "Tool use (also called function calling) lets Claude call functions that you define or that Anthropic provides." The model picks the tool "based on the user's request and the tool's description", then returns "a structured call that your application runs".

OpenAI's function calling guide (checked November 2026) lays out the same loop in five steps:

  1. "Make a request to the model with tools it could call"
  2. "Receive a tool call from the model"
  3. "Execute code on the application side with input from the tool call"
  4. "Make a second request to the model with the tool output"
  5. "Receive a final response from the model (or more tool calls)"

The tool itself is a name, a description and a JSON Schema for the inputs. This is the example from Anthropic's overview, sent in the tools array of every request:

a Claude API tool definition
{
  "name": "get_weather",
  "description": "Get the current weather for a given location.",
  "input_schema": {
    "type": "object",
    "properties": {
      "location": {
        "type": "string",
        "description": "City and state, e.g. San Francisco, CA"
      }
    },
    "required": ["location"]
  }
}

OpenAI's version has the same parts under slightly different names: a type that is always function, plus name, description, parameters (the JSON Schema) and an optional strictflag. Two things to notice. The definition lives inside your app's request, and the code that does the work lives inside your app too. The model never touches the weather API. Your code does, and then hands the answer back.

What is MCP, and how does it relate to function calling?

MCP moves the tool out of your app and into a server. The MCP spec's tools page(checked November 2026) says the protocol "allows servers to expose tools that can be invoked by language models." An app connected to the server asks for the list with a tools/list request and gets back definitions that look almost exactly like the one above:

the same tool, as an MCP server lists it
{
  "name": "get_weather",
  "title": "Weather Information Provider",
  "description": "Get current weather information for a location",
  "inputSchema": {
    "type": "object",
    "properties": {
      "location": {
        "type": "string",
        "description": "City name or zip code"
      }
    },
    "required": ["location"]
  }
}

Same name, same description, same JSON Schema, now called inputSchema. When the model wants it, the app sends the server a tools/call request and the server does the work:

an MCP tools/call request
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "get_weather",
    "arguments": {
      "location": "New York"
    }
  }
}

Put the two together and the relationship is clear. The spec's message flow has three parties: the app lists the server's tools, the model selects one, and the app calls the server and passes the result back to the model. The middle step, the model picking a tool and filling in its arguments, is function calling. MCP does not replace it. MCP standardises where the tool definitions come from and who runs the code. If you want the full picture of hosts, clients and servers first, the MCP explainer covers it.

Three pathsWho decides, and who runs the code
Three rows. Plain API: your code calls the API directly. Function calling: the model returns a tool call, your code runs it and calls the API. MCP: the model returns a tool call, the app sends tools/call to an MCP server, and the server calls the API.PLAIN APIFUNCTION CALLINGMCPyour codefixed stepsthe apimodelpicks a toolyour coderuns the callthe apimodelpicks a toolmcp clientin the apptools/callmcp serverruns the callthe api
A plain API call has no model in the loop. Function calling puts the model in charge of when, your code in charge of how. MCP moves the how into a server any app can reach.

When is a plain API call enough?

More often than the hype suggests. If you already know the steps, you do not need a model to choose them. "Every morning, pull yesterday's orders and post the total to Slack" is a script. Putting a model in the middle adds tokens, latency and a chance that it picks the wrong tool or invents an argument, and buys you nothing, because there is no decision to make.

A plain API call is the right answer when:

  • The inputs and the order of steps are known in advance.
  • You need the exact same behaviour every run, for billing, compliance or anything a person signs off on.
  • The output goes to another program, not to a model that has to reason about it.
  • A model is involved, but only at the end, to summarise or write up data your code already fetched. That is a prompt, not a tool.

The moment the right next step depends on what the user asked or what the last result said (search, then decide which pages to read, then decide whom to email), you want the model choosing. That is where function calling, and then MCP, earn their place.

How do MCP, function calling and plain APIs compare?

Side by side

Plain API callFunction callingMCP
Who decides to callYour code, alwaysThe model, from the tool descriptionThe model, from the tool description
Where the tool is definedNowhere, it is just codeIn the tools array of each requestIn a server, fetched with tools/list
Who runs the callYour codeYour codeThe MCP server
FormatWhatever the API usesEach provider's own shapeOne spec, any MCP client
Works in Claude, Cursor, ChatGPT appsNoNo, it lives in your appYes, add the server once
Credentials liveIn your code or envIn your code or envWith the server; remote ones sign in with OAuth
Best forFixed, repeatable jobsA few tools inside one app you ownTools shared across apps, or run by someone else
Sources: MCP spec revision 2026-07-28 (tools), Anthropic's tool use and MCP connector docs, OpenAI's function calling and MCP guides, checked November 2026.

When should you use function calling on its own?

When you are building one app with one model provider, and the tools are small pieces of your own logic. Looking up an order in your database, applying a discount, booking a slot on your calendar. The tool is ten lines of code that already lives next to the rest of your app, so wrapping it in a separate server would mean one more thing to deploy and keep running for no gain.

Function calling also gives you the tightest control. You see every call before it runs, you validate the arguments in your own code, and you decide what goes back to the model. Anthropic's overview notes you can add strict: trueto a custom tool so that "Claude's tool calls always match your schema exactly".

The cost shows up as the tool list grows. Every definition is sent with every request, and the same overview lists "the toolsparameter in API requests (tool names, descriptions, and schemas)" among the sources of extra input tokens. Each integration also needs its own client code, its own credentials and its own error handling, all in your app.

When should you use MCP?

When the tools should not belong to one app. Three situations make that obvious:

  1. You want the same tools in several places. A server you add once works in any MCP app, such as Claude, Cursor or ChatGPT, and in your own code through the APIs below. A function you wrote for one app works only in that app.
  2. Someone else maintains the integration. Many services publish their own MCP server. Using it means their team keeps the schemas and the API client up to date, not you.
  3. You want a person in the loop.The spec says that for trust and safety "there SHOULD always be a human in the loop with the ability to deny tool invocations", and tells apps to show which tools are exposed and to ask for confirmation. MCP apps are built around that; with raw function calling you build it yourself.

MCP has costs too. Your tool calls, and whatever the model put in them, go to the server's operator, so only connect servers you trust. Tool definitions still use tokens, because the app still shows them to the model. And a server you depend on can change its tools: the spec lets a server's tool list "change over time". Whether a server runs on your machine or at a URL matters too, and the remote vs local MCP server guide covers that choice.

Can you use MCP servers from your own code?

Yes, and this is where the two ideas meet most directly. Both big model APIs can take an MCP server in the request and handle the tools/list and tools/call traffic for you, so you get MCP tools without writing an MCP client.

On the Claude API it is the MCP connector(checked November 2026), a beta feature that lets you "connect to remote MCP servers directly from the Messages API without a separate MCP client." You pass the server in mcp_servers and turn its tools on with an mcp_toolset entry in tools. This is the basic example from that page:

Claude API with an MCP server
curl https://api.anthropic.com/v1/messages \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2026-10-21" \
  -H "anthropic-beta: mcp-client-2025-11-20" \
  -d '{
    "model": "claude-opus-5-5",
    "max_tokens": 1000,
    "messages": [{"role": "user", "content": "What tools do you have available?"}],
    "mcp_servers": [
      {
        "type": "url",
        "url": "https://example-server.modelcontextprotocol.io/sse",
        "name": "example-mcp",
        "authorization_token": "YOUR_TOKEN"
      }
    ],
    "tools": [
      {
        "type": "mcp_toolset",
        "mcp_server_name": "example-mcp"
      }
    ]
  }'

Two limits from the same page matter. Of the MCP feature set, "only tool calls are currently supported", and "the server must be publicly exposed through HTTP", so "local STDIO servers cannot be connected directly." For servers that use OAuth, "API consumers are expected to handle the OAuth flow and obtain the access token prior to making the API call", then pass it as authorization_token.

On the OpenAI API, the MCP guide(checked November 2026) says to "use the mcptool type in the Responses API" and "set server_urlfor a remote MCP server." An allowed_toolslist limits which tools are imported, and by default "OpenAI will request your approval before any data is shared with a connector or remote MCP server." On cost, it says "you only pay for tokens used when importing tool definitions or making tool calls." The ChatGPT app side is covered in the ChatGPT MCP guide.

A sensible pattern for a real app is to mix all three: plain API calls for the fixed parts of the job, function calling for logic only your app has, and MCP servers for the outside world.

Where does Goro fit?

Goro is an MCP server for the outside-world part. One remote URL, https://mcp.usegoro.ai/mcp, signs in with OAuth 2.1 and gives your agent a catalog of tools: web and news search, page scraping, social platform data, maps, people and company enrichment, plus image, video and voice generation. Your agent sees the price before each call and reports which tool ran and what it cost. A web search call is from $0.0075 per page, and a web page scrape is from $0.005970 per result. If your own code needs the same tools, there is a REST API too, with its own API key, documented at docs.usegoro.ai.

It is not always the answer. If Claude only needs to look something up, its built-in web search does that with nothing to add. If you need one API and you already have a key, a function or a plain call to that API is simpler. A gateway pays off when you would otherwise wire up a separate server, account and bill for each data source. Running tools needs a plan, from $19 a month with $25 of tool credit included; the details are on the pricing page.

Common questions

Is MCP the same as function calling?

No. Function calling is the model feature that turns a request into a structured tool call. MCP is a protocol for where tools live: a server lists them with tools/list and runs them on tools/call. An MCP app still uses function calling to let the model pick one of the server's tools, so MCP sits on top of function calling rather than replacing it.

Does MCP replace function calling?

No. For tools that only make sense inside your own app, defining them directly in the API request is still the simplest option. MCP is worth it when tools need to work across several apps, such as Claude, Cursor and your own code, or when another team or vendor maintains them.

Is MCP slower or more expensive than function calling?

MCP adds a network hop to the server, and the tool definitions still cost input tokens because the model has to see them. Anthropic's docs count tool names, descriptions and schemas as extra input tokens, and OpenAI's MCP guide says you pay for tokens used when importing tool definitions or making tool calls. The server's own charges, if any, come on top.

Can I use an MCP server with the OpenAI or Claude API?

Yes. The Claude API has the MCP connector, a beta that takes remote servers in an mcp_servers array, and the OpenAI Responses API has an mcp tool type with a server_url. Both work with remote HTTP servers. For a local stdio server you run your own MCP client, and Anthropic's SDK has helpers that convert MCP tool types into Claude API types.

Do I need MCP if I only call one API?

Usually not. If the steps are fixed, call the API from your code. If a model should decide when to call it, define one function. Reach for an MCP server when the vendor already publishes one you can add in a minute, or when you want the same tool available in Claude, Cursor or ChatGPT as well as your app.