The Model Context Protocol (MCP) is an open standard that enables secure connections between AI applications and external data sources and tools.
Status: The Model Context Protocol is actively developed and maintained by Anthropic in collaboration with the open source community.
npm install @modelcontextprotocol/sdk
import { Server } from '@modelcontextprotocol/sdk/server';
const server = new Server({
name: 'my-mcp-server',
version: '1.0.0'
});
server.setRequestHandler(ListToolsRequestSchema, async () => {
return {
tools: [
{
name: 'read_file',
description: 'Read a file from the filesystem',
inputSchema: {
type: 'object',
properties: {
path: { type: 'string' }
}
}
}
]
};
});
MCP uses JSON-RPC 2.0 for all communications, ensuring reliable and standardized message passing between components.