Model Context Protocol MCP Technical Overview
MCP connects LLM applications with external data sources and execution tools via JSON-RPC 2.0.
Overview
The Model Context Protocol (MCP) is an open, JSON-RPC 2.0-based standard that connects Large Language Model (LLM) applications with external data sources, context, and execution tools. Inspired by the Language Server Protocol (LSP), MCP provides a unified architecture for building composable integrations across the AI ecosystem.
Key Insights
- Decoupled Architecture: Standardizes communication between LLM host applications, internal clients, and external capability servers.
- Stateless JSON-RPC Foundation: Utilizes JSON-RPC 2.0 for stateless, self-contained messaging with per-request capability negotiation.
- Bi-Directional Capabilities: Allows servers to supply context and tools while enabling clients to handle server-initiated input requests.
- Extensible Ecosystem: Supports opt-in extensions for asynchronous tasks, agent skills, and rich UI rendering.
- Security-First Model: Defines strict user-consent standards for arbitrary code execution and data access, treating unverified tool descriptions as untrusted.
Technical Details
Architecture and Roles
MCP establishes standardized communication across three distinct entities using JSON-RPC 2.0:
- Hosts: LLM applications (such as AI-powered IDEs or chat interfaces) that initiate connections.
- Clients: Internal connectors within the host application that manage protocol communication.
- Servers: External services that expose context, tools, and specialized capabilities.
Base messaging is stateless and self-contained, relying on per-request capability negotiation during initialization. Protocol normative statements adhere strictly to BCP 14 (MUST, SHOULD, MAY).
Core Features
MCP servers and clients expose distinct capabilities:
- Server Capabilities:
- Resources: Contextual data made available to the user or the LLM.
- Prompts: Reusable, templated messages and workflow abstractions.
- Tools: Functions exposed to the LLM for side-effect operations or code execution.
- Client Capabilities:
- Elicitation: Server-initiated requests prompting the user or host for additional required information.
Operational Utilities and Extensions
The base protocol includes built-in utilities for configuration, progress tracking, request cancellation, and error reporting.
Advanced functionality is managed through modular, opt-in extensions negotiated during client-server initialization:
- Tasks: Handles asynchronous, long-running operations using durable handles, status polling, and mid-flight input handling.
- Skills over MCP: Discovers and delivers structured, high-level instructions designed for autonomous agent workflows.
- MCP Apps: Enables servers to render interactive UI elements—such as forms, charts, and video players—inline within host conversations.
Security and Trust Framework
Because tool invocation introduces arbitrary code execution pathways, MCP mandates strict operational boundaries:
- Explicit User Consent: Hosts MUST obtain explicit user authorization prior to exposing user data or executing tools. Users must retain full visibility into data boundaries and tool actions.
- Data Privacy: Hosts MUST NOT transmit resource data to external endpoints without explicit user approval, and must protect user data using strict access controls.
- Tool Safety: Tool annotations and behavioral descriptions MUST be treated as untrusted unless provided by a verified, trusted server.
- Implementation Standard: Implementors SHOULD design clear authorization interfaces, document security implications, and apply robust access protections across all integrations.