MCP vs Function Calling: Key Differences
How Function Calling Works
When you use function calling through an LLM API, you define tools in the API request. Each tool has a name, a description, and a JSON schema for its parameters. You send these definitions alongside the conversation messages. The model reads the descriptions and, when it determines a tool would help answer the user's question, responds with a structured tool call instead of text. Your application code intercepts this response, executes the function locally, and sends the result back to the model in the next API call.
The critical detail is that function calling does not actually call anything. The model outputs a structured request that says "I want to call this function with these parameters." Your application code is responsible for executing the function, formatting the result, and feeding it back to the model. The LLM API is purely the decision layer, the model decides which tool to use and what parameters to pass, but the execution layer is entirely your responsibility.
# Function calling: you manage the full loop
import anthropic
client = anthropic.Anthropic()
tools = [{
"name": "search_docs",
"description": "Search documentation",
"input_schema": {
"type": "object",
"properties": {"query": {"type": "string"}},
"required": ["query"]
}
}]
response = client.messages.create(
model="claude-sonnet-4-6",
tools=tools,
messages=[{"role": "user", "content": "Find docs about auth"}]
)
# You must: extract the tool call, execute it, send result back
for block in response.content:
if block.type == "tool_use":
result = your_search_function(block.input["query"])
# Send result back to model in next API callHow MCP Works
MCP handles the full chain. The AI client (Claude Code, Cursor, or any MCP-compatible application) connects to MCP servers at startup. Each server advertises its tools, resources, and prompts through the protocol. The client presents these to the model as available tools. When the model decides to use a tool, the client sends the invocation request to the appropriate MCP server, receives the result, and feeds it back to the model. All of this happens automatically, without application code managing the loop.
From the developer's perspective, the difference is where the complexity lives. With function calling, you write the tool definitions, the execution logic, the result formatting, and the conversation loop management. With MCP, you write the tool logic in an MCP server once, and the client handles everything else.
Key Differences
Discovery
With function calling, you hardcode tool definitions in your API requests. Adding, removing, or changing a tool means changing your application code. With MCP, tools are discovered dynamically at connection time. The server tells the client what is available, and the client adapts. You can add tools to an MCP server and they become available to all connected clients without changing any client code.
Execution
Function calling outputs a request. You execute it. MCP handles execution end to end. The client sends the invocation to the server, the server runs the logic, and the result flows back through the protocol. For developers building AI applications from the API level, function calling gives more control. For developers using AI clients like Claude Code or Cursor, MCP provides the execution layer they do not want to build themselves.
Portability
Function calling is provider-specific. Anthropic's tool use API, OpenAI's function calling API, and Google's function calling API each have different formats for tool definitions, different response structures, and different execution models. An MCP server works with any MCP client regardless of which LLM it uses underneath. Write the server once, use it from Claude Code, Cursor, or any other MCP client.
Transport
Function calling requires your application to be the intermediary between the model and the tool. MCP supports direct communication between the client and the server through stdio or HTTP transport. This means MCP servers can run as local subprocesses, remote services, or cloud-hosted endpoints, all transparent to the client and the model.
When to Use Function Calling
Use function calling when you are building an AI application from the API level and want full control over the tool execution loop. If you are writing a custom chatbot, an AI agent framework, or a product that embeds AI capabilities, function calling gives you the control to manage tool execution, error handling, and result formatting exactly the way you want.
Function calling is also the right choice when your tools are internal to your application and do not need to be shared across multiple AI clients. If a tool only exists inside your application (like a function that queries your application's database), wrapping it as an MCP server adds unnecessary complexity.
When to Use MCP
Use MCP when you want tools to work across multiple AI clients, when you want to share tools with a team, or when you are building tools that external developers will use. MCP's standardized protocol means your tool works everywhere without per-client integration work.
MCP is also the right choice when you are using AI clients (rather than building them). If you use Claude Code or Cursor for development, MCP is how you extend those tools with custom capabilities. Function calling is not an option in these clients because you do not control the LLM API call loop; the client manages it for you.
Using Both Together
In many architectures, both coexist. Your AI application uses function calling to interact with the LLM API. Some of those function calls are handled by local application logic. Others delegate to MCP servers for capabilities that are better implemented as shared services. The function calling layer makes the tool invocation decision, and the MCP layer handles execution for tools that are implemented as MCP servers.
Adaptive Recall works in both modes. You can define Adaptive Recall tools as function calling definitions in your API requests and call the REST API to execute them. Or you can connect to the Adaptive Recall MCP server and let the client handle everything automatically. The underlying memory operations are identical either way.
Use Adaptive Recall through MCP or the API. Both give you the same cognitive scoring, knowledge graphs, and memory lifecycle.
Get Started Free