Modern AI Engineering

MCP vs Function Calling: What Each Does and When to Use Which

By Modern AI Engineering · · 9 min read

"Should we use function calling or MCP?" is one of the most common questions in AI engineering interviews and design reviews. It is also slightly the wrong question, because the two work at different layers and usually work together.

In short: function calling (tool calling) is a model capability. The LLM reads a list of tool descriptions and replies with a structured request to call one, with arguments; your code runs the tool and sends back the result. The Model Context Protocol (MCP) is an open standard for how an AI application discovers and calls tools, data and prompts that live in separate servers. Function calling decides what to call; MCP standardizes how tools are packaged and reached, so one integration works in many apps.

Function calling: the model chooses, your code acts

The model never runs anything. It only produces structured text that says what it wants run. That separation is what keeps tool use safe and testable. A tool definition looks roughly like this; field names vary slightly by provider.

  1. You send the model the user's message plus a list of tools, each with a name, a description and a JSON Schema for its arguments.
  2. The model either answers directly or returns a tool call: a tool name and arguments that match the schema.
  3. Your code runs the function: queries the database, calls the API, whatever the tool does.
  4. You send the result back, and the model uses it to answer or to call another tool.
{
"name": "get_order_status",
"description": "Look up the shipping status of a customer's order by order ID.",
"input_schema": {
"type": "object",
"properties": {
"order_id": { "type": "string", "description": "Order ID, e.g. ORD-10293" }
},
"required": ["order_id"]
}
}

The problem MCP solves

Function calling works well inside one app. The trouble starts at scale. Every AI app (a chat assistant, an IDE, a support bot) needed its own custom integration for every system (GitHub, Slack, a database, a CRM). Ten apps and twenty systems meant up to two hundred one-off connectors, each with its own auth, schemas and bugs.

MCP replaces that with one shared protocol. A team wraps a system once as an MCP server, and any MCP-compatible app can use it. Anthropic introduced MCP as an open standard in November 2024, and it has since been adopted across major AI labs, IDEs and agent frameworks.

How MCP works

MCP has three roles. The host is the AI application the user works in. The host creates one client per server. A server is a program that exposes capabilities from some system. Messages are JSON-RPC 2.0, and servers run either locally over stdio (the host launches them as a subprocess) or remotely over Streamable HTTP, which uses an OAuth 2.1 authorization profile.

Server featureControlled byExample
ToolsThe model decides when to call themcreate_issue, search_orders
ResourcesThe application decides what to attachA file, a database row, a document by URI
PromptsThe user picks themA reusable "review this PR" template, often a slash command

What changed in the 2026 MCP specification

MCP is versioned by date. The current revision, 2026-07-28, made the protocol stateless: the old initialize handshake and protocol sessions are gone. Each request now carries its own protocol version and client capabilities in _meta, and servers must implement a server/discover method. The same revision deprecated roots, sampling and logging; elicitation, where a server asks the user for missing input, remains as the client feature.

Why this matters: many tutorials written before mid-2026 describe the handshake-based protocol. If you build a new server, target the current revision and keep supporting the older one during migration so legacy clients keep working. Always check the official specification at modelcontextprotocol.io and your SDK's release notes. A modern tool call looks like this:

{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "get_order_status",
"arguments": { "order_id": "ORD-10293" },
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28"
}
}
}

MCP vs function calling: side by side

Function callingMCP
What it isA model capabilityAn open protocol between apps and tool servers
Who defines toolsYour app code, per requestThe MCP server, discovered at runtime
Who runs the toolYour appThe MCP server
Reuse across appsNone; each app rewires each toolWrite a server once, use it in any MCP host
Extra featuresJust toolsTools, resources, prompts, elicitation, an auth profile
OverheadLowestA server process or endpoint to run and secure
Best forA few app-specific toolsShared integrations, many tools, many apps

How they work together

MCP does not replace function calling. It feeds it. In a real request, both are involved:

  1. The host asks each connected MCP server for its tool list.
  2. The host converts those tools into the model's function-calling format.
  3. The model picks a tool and returns a function call.
  4. The host forwards that call to the right MCP server as tools/call.
  5. The server runs it and returns the result, which goes back to the model.

Which should you use?

  • Plain function calling: a handful of tools that only one application needs, thin wrappers around your own code, and the fewest moving parts.
  • MCP: the same integration should work in several apps; another team or vendor already ships an MCP server for the system you need; or you want to expose your product to AI assistants your customers already use.

Security: the part people skip

Tools act on real systems, so treat every tool call as untrusted input.

  • Least privilege: give each server the narrowest credentials possible.
  • Confirm side effects: writes, payments and deletes should need user approval.
  • Watch for prompt injection: text a tool returns (a web page, an email, a ticket) can contain instructions aimed at the model. Treat it as data, never as commands.
  • Vet third-party servers like any dependency; a malicious server can lie in its tool descriptions.

Sources

Frequently asked questions

Is MCP a replacement for function calling?

No. Function calling is how the model asks for a tool. MCP standardizes how tools are packaged, discovered and reached. Most MCP hosts turn MCP tools into function calls for the model.

What is an MCP server?

A program that exposes tools, resources or prompts from some system, such as a database, GitHub or a file system, using the Model Context Protocol, so any MCP-compatible app can use them.

Do I need MCP to build an AI agent?

No. A simple agent works with function calling alone. MCP becomes valuable when integrations need to be shared across apps or teams.

What is the latest MCP spec version?

As of October 2026, the current revision is 2026-07-28, which made the protocol stateless. Earlier revisions (2024-11-05, 2025-03-26, 2025-06-18 and 2025-11-25) used an initialize handshake.

Is MCP only for Anthropic models?

No. It is an open standard supported by many hosts, frameworks and model providers.

Learn it properly: the AI Engineering Bootcamp

More articles