Drawing 1 · Interactive
Which MCP server should take this tool call?
Only agents with the required skill are eligible; the least busy of them wins.
Incoming · 0 left
- All 8 conversations have been routed.
Conversation 8 of 8 · Skills-based
Farah · size M available?(needs check_stock)goes toCatalogue server
Skills: needs check_stock, and only Catalogue server has it.
- Full
Orders server
3 of 3 open
- get_order_status
- cancel_order
- Ravi · where is my order?needs get_order_status
- Ravi · cancel itneeds cancel_order
- Farah · order 50219needs get_order_status
- Full
Catalogue server
3 of 3 open
- search_products
- check_stock
- Meena · sofa under 40kneeds search_products
- Arjun · in stock in Pune?needs check_stock
- Farah · size M available?needs check_stock
- Full
CRM server
2 of 2 open
- find_customer
- create_ticket
- Meena · item arrived damagedneeds create_ticket
- Arjun · update my addressneeds find_customer
Waiting · 0
- Nobody waiting: every conversation found an agent.
| Strategy | Routed | Waiting | Skill mismatches |
|---|---|---|---|
| Skills-based | 8 | 0 | 0 |
| Round-robin | 8 | 0 | 5 |
Conversation 8 of 8, Farah · size M available?: Skills: needs check_stock, and only Catalogue server has it.
What is the Model Context Protocol (MCP)?
The Model Context Protocol (MCP) is an open protocol for connecting LLM applications to the tools and data they need. A host — an AI agent, a chat assistant, an IDE — runs MCP clients that talk to MCP servers, and each server exposes three kinds of capability: tools (functions the model may call, such as get_order_status), resources (data identified by URI that can be read into context) and prompts (reusable templated workflows). Anthropic introduced it in November 2024; since December 2025 it has been stewarded by the Agentic AI Foundation under the Linux Foundation.
Every message is JSON-RPC 2.0, carried over stdio for a server running on the same machine or over Streamable HTTP for a remote one, where an optional OAuth-based authorization framework protects access. The current specification revision, 2026-07-28, made the protocol stateless: the old initialize handshake and protocol-level sessions are gone, each request carries its protocol version and client capabilities in _meta, servers advertise themselves through a mandatory server/discover method, and list results such as tools/list carry caching hints (ttlMs, cacheScope).
MCP sits one layer above tool calling. Tool calling is how a model emits a structured request to run a function; MCP standardises how those functions are packaged, described, discovered and invoked, so an order-lookup integration built once can serve a WhatsApp AI agent, an agent assist panel in the support inbox and an internal ops assistant alike. MCP does not send WhatsApp messages: the agent still replies to customers through the Cloud API.
Key takeaways
- The Model Context Protocol (MCP) is an open standard for exposing tools, resources and prompts to LLM applications through MCP servers.
- Write an integration once as an MCP server and any MCP-capable AI client can discover and call it.
- Messages are JSON-RPC 2.0 over stdio for local servers or Streamable HTTP for remote ones.
- The current revision, 2026-07-28, is stateless: no initialize handshake, and every request carries its protocol version.
- MCP packages tools; the model's own tool calling still decides when to use them, and the Cloud API still sends the WhatsApp message.
Operating sequence
How does the Model Context Protocol (MCP) work?
Expose capabilities as a server
Define each tool with a
name, adescriptionthe model reads, aninputSchema(JSON Schema 2020-12) and optionally anoutputSchema; add resources by URI and prompts if useful. Keep tools narrow and purpose-built.The client discovers them
The host may call
server/discoverfor supported versions and capabilities, thentools/list. The tool definitions are handed to the model as functions it can choose.The model picks a tool
When the model emits a provider-specific tool call, the host maps it to
tools/callon the server that advertised that tool, with the arguments the model produced.The server executes and answers
Results come back as
content(text, images, resource links) plusstructuredContentmatching the output schema. Business failures returnisError: trueso the model can recover; malformed requests return JSON-RPC errors such as -32602.Authorise and contain every call
Authenticate each request (an OAuth bearer token over HTTP), scope tools to the caller, bind customer data to the verified WhatsApp ID, ask a human to confirm sensitive actions, and log every call.
Carry state in explicit handles
With no protocol sessions, a server that needs continuity — a cart, a draft booking — returns a handle such as
basket_idthat the model passes into later calls.
Implementation
The Model Context Protocol (MCP) in code
POST /mcp HTTP/1.1Host: orders-mcp.example.inAuthorization: Bearer {ACCESS_TOKEN}Content-Type: application/jsonAccept: application/json, text/event-streamMCP-Protocol-Version: 2026-07-28Mcp-Method: tools/callMcp-Name: get_order_status{"jsonrpc": "2.0","id": 42,"method": "tools/call","params": {"name": "get_order_status","arguments": { "order_id": "48213", "wa_id": "919812345678" },"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28","io.modelcontextprotocol/clientInfo": { "name": "whatsapp-support-agent", "version": "1.4.0" },"io.modelcontextprotocol/clientCapabilities": {}}}}
Stateless: no handshake first. The protocol version travels in _meta and, on HTTP, in the MCP-Protocol-Version header.
Specifications
The Model Context Protocol (MCP): key facts and limits
- Wire format
- JSON-RPC 2.0
- Transports
- stdio (local) · Streamable HTTP (remote)
- Current revision
- 2026-07-28 — stateless, no initialize handshake
- Server capabilities
- Tools, resources, prompts
- Tool names (recommended)
- 1–128 characters: letters, digits, _ - .
- Stewardship
- Agentic AI Foundation (Linux Foundation) since December 2025
Design intent
Why does the Model Context Protocol (MCP) matter?
Without a standard, every AI feature rebuilds the same integrations in a provider-specific format: one wrapper for the WhatsApp bot's model, another for the inbox assistant, a third for the next vendor you try. MCP turns your order system, catalogue and CRM into servers with typed tool definitions that any compatible host can use, so a schema change or a new courier API is fixed in one place. For security reviews it also gives one choke point where authorization, input validation, rate limits and audit logs apply to every AI client.
Example: One order server, three AI clients in Mumbai
A Mumbai electronics retailer wraps its order system as an MCP server with three tools: get_order_status, reschedule_delivery and create_return. Its WhatsApp AI agent, the agent assist panel in the support inbox and an internal operations assistant all connect to the same server. When the retailer changes courier partners, the team updates the server once and all three clients pick up the new tracking format. Because the server checks that every order belongs to the WhatsApp ID passed from the verified webhook, a customer who types someone else's order number gets "I can't find that order on your account" rather than another person's address.
Failure modes
Common mistakes with the Model Context Protocol (MCP)
Exposing broad, powerful tools
A
run_sqlorcall_any_apitool hands the model your whole backend. Offer narrow tools with strict schemas and least-privilege credentials behind them.Trusting what comes back
Tool results and descriptions from untrusted servers can carry instructions — a product review that says "ignore your rules". Treat them as data, sanitise outputs and keep guardrails outside the model.
No per-customer authorisation
If the server accepts any order ID, the agent can be talked into fetching another customer's order. Pass the WhatsApp ID from the verified webhook and check ownership on every call.
Building on handshake-era assumptions
Code written for earlier revisions may rely on
initializeand session IDs. Since 2026-07-28 requests are self-contained; use explicit handles for state and the backward-compatibility rules for older peers.Using MCP where a function will do
One app, one model and three internal tools may not need a protocol layer. Plain tool calling is simpler until the same tools must serve several clients.
Recommended practice
Best practices for the Model Context Protocol (MCP)
- Prefix tool names by domain (orders.get_status) when several servers feed one agent, to avoid collisions.
- Write tool descriptions for the model: when to use it, when not to, and what each argument means.
- Return tool execution errors with a clear fix ("order not found on this account") so the model can recover.
- Require human confirmation for refunds, cancellations and anything that moves money.