# Model Context Protocol (MCP) Codex > The definitive open knowledge base, protocol specification, and server registry for Model Context Protocol (MCP) — connecting AI agents (Claude, OpenAI Codex, Cursor, Antigravity, Windsurf, Cline) to tools, databases, and APIs. ## Overview Model Context Protocol (MCP) is an open standard that enables AI models and autonomous agents to safely connect with external data sources, developer tools, internal APIs, and executable environments over standard JSON-RPC 2.0 transports. ## Core Architectural Primitives - **Tools**: Dynamic functions invoked by AI agents with JSON Schema validation (`tools/list`, `tools/call`). - **Resources**: Static or dynamic context URIs (files, DB schemas, telemetry) attached to conversations (`resources/list`, `resources/read`, `resources/subscribe`). - **Prompts**: Pre-engineered slash commands and parameter templates registered by servers (`prompts/list`, `prompts/get`). - **Roots**: Explicit workspace directories defining filesystem boundaries (`roots/list`). - **Dynamic Sampling**: Mechanism allowing MCP servers to request LLM completions back through the host client (`sampling/createMessage`). ## Transports 1. **STDIO**: Local process execution over standard input/output pipes. STDOUT is reserved strictly for JSON-RPC 2.0 frames; all debugging logs must go to STDERR. 2. **SSE (Server-Sent Events)**: Remote HTTP transport with streaming server-to-client events and client-to-server POST endpoints. 3. **Streamable HTTP**: Modern standard HTTP streaming for containerized microservices. ## Machine-Readable Resources & Documentation - [Full LLMs Knowledge Base](https://mcp-codex.com/llms-full.txt): Complete technical reference with full schemas and configuration examples. - [Agent Skill Guide](https://mcp-codex.com/.well-known/agent-skills/mcp-codex.md): Standard system prompt instructions for autonomous agents using MCP. - [Server Registry](https://mcp-codex.com/servers): Searchable catalog of 35+ verified MCP servers with tool schemas and config snippets. - [Client Setup Guides](https://mcp-codex.com/setup/claude-desktop): Step-by-step setup guides for Claude Desktop, Cursor, Codex CLI, Windsurf, Cline, and Zed. - [Server Comparison Matrix](https://mcp-codex.com/compare/postgres-vs-sqlite): Side-by-side feature and tool matrix across major MCP servers. - [Technical Glossary](https://mcp-codex.com/glossary): Definitions for stdio, SSE, JSON-RPC, roots, sampling, and troubleshooting terms. - [Protocol Specification](https://mcp-codex.com/protocol): In-depth interactive spec breakdown of JSON-RPC 2.0 messages. - [Interactive Protocol Playground](https://mcp-codex.com/playground): Browser simulator for tools/call, tools/list, and handshake negotiation. - [Config Generator](https://mcp-codex.com/generator): Instant multi-client config builder (Claude Desktop, Cursor, Antigravity, Windsurf, Cline, Codex CLI, Zed). - [Config Linter](https://mcp-codex.com/linter): Static analysis diagnostics for syntax errors, missing env vars, and Windows escape paths. - [Error Decoder](https://mcp-codex.com/errors): Root cause database and automated fix patches for ENOENT, -32603, SSE closed, 403 SAML, SSL errors. - [Compatibility Matrix](https://mcp-codex.com/compatibility): Feature matrix and configuration paths across 12+ AI clients. - [Atom / RSS Feed](https://mcp-codex.com/feed.xml): Live feed of new guides, updates, and server listings. ## Curated MCP Server Categories - **Databases**: PostgreSQL (`@modelcontextprotocol/server-postgres`), MySQL, SQLite (`mcp-server-sqlite`), MongoDB, Neo4j, Turso/LibSQL, ChromaDB Vector, Supabase, Neon. - **Developer Tools**: GitHub (`@modelcontextprotocol/server-github`), Git, Docker, Sentry, Safe Shell Sandbox, OpenTelemetry Tracing, Linear, GitHub Actions. - **Search & Web**: Playwright (`@anthropic/mcp-server-playwright`), Brave Search (`@modelcontextprotocol/server-brave-search`), Puppeteer, Fetch, Google Drive. - **APIs & Enterprise**: Stripe, Slack (`@modelcontextprotocol/server-slack`), Cloudflare, Notion. - **Core AI**: Context7 (`@upstash/context7-mcp`), Memory Graph (`@modelcontextprotocol/server-memory`), Sequential Thinking (`@modelcontextprotocol/server-sequential-thinking`), Filesystem (`@modelcontextprotocol/server-filesystem`). ## Quick Configuration Examples ### Claude Desktop (`claude_desktop_config.json`) ```json { "mcpServers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx" } }, "postgres": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost:5432/mydb"] } } } ``` ### Cursor (`mcp.json`) & Antigravity (`mcp_config.json`) ```json { "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "./"] }, "sqlite": { "command": "uvx", "args": ["mcp-server-sqlite", "--db-path", "./data.db"] } } } ```