📁
MCP Docs
📖
API Reference
💻
Examples
⚡
Terminal
Model Context Protocol Documentation

Model Context Protocol

The Model Context Protocol (MCP) is an open standard that enables secure connections between AI applications and external data sources and tools.

  • Universal Connectivity: Connect AI to any data source
  • Secure Architecture: Built-in security and access controls
  • Developer Friendly: Simple integration patterns
  • Open Standard: Community-driven protocol

Status: The Model Context Protocol is actively developed and maintained by Anthropic in collaboration with the open source community.

Quick Start Guide

Installation

npm install @modelcontextprotocol/sdk

Basic Usage

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 Architecture

Core Components

  • MCP Client: AI application that consumes MCP services
  • MCP Server: Provides tools and resources to clients
  • Transport Layer: Handles communication between client and server

Communication Flow

MCP uses JSON-RPC 2.0 for all communications, ensuring reliable and standardized message passing between components.

🔊
🌐
3:14 PM