Model Context Protocol is an open standard that connects AI models to external tools, databases, and local file systems via secure JSON-RPC interfaces.
The Model Context Protocol (MCP) is an open, vendor-neutral standard introduced by Anthropic in late 2024 to solve the M×N integration challenge between generative AI applications (Claude Desktop, AI IDEs, agentic frameworks) and external data sources (PostgreSQL, GitHub, Slack, local file systems, development tools). Modeled after the transformative Language Server Protocol (LSP) in software development, MCP replaces fragmented, proprietary plugin APIs with a unified, bidirectional protocol communicating via JSON-RPC 2.0.
Validate, test, and debug MCP server manifests with our interactive MCP Schema Validator.
| Specification | Details |
|---|---|
| Originator & Year | Anthropic (November 2024, Open Source / MIT) |
| Transport Protocols | stdio (Standard Input/Output for local processes) & SSE (Server-Sent Events over HTTP) |
| Message Protocol | JSON-RPC 2.0 |
| Core Primitives | Prompts, Resources (Data/Content), Tools (Executable Functions) |
| Supported Clients | Claude Desktop, Antigravity IDE, Cursor, Continue.dev, Zed |
| Official SDKs | TypeScript (@modelcontextprotocol/sdk), Python (mcp), Kotlin |
┌────────────────────────────────────────────────────────┐
│ MCP Host (Application) │
│ (e.g., Claude Desktop / IDE) │
│ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ MCP Client │ │
│ └───────┬──────────────────────────┬───────────────┘ │
└──────────┼──────────────────────────┼──────────────────┘
│ stdio │ HTTP / SSE
▼ ▼
┌─────────────────────────┐ ┌─────────────────────────┐
│ Local MCP Server │ │ Remote MCP Server │
│ (e.g., Filesystem/Git) │ │ (e.g., Postgres / API) │
└─────────────────────────┘ └─────────────────────────┘
execute_query, git_commit, send_slack_message) that the AI model can invoke with structured JSON Schema parameters after receiving explicit user permission.An MCP server exposes available tools by responding to the tools/list RPC endpoint:
{
"name": "query_database",
"description": "Executes a parameterized read-only SQL query against the database.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Valid SQL SELECT statement"
},
"maxRows": {
"type": "integer",
"default": 100
}
},
"required": ["query"]
}
}
When an agent model chooses to call this tool, the client sends a tools/call request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "query_database",
"arguments": {
"query": "SELECT id, email, created_at FROM users LIMIT 5;",
"maxRows": 5
}
}
}
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { ListToolsRequestSchema, CallToolRequestSchema } from '@modelcontextprotocol/sdk/types.js';
const server = new Server(
{ name: 'devflow-mcp', version: '1.0.0' },
{ capabilities: { tools: {} } }
);
// Register available tools
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
{
name: 'format_json',
description: 'Format, validate, and beautify a JSON string.',
inputSchema: {
type: 'object',
properties: {
rawJson: { type: 'string' },
indent: { type: 'number', default: 2 }
},
required: ['rawJson']
}
}
]
}));
// Connect via standard I/O transport
const transport = new StdioServerTransport();
await server.connect(transport);
Just as Microsoft's Language Server Protocol (LSP) allowed any code editor (VS Code, Sublime, Neovim) to support autocomplete and diagnostics for any language without writing $N \times M$ plugins, MCP allows any AI client to connect to any data source or tool ecosystem through one shared, universal standard.
MCP enforces human-in-the-loop security boundaries. The host client prompts the user for explicit confirmation before executing sensitive tool calls (like file modifications or shell commands), preventing autonomous rogue agent actions.
Test your server schemas, method signatures, and tool argument validation rules with our MCP Schema Validator.
Free, browser-based utilities to test, generate, and inspect Model Context Protocol (MCP) payloads directly.