July 9, 2026 · 7 min read
If you've been building with AI agents, you've likely encountered both function calling and MCP (Model Context Protocol). They look similar on the surface — both let an AI agent call tools and get structured data back. But they solve fundamentally different problems, and picking the wrong one adds unnecessary complexity to your stack.
Here's the clearest way to think about it: function calling is a model feature; MCP is a distribution format.
Function calling (also called tool use) is a capability built into the LLM itself. You define a set of functions in JSON Schema format, pass them to the model alongside your prompt, and the model can decide to "call" one of them by returning a structured JSON payload instead of plain text.
Your application code then receives that payload, executes the actual function, and feeds the result back to the model. The model never actually calls anything — it just outputs structured JSON that tells your code what to call.
// You define the tool schema
const tools = [{
name: "get_weather",
description: "Get current weather for a city",
input_schema: {
type: "object",
properties: { city: { type: "string" } },
required: ["city"]
}
}]
// Model returns: { name: "get_weather", input: { city: "London" } }
// Your code executes the actual API call and returns the resultFunction calling is entirely contained within a single API call and a single application. The tool definitions live in your code. Nobody else can use them unless you ship them your code.
MCP is a protocol for distributing tools. Instead of defining tools inside your application, you run a separate server that exposes tools over a standardised JSON-RPC interface. Any MCP client — Claude Desktop, Cursor, a custom agent — can connect to that server and use its tools without you writing any glue code.
// MCP server exposes tools via HTTP
POST /mcp
{ "method": "tools/list" }
→ returns available tools
{ "method": "tools/call", "params": { "name": "ask_site", "arguments": { ... } } }
→ executes tool, returns result
// Any MCP client can connect — no integration code neededThe key difference: MCP tools are reusable across applications. You build the server once and any agent that speaks MCP can call it. Function calling tools are private to the application that defines them.
Use function calling when the tools are specific to your application and won't be used by anything else:
The advantage is simplicity — no server to deploy, no protocol to implement, just a JSON schema alongside your prompt. For tools that are private to your app, this is the right call.
Use MCP when you want any agent — not just one application — to be able to use your tools:
AgentReady is a good example. It exposes tools (ask_site, submit_site, refresh_site) via an MCP server at a URL. Any agent — Claude, Cursor, a custom script — can connect to that URL and immediately query any indexed website. If those tools were implemented as function calling schemas, each developer would have to copy-paste the schema and host the execution logic themselves.
Most production agents use both. Function calling handles the private, app-specific logic. MCP handles shared, hosted tools that the agent can reach over the network.
A typical setup: your agent uses function calling to query your internal database and MCP to query external documentation, APIs, or services. The LLM sees all the tool definitions in its context window — it doesn't know or care whether a tool is function-called or MCP-backed. Both produce the same structured call-and-response pattern from the model's perspective.
// Claude Desktop config — mixing both patterns
{
"mcpServers": {
"agentready": {
// MCP: shared tool, hosted externally
"command": "npx",
"args": ["-y", "@agentreadyweb/mcp"]
}
}
}
// Function calling: private tools defined in your system prompt
// Both work together in the same agent sessionThe MCP 2026-07-28 release candidate introduces a stateless core — MCP servers can now run behind a plain load balancer, and clients can cache tools/list responses. This makes the operationally messier parts of MCP (sticky sessions, server state) a solvable problem rather than a fundamental constraint. If you've avoided MCP for production because of scaling concerns, the new spec addresses most of them.
Use function calling if:
Use MCP if:
Make your website queryable via MCP
AgentReady indexes any website and exposes it as an MCP tool — so any agent can query your docs, pricing, or product pages with cited answers. No function calling schemas to write, no server to host.
Try it free →