Axisdream
Written and Published byAxisdream·

What Is MCP, and How Does It Let AI Agents Use Tools?

Architecture diagram showing MCP host application, internal client, JSON-RPC wire transport, and remote tool servers

Key Takeaways

  • •Model Context Protocol standardizes how language model hosts discover, negotiate, and invoke external tools and resources across open client-server interfaces.
  • •Examines core architecture: hosts, clients, and servers, analyzing the structural bottlenecks and trade-offs in real-world deployments.
  • •Provides engineering benchmarks and verification criteria for the three protocol primitives: tools, resources, and prompts.

On 11 November 2026, Google Open Source documented the transition of the Model Context Protocol to the Agentic AI Foundation, establishing a vendor-neutral standard for connecting language models to external data sources and tools. By replacing fragmented proprietary integrations with a unified JSON-RPC protocol, MCP provides a structured client-server architecture for autonomous tool execution.

Connecting generative artificial intelligence to real-world software has historically required custom SDKs and brittle API bridges. Every host application implemented proprietary schemas to expose local files, cloud databases, and development terminals. As developers built specialized agents across diverse runtimes, maintaining bespoke connectors for every tool provider became a major bottleneck. The Model Context Protocol resolves this fragmentation by defining a standardized wire format.

Core architecture: hosts, clients, and servers

The Model Context Protocol operates on an explicit division of responsibilities across three architectural participants:

text axisdream
┌────────────────────────────────────────────────────────┐
│                    Host Application                    │
│  (Desktop Environment, IDE, or CLI Orchestrator)       │
│                                                        │
│  ┌──────────────────────────────────────────────────┐  │
│  │                   MCP Client                     │  │
│  │  - Manages session lifecycle & capability checks │  │
│  │  - Serializes tool calls into JSON-RPC messages  │  │
│  └────────────────────────┬─────────────────────────┘  │
└───────────────────────────┼────────────────────────────┘
                            │ (Standard I/O or SSE)
                            ▼
┌────────────────────────────────────────────────────────┐
│                   Remote MCP Server                    │
│                                                        │
│  [Exposed Tools]     [Exposed Resources]  [Prompts]    │
│  (execute_sql)       (postgres://schema)  (analyze_db) │
└────────────────────────────────────────────────────────┘

The system separates concerns across three logical layers:

  • The host application: the primary user environment, such as an integrated development environment, desktop assistant, or command-line harness. The host coordinates the language model, renders user interfaces, and enforces security policies.
  • The MCP client: a protocol engine embedded inside the host application. The client establishes persistent connections with external servers, conducts initial capability negotiations, and translates model tool invocations into structured network packets.
  • The MCP server: an independent, lightweight process or remote microservice that exposes specific capabilities to the agent. Servers can run locally as child processes communicating over standard input and output streams, or remotely across networks using Server-Sent Events over HTTP.

The three protocol primitives: tools, resources, and prompts

An MCP server exposes capabilities to the host through three fundamental primitives defined in the formal protocol specification:

  1. Tools: executable routines that accept structured parameters, perform state-changing operations or external network requests, and return output text or binary blobs. For example, an open-source database server such as the GenAI Toolbox for Databases exposes tools such as execute_query and list_tables.
  2. Resources: read-only data endpoints designed to provide context without executing side-effects. Resources represent application logs, file contents, API schemas, or system telemetry. They use uniform resource identifiers, allowing the model to inspect database schemas before generating queries.
  3. Prompts: parameterized prompt templates maintained directly by the server author. Prompts encode expert workflows, instructing the model on how to query complex services or structure debugging requests.
When an MCP client initializes a connection to a server, the two processes exchange capability flags. The server informs the client of its available tools and resource routes, including JSON Schema definitions for all accepted arguments. The host formats these schemas into the system prompt, giving the model an accurate map of available actions.

Walkthrough of an autonomous tool invocation

To understand how MCP operates during task execution, consider an agent querying an internal operational database:

  • Step 1 (Model Selection): the user asks for active customer counts. The model reviews available tool definitions and outputs a structured tool-call object specifying the execute_query tool and providing the SQL string parameter.
  • Step 2 (Client Routing): the host application intercepts the model output. The internal MCP client looks up which registered server owns the requested tool and serializes the call into a JSON-RPC request packet containing a unique request identifier.
  • Step 3 (Server Execution): the MCP server receives the JSON-RPC payload, validates the input arguments against its schema, and executes the query against the database using its own local database connection pool and credentials.
  • Step 4 (Response Serialization): the server formats the database rows into a JSON-RPC response object and transmits it back across the transport stream.
  • Step 5 (Context Ingestion): the MCP client delivers the execution output back to the host application, which injects the returned records into the language model's active context window, allowing the model to generate the final analytical response.
Throughout this sequence, the language model never handles raw database credentials or establishes direct TCP connections. All execution passes through the mediated server interface.

Security boundaries and protocol limitations

While MCP standardizes communication interfaces, developers must recognize what the protocol does not provide:

  • MCP is not an authorization policy engine: exposing an execute_query tool through an MCP server does not protect against malicious SQL injections or destructive DROP TABLE statements. Authorization policies, row-level security, and read-only connection limits must be enforced by the server backend.
  • Transport security is an infrastructure responsibility: when deploying remote MCP servers over HTTP with Server-Sent Events, engineering teams must implement mutual TLS, OAuth tokens, and network segmentation to prevent man-in-the-middle attacks.
  • Tool description quality dictates model reliability: if a server maintainer provides vague tool descriptions or poorly specified JSON schemas, the language model will hallucinate arguments or invoke tools at inappropriate execution points.
The Model Context Protocol establishes a foundational transport layer for the emerging agentic software stack. By standardizing capability discovery, parameter schemas, and wire serialization, MCP enables autonomous agents to interact with external tools through an open, vendor-neutral interface.

Sources

Related Dispatches