MCP vs Function Calling: What Is the Difference?

Both let a language model use tools — but they operate at completely different layers. This guide explains what each one actually is, how they relate to each other, and when to reach for each.

The Short Answer

Function calling (also called tool use) is a model API feature. It is the mechanism by which an LLM signals “I want to invoke this tool with these arguments.” Your application code does the actual work and returns the result to the model.

MCP (Model Context Protocol) is an open connectivity protocol. It is a standard for packaging tool logic into reusable servers that any compatible client can discover and connect to, over a defined transport such as stdio or HTTP.

They are not alternatives to each other. MCP uses function calling under the hood. Understanding the distinction is the key to knowing which layer you are working at.

Function Calling: the Model-Level Mechanism

When you call a modern LLM API you can pass a list of tool definitions alongside your prompt. Each definition describes a callable function: its name, a description the model can read, and a schema for its parameters (typically expressed as a JSON Schema object).

When the model decides a tool is useful, it does not execute any code itself. Instead it produces a structured response that names the tool and provides the arguments. Your application catches that response, runs the actual function, and sends the result back to the model as a subsequent message. The model then continues reasoning from there.

Function calling is entirely self-contained inside a single API exchange. You declare tools in the request, handle the model's tool-call output in your code, return results, and repeat as needed. Everything lives inside your application process.

A simplified function-calling exchange

// 1. Your application sends to the model API:
{
  "tools": [
    {
      "name": "get_weather",
      "description": "Get current weather for a city.",
      "input_schema": {
        "type": "object",
        "properties": { "city": { "type": "string" } },
        "required": ["city"]
      }
    }
  ],
  "messages": [{ "role": "user", "content": "What is the weather in Muscat?" }]
}

// 2. The model responds with a structured tool call (not plain text):
{
  "type": "tool_use",
  "name": "get_weather",
  "input": { "city": "Muscat" }
}

// 3. Your code runs get_weather("Muscat") and sends the result back.
// 4. The model produces a final text response for the user.

Key point: the model is a requester, not an executor. It emits a structured call describing what it wants done; your code fulfills it.

MCP: the Open Tool-Server Protocol

The Model Context Protocol (MCP) is an open standard that defines how AI clients connect to tool servers. A tool server is a separate process that exposes tools, data resources, and prompt templates over a well-defined protocol. Any compatible client can connect to any conforming server.

The protocol is built on JSON-RPC 2.0 as its message format. The spec defines two transports:

When a client connects to an MCP server, the two parties perform a capability handshake. The server advertises what it can offer. The client then knows what tools are available and can present them to a model — via that model's own function-calling mechanism.

What an MCP server can expose

Key point: MCP is about where tool definitions live, how they are packaged, and how they are discovered. Function calling is about how the model requests a tool invocation at inference time. MCP sits one layer above function calling.

How They Relate: the Full Picture

Here is what happens when a user interacts with an MCP-enabled AI client, such as a desktop application or an IDE extension:

1
Client connects to MCP server(s) and runs the capability handshake

The client sends a JSON-RPC initialize request and receives back the list of tools, resources, and prompts that each configured server offers.

2
Client surfaces discovered tools to the model via function calling

The tool definitions received from MCP servers are included in the model API request, exactly as though you had written them by hand in your application code.

3
Model emits a function call

The model produces a structured tool-call response naming the tool it wants to invoke and the arguments to pass. This is standard function calling behavior — nothing MCP-specific happens at the model layer.

4
Client routes the call to the correct MCP server

Instead of executing the function itself, the client forwards the call over JSON-RPC to whichever server registered that tool name during the handshake.

5
Server executes and returns the result

The MCP server runs the logic, sends back a JSON-RPC result, and the client feeds it to the model as a tool result message. The model continues from there.

In short: MCP is the wiring that connects reusable tool servers to AI clients. Function calling is what happens at the model layer once those tools are wired up. They are complementary layers, not competing approaches.

Side-by-Side Comparison

Dimension Function Calling MCP
What it is A model API feature An open connectivity protocol
Where tool logic lives Inside your application code A separate server process
Transport None — definitions sent inline in the API request JSON-RPC 2.0 over stdio or HTTP
Tool discovery You write and maintain tool definitions Client discovers tools automatically via handshake
Reusability Tied to the application that defines them Any compatible client can connect to the same server
Who executes the call Your application code The MCP server process
Best for In-app tools, simple integrations Shared tooling across clients, ecosystem servers

When to Use Each

Use plain function calling when…

  • You are building a single application
  • Tools only need to work inside that one app
  • You want the simplest possible setup
  • You are already writing direct API calls
  • A separate server process adds unnecessary overhead

Use MCP when…

  • You want tools reusable across multiple clients
  • Tool logic benefits from its own dedicated process
  • You want to share a server with your team or community
  • You are using an MCP-compatible host (Claude Desktop, an IDE extension, etc.)
  • You want to pull in existing community MCP servers without re-implementing them

A Note on Terminology

Different API providers use slightly different names for the same underlying concept. Anthropic's API calls it tool use; OpenAI's API calls it function calling. The mechanics are similar in both cases: pass tool schemas in the request, receive structured tool-call outputs, return results, and continue. The term “function calling” has become common shorthand for this model-level mechanism regardless of provider.

MCP was designed to be model-agnostic. An MCP server does not care which model or provider the client is using. The protocol speaks JSON-RPC, not anything model-specific. Whether the client routes an MCP tool to one model or another is up to the client application, not the server.

When you see tools arrays inside API request bodies, you are looking at function calling. When you see mcpServers config entries, stdio transport references, or separate server processes being launched, you are looking at MCP — and the underlying model is still using function calling one layer below.

Frequently Asked Questions

Does MCP replace function calling?

No. MCP uses function calling as its mechanism for the model to request tool invocations. The protocol adds a standardized discovery and transport layer on top, not a replacement for the model-level mechanism underneath.

Can I use MCP without a compatible host application?

You can write your own MCP client — the protocol spec is open. That said, most developers use MCP precisely because a host they already work with supports it. If you are writing a custom API client from scratch and do not need cross-client reusability, plain function calling is almost always simpler to start with.

Does MCP only work with Anthropic models?

No. MCP is model-agnostic at the protocol level. The protocol speaks JSON-RPC between client and server; it says nothing about which model the client uses. Whether a specific client wires MCP tools to a specific model or provider is up to that client's implementation.

What is the stdio transport in MCP?

With the stdio transport, the MCP client spawns the server as a child process. Messages flow as JSON-RPC objects written to the server's standard input and read from its standard output. This is the most common transport for local tools because it requires no network configuration and keeps the server process co-located with the client.

Is function calling the same as building an agent?

Not exactly. Function calling is one building block of agentic systems. An agent typically loops: the model reasons, calls a tool, observes the result, and repeats until it reaches a conclusion. Function calling is the mechanism that enables each individual step; the agentic reasoning loop is the pattern built on top of it.

My MCP tools are not showing up in the model. Where should I look?

The most common causes are a malformed server config (incorrect paths, wrong transport type, or invalid JSON) and a server process that fails to start silently. Our free Config Fixer can catch schema-level mistakes instantly. For runtime issues, checking the client's MCP server logs is usually the fastest path to the root cause.

Dealing with MCP config headaches?

Malformed configs and silent server failures are the most common blockers when setting up MCP. The free MCP Config Fixer catches path errors, schema mistakes, and transport mismatches in seconds. If you want a curated set of ready-to-use, pre-tested server configs, the $15 MCP Setup Pack has you covered.

Try the free Config Fixer See the $15 MCP Setup Pack