Introduction to MCP 2.0
The Model Context Protocol (MCP) defines a standardized way for applications to exchange contextual information with AI models, particularly Large Language Models (LLMs).
MCP functions as a universal connector (like USB-C for AI), enabling seamless context propagation across systems, applications, and model boundaries.
- Consistent context sharing across different tools and systems
- Improved AI responses through contextual awareness
- Enhanced security with standardized context validation
- Reduced development effort with reusable components
Core Concepts
MCP is built around these fundamental concepts:
Context Object
A standardized JSON structure containing metadata about the current operation, user, environment, and intent.
Context Propagation
Mechanisms for passing context between systems, ensuring consistent information flow.
Validation Rules
Standards for ensuring context quality and completeness before use.
Integration Patterns
Standard approaches for integrating MCP with various systems (APIs, UIs, agents, etc.)
Context Schema
The MCP Context Object follows this standard schema:
{
"user": "string", // User identifier or anonymous ID
"task": "string", // Current task or operation being performed
"intent": "string", // User's intent or goal for this operation
"env": "string", // Environment (dev, prod, etc.)
"code_state": "string", // State of code being worked with
// Optional extended fields
"subtask": "string", // Current step within the task
"history": [], // Previous context states or operations
"constraints": {}, // Any limitations or requirements
"preferences": {} // User preferences affecting output
}
All MCP-compatible systems should support at least the core fields and gracefully handle any additional context fields.