Model Context Protocol (MCP) is an open standard from Anthropic for connecting AI assistants to external data, content, and tools in a uniform way. The idea behind MCP is to give a language model access to a wide range of context (documents, databases, APIs, and similar sources) through a single protocol instead of bespoke integrations for each source. Under MCP, developers run MCP servers that expose data or services, and AI applications (MCP clients) query those servers for relevant information.
If you maintain an agent with twelve custom API wrappers, MCP offers a shared wire format for listing tools, reading resources, and invoking actions. The win is integration reuse and clearer boundaries between the model runtime and side-effecting capabilities. The cost is another moving part to secure, version, test, and observe in production.
Key takeaways
- MCP standardizes how LLM applications discover and call external tools and data via MCP servers.
- Clients and servers communicate over a defined protocol so one server can serve multiple agent hosts.
- MCP reduces one-off connector code but does not replace auth, policy, or evals on tool behavior.
- Server quality and latency become part of your agent SLO once tools route through MCP.
- Compare MCP to CLI and skill patterns on your tasks before standardizing org-wide.
MCP architecture in practice
Two roles dominate:
- MCP server. Exposes capabilities: file reads, SQL queries, ticket creation, search indexes. Implements the protocol handlers and enforces local permissions.
- MCP client. Embedded in the agent host (IDE, chat app, orchestrator). Discovers server capabilities, passes model-selected tool calls to the server, and returns results to the model context.
Servers can run locally (stdio transport) or remotely (HTTP/SSE). The model sees tool schemas the client registers from server metadata. When the model emits a tool call, the client forwards it; the server executes and returns structured content for the next turn.
This mirrors plugin architectures but with a published spec intended to cross vendors. Teams still choose which servers to trust, how to authenticate, and which tools appear for which users.
What MCP solves and what it does not
Solves:
- Repeated adapter code for the same database or SaaS across agents.
- A consistent pattern for listing resources and tool definitions.
- Easier swapping of agent hosts while keeping the same servers.
Does not solve:
- Authorization and tenancy (a server must enforce who can read which rows).
- Prompt injection via tool outputs (returned JSON can contain instructions).
- Eval coverage for tool correctness and safety.
- Observability unless you instrument client and server spans yourself.
MCP is plumbing. Production readiness still requires least-privilege credentials, input validation on arguments, rate limits, and red-team tests on tool misuse.
MCP vs CLI skills and other agent interfaces
Agents can reach the world through MCP servers, shell CLI wrappers, HTTP APIs, or framework-specific “skills.” Each pattern differs in discoverability, sandboxing, and eval ergonomics. Arize ran structured comparisons on agent tasks; see MCP vs CLI skills for agents for measured tradeoffs on latency, failure modes, and developer workflow.
CLI wrappers are quick for prototypes but leak shell risk. MCP centralizes capability definitions for the model yet adds server maintenance. Pick based on task shape, security boundary, and who owns the integration long term.
Fitting MCP into agent orchestration
Most products combine MCP with routing, memory, and human approval steps. An orchestrator decides which server to attach per session, merges tool results into context, and handles retries when a server times out. Agent orchestration frameworks, runtimes, and observability describes how runtimes schedule tool calls and where tracing hooks belong.
Design conventions that help:
- One server per trust domain (do not mix customer A data with customer B in one process).
- Version tool schemas; breaking changes should bump server version and trigger eval reruns.
- Timeouts and circuit breakers on every remote server so one slow dependency does not hang the agent loop.
Testing and observing MCP-backed agents
Test at three layers:
- Server unit tests. Handlers return correct data for valid args; reject invalid args and unauthorized scopes.
- Client integration tests. Discovery, call serialization, and error propagation match the spec.
- End-to-end agent evals. Full tasks where the model must pick the right tool and interpret results.
Log spans for mcp.discover, mcp.call, server ID, tool name, latency, and error codes. Correlate with model turns to debug wrong-tool selection versus server failures. AI agent testing resources cover harness design for tool-heavy agents, including regression sets when you add or upgrade an MCP server.
Security evals should include malicious server responses, over-broad tool listings, and attempts to invoke admin tools from low-privilege sessions.
Operational checklist before shipping MCP
- Authenticate clients to servers (mTLS, OAuth, signed tokens).
- Narrow tool surface per role; hide dangerous tools from general users.
- Sanitize tool outputs before re-injecting into the prompt.
- Pin server versions in staging; promote after eval pass.
- Document data retention when tools read PII-bearing systems.
MCP adoption grows when platform teams publish blessed servers and agent teams consume them. Without governance, you recreate bespoke integrations with extra steps.
FAQ
Who maintains MCP servers?
Usually the team that owns the data or API: data engineering for warehouses, IT for ticketing systems, or platform engineering for shared infra. Agent teams consume servers; they should not embed business SQL inside the client.
Can one agent use multiple MCP servers at once?
Yes. The client merges capability lists from each connected server. Namespace tool names to avoid collisions and apply per-server auth.
Is MCP only for Anthropic models?
MCP is an open protocol. Multiple agent hosts and model providers can implement clients. Verify compatibility with your chosen runtime and transport (stdio vs remote).
How do I debug a wrong answer that used MCP?
Trace the full turn: model tool call arguments, server response payload, and subsequent model message. Wrong answers often come from stale server data, mis-scoped queries, or the model misreading structured output, not from the base model alone.
Should I replace all APIs with MCP?
Not necessarily. Stable internal gRPC or REST calls behind a thin agent wrapper may be simpler than running a server process. Use MCP when multiple agents need the same capability catalog and you want protocol-level reuse.