Home / Glossary / Model Context Protocol (MCP)

Definition

Model Context Protocol (MCP)

The Model Context Protocol (MCP) is an open standard created by Anthropic that provides a universal way to connect AI models to external tools, data sources, and APIs. It acts as a standardized interface—like USB for AI—so any MCP-compatible tool can work with any MCP-compatible AI agent.

Why MCP exists

Before MCP, every AI tool built its own custom integrations for databases, APIs, and external services. This meant duplicated work across tools and vendor lock-in for users. MCP solves this by defining a standard protocol: tool makers build one MCP server, and it works with every AI agent that supports MCP—Claude Code, Cursor, Windsurf, and others.

How MCP works

MCP uses a client-server architecture. The AI agent (client) connects to MCP servers that expose tools, resources, and prompts. When the agent needs to query a database, search documentation, or call an API, it sends a standardized request to the appropriate MCP server. The server handles the actual interaction and returns structured results the agent can reason about.

json
// Example: MCP server configuration in Claude Code
// ~/.claude/settings.json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_TOKEN": "ghp_..." }
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": { "DATABASE_URL": "postgresql://..." }
    }
  }
}

MCP servers are available for GitHub, PostgreSQL, Slack, Google Drive, file systems, and dozens of other services. Check the MCP server registry for a full list of community-built integrations.

What is the Model Context Protocol used for?+
MCP connects AI coding agents to external tools and data. Common uses include querying databases, searching documentation, accessing APIs, reading files from cloud storage, and interacting with project management tools—all from within the AI agent's workflow.
Which AI tools support MCP?+
Claude Code, Cursor, Windsurf, Cline, and several other AI coding tools support MCP. Because it is an open protocol, any tool can implement MCP support.
Is MCP only for coding?+
No. While MCP is widely used in AI coding tools, it is a general-purpose protocol. It can connect AI models to any external system—customer support platforms, research databases, CRM tools, and more.
How do I create a custom MCP server?+
MCP servers can be built in TypeScript, Python, or any language that supports JSON-RPC. The MCP SDK provides starter templates. A basic server defines tools (functions the AI can call) and resources (data the AI can read).

Related terms

Agentic CodingClaude CodeCLAUDE.mdCoding Agent

Master Claude Code in days, not months

37 hands-on lessons from beginner to CI/CD automation. Module 1 is free.

START FREE →
← ALL TERMS