Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path →
MCP vs function calling: not a rivalry
These get pitted against each other, but they live at different layers — comparing them is like comparing "USB-C" to "sending data". Function calling is the model’s ability to emit a structured request to run a tool. MCP is an open standard for how an agent discovers and connects to servers that provide those tools. One is a capability; the other is a protocol that plugs capabilities in.
Different layers, not competitors
Function calling is a model capability: you describe some functions in the request, and the model, when appropriate, returns a structured call — the function name and typed arguments — which your code then executes and feeds back. It’s the mechanism that turns a text model into an agent. MCP (Model Context Protocol) is an open standard: it defines how an agent (the client) connects to MCP servers that expose tools, resources and prompts, so any compliant agent can plug into any compliant server without custom glue.
MCP uses function calling. When an agent connects to an MCP server, it discovers the server’s tools and presents them to the model as functions the model can call. Function calling is the low-level act; MCP is the standardized plumbing that decides which tools are available and how they’re reached. They compose — they don’t compete.
Head to head
| Dimension | MCP | Function Calling |
|---|---|---|
| What it is | An open protocol / standard | A model capability |
| Layer | Connection & discovery of tools | Emitting a structured tool request |
| Analogy | USB-C port for AI tools | The act of sending a signal |
| Who implements | Server + client authors | The model provider |
| Interoperability | Any agent ↔ any server | Per-provider tool schema |
| Adds | Discovery, resources, prompts, transport | The core "call a tool" mechanic |
| Relationship | Presents server tools as callable functions | The mechanism MCP tools are invoked through |
When each matters
Think function calling when…
- You’re wiring a few bespoke tools into one app
- You control both the model call and the tools
- You just need the model to pick and fill a function
- You’re learning how agents act at all
Think MCP when…
- You want tools reusable across many agents/apps
- You want to plug into an ecosystem of existing servers
- You need discovery, resources and prompts, not just tools
- You’re building or consuming shared connectors
You don’t pick one instead of the other. Function calling is how a model requests an action; MCP is how you standardize and share the tools it can request — turning one-off integrations (N models × M tools) into a plug-and-play ecosystem (N + M). Learn function calling to understand agents; adopt MCP to scale their reach. Just remember: every tool description an MCP server exposes enters your context, so vet servers like dependencies (see AI Security).
What MCP actually adds beyond "here's a tool list"
It's tempting to think MCP is just "function calling, but standardized" — send a list of tool schemas, get a structured call back. That undersells it. A hand-rolled function-calling integration typically hard-codes a fixed list of tools into your app at build time: you write the schemas, you write the handlers, and adding a new tool means shipping a code change. MCP instead defines a live discovery protocol — an agent connects to a server and asks "what do you offer?" at connection time, so a server can add, remove, or change its tools without every client needing a code update. The agent adapts to whatever the server currently exposes.
MCP also standardizes two things plain function calling has no opinion on. Resources are addressable pieces of context a server can expose (a file, a database record, a URL) that the client can read into the conversation without that read itself being a "tool call" the model has to decide to make — useful for context an agent should just have, not context it has to think to ask for. Prompts are reusable, server-defined prompt templates a client can surface to a user (think "slash commands" a server ships alongside its tools) — a layer of UX convention plain function calling never touches, since function calling only defines how a MODEL requests an action, not how a HUMAN using the client interacts with a server's capabilities.
A hard-coded function-calling integration is simpler to reason about — you can see every tool in your own codebase. MCP's live discovery is more powerful (plug into servers you didn't write, that can evolve independently) but means your agent's actual capabilities at runtime depend on what a server you don't control currently chooses to expose.
A worked scenario: adding "search our internal wiki" to an agent
Say your coding assistant needs to search your company's internal wiki. With plain function calling, you write a search_wiki(query: string) function schema, implement the handler (call your wiki's search API, format results), and wire it into your app's system prompt alongside whatever other tools that specific app needs. It's yours: you control the schema exactly, you own the handler code, and nothing changes until you change it. But it only works in this one app — if your team also wants wiki search available in a separate internal Slack bot, you write the integration again.
With MCP, your team instead builds one wiki-search MCP server once, exposing a search_wiki tool (and maybe a wiki_page resource for direct page access) through the standard protocol. The coding assistant connects to it as an MCP client and gets the tool automatically via discovery — no schema hand-written into that app's code. The same server now also plugs into the Slack bot, into a CLI tool, into any other MCP-compliant agent your team builds later, with zero additional integration work per client. The cost is real too: you're now running and maintaining a server process, and every client that connects is trusting whatever that server currently exposes.
One bespoke tool, one app, full control you'll never need to share: plain function calling is simpler and often the right call. One capability many current AND future clients should reach without re-integration: MCP's one-server-many-clients model pays for its added complexity.
The picture: same model step, different source of tools
tools/call routed to whoever runs that server.Cost and trade-offs: hand-wired tools vs an MCP server
Here Time is the work to build or change something. Space is what it costs at runtime: processes, hops and context.
| Case | Time | Space | Why |
|---|---|---|---|
| One bespoke tool in one app | Write a schema and a handler | Nothing extra: the handler runs in-process | Plain function calling. Nothing to share, so nothing to standardize. |
| The same tool in 5 apps, hand-wired | 5 copies; every change ships 5 times | Same per app | The copies drift. One app gets the fix, four still have the bug. |
| The same tool behind one MCP server | Build the server once; each app connects | One more process to run, monitor and secure | Pays off from the second consumer, as in the page’s wiki example. |
| 5 agents × 4 tools | 20 hand-wired integrations | 5 + 4 = 9 with MCP | At 8 tools it is 40 against 13. The gap grows with every tool and agent you add. |
| Adding a tool | Hand-wired: code change and redeploy of each app | MCP: clients see it on their next tools/list | A server can also send notifications/tools/list_changed. The flip side: your agent’s abilities can change without a deploy of yours. |
| Each call | In-process: a function call | MCP: a hop over stdio (local) or Streamable HTTP (remote) | Rarely the bottleneck next to a model call, but a remote server is another thing that can be down. |
| Tool descriptions | Paid on every request either way | A server with 30 tools puts 30 descriptions in context unless the client filters them | Tool count costs tokens and selection accuracy whichever layer supplied the tools. |
Read the table as a break-even. Hand-wiring costs nothing extra until a second app wants the same tool. From then on, every copy is a bug fix you will ship several times. An MCP server costs a process, a transport and a trust decision up front. After that, each new consumer costs only a connection. Most teams start in the first row and move a tool to MCP the day a second agent asks for it. That is a sensible order, not a failure to plan.
Common mistakes
Most of these come from mixing up the two layers. People blame MCP for a function-calling problem, or expect a protocol to fix what is really tool design.
- Thinking the model runs the function
The model only returns a name and arguments. Your code, or the MCP server, executes it. The arguments are model output, so they can be wrong or invented. Validate them against the schema and the user’s permissions before running anything, in both setups.
- Standing up a server for one in-app tool
A tool used by one app you control does not need a separate process, a transport and its own deployment. Start with function calling. Move the tool to MCP when a second consumer shows up, which is the page’s rule of thumb.
- Mounting every server you can find
Each server adds all its tool descriptions to the model’s context. Ten servers with overlapping tools (three ways to search, two ways to read a file) cost tokens on every request and make the model pick wrongly. Mount what the workflow needs.
- Expecting MCP to fix tool selection
MCP changes where definitions come from, not how good they are. A server tool called
querydescribed as “runs a query” is picked as badly as a hand-written one. Names, descriptions and tight schemas still decide whether the model calls the right thing. - Approving a server once
A server can change its tool descriptions after you approve it, and those descriptions are text in your model’s context. Pin the version, record the tool list you approved, and diff it on every connect. Treat a change like a dependency upgrade.
Where this shows up in production and interviews
The two layers turn up in different parts of a real stack. When something breaks, knowing which layer you are looking at tells you where the fix goes. A bad argument is a model and schema problem. A missing tool is a discovery or configuration problem.
- Provider APIs
Every major model API exposes the function-calling layer: you send tools as JSON Schema and get back a structured call. Each provider has its own request shape for it, which is the “per-provider tool schema” row in the table above.
- Desktop assistants and coding tools
These act as MCP clients. A user adds a server in a config file, and its tools appear in the assistant without anyone writing integration code. That is the “any agent ↔ any server” property in practice.
- Agent frameworks
Frameworks usually ship an MCP adapter that turns discovered tools into the framework’s own tool objects. That adapter is the “presents tools as functions” step from the diagram, and it is where to filter which tools the model sees.
- The interview version
If asked “MCP or function calling?”, start by saying they sit at different layers. Then give the N×M to N+M arithmetic for the company’s agents and tools. Say what you give up: a server you must run and trust. Finish with how you would vet and pin third-party servers.
Which would you pick?
Three situations. Pick the side you'd actually build — the explanation follows.
A colleague says "we use function calling, so we do not need MCP — they solve the same problem."
The page's framing is layers, not competitors. Function calling is the model-side mechanism for expressing an intent to call something; MCP is the protocol by which a server advertises what it offers and how to reach it. Treating them as alternatives leads to asking which to "pick" when a real system generally uses both.
Five internal agents each need access to the same wiki search, and today each team hand-wires its own tool definition.
This is the case MCP addresses: one server advertises the capability and any client can discover and use it, so the integration stops being duplicated per agent. Copying a few lines five times is cheap once and expensive on every change, and a shared library still requires every consumer to redeploy to pick up a new tool.
You add an MCP server to an agent. Which mechanism actually makes the model choose to call one of its tools?
MCP changes where the tool definitions come from, not how the model expresses intent to use one. The model still emits a structured call the way it always did; MCP populated the list it chose from. Keeping that boundary clear is what stops "should we use MCP or function calling" from being asked at all.
Quick answers
What is the difference between MCP and function calling?
Function calling is a model capability: given tool descriptions, the model emits a structured request (function name + arguments) that your code runs. MCP (Model Context Protocol) is an open standard for how agents discover and connect to servers that provide tools. Function calling is the mechanism; MCP is the standardized plumbing that supplies and reaches the tools.
Does MCP replace function calling?
No — MCP uses function calling. When an agent connects to an MCP server, it discovers that server’s tools and presents them to the model as functions it can call. They operate at different layers and compose together rather than competing.
When should I use MCP instead of plain function calling?
Use MCP when you want tools to be reusable across many agents or apps, want to plug into an ecosystem of existing servers, or need discovery, resources and prompts beyond bare tool calls. For wiring a few bespoke tools into a single app you control, plain function calling is enough.
Is MCP secure?
It requires care. Every tool description an MCP server exposes enters your model’s context, so a malicious server is an injection vector, and servers can change their descriptions after you approve them. Vet and pin MCP servers like software dependencies, and scope credentials per server.
Explore the topic
See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.
More Handbooks
- The Agentic AI Interview HandbookTwenty topics every senior AI engineer should be able to reason about live — from eval pipelines to reliability patterns for generative systems.Read →
- The Agent Evaluations HandbookA self-contained handbook on evaluating AI agents — theory, interactive widgets, and practical guidance. Trajectory evals, tool-use scoring, LLM-as-judge, observability, and reliability for PMs, engineers, and founders.Read →
- The Agent Patterns HandbookThe design patterns behind every LLM agent — the ReAct Thought–Action–Observation loop, tool/function calling, plan-and-execute, reflection, memory, multi-agent orchestration, and the failure modes (loops, hallucinated tools, recovery, human-in-the-loop) that break agents in production.Read →
- The Kubernetes HandbookThe one idea under all the YAML — declare desired state, and a control loop makes reality match. Covers the orchestration problem, pods, deployments and replicasets, services and networking, the reconciliation loop and self-healing, the scheduler, config/secrets and health probes, autoscaling, and when you actually need Kubernetes.Read →
- The Observability HandbookSeeing inside production — monitoring vs observability, the three pillars (metrics, logs, traces) and what each answers, structured logging, metric types and the cardinality trap, distributed tracing, the golden signals and SLIs/SLOs/error budgets, alerting on symptoms not causes, and correlating all three during an incident.Read →
- The Model Context Protocol (MCP) HandbookThe open standard connecting AI agents to the outside world — why M×N bespoke integrations collapse to M+N, the host/client/server roles over JSON-RPC, the three primitives (tools, resources, prompts), the connect→discover→call session lifecycle, when MCP earns its keep, and the security sharp edges (a server's output is untrusted input).Read →