Home / Protocols

WTF is MCP? (Model Context Protocol)

mainstreamFirst seen 25 Nov 2024

An open protocol that lets AI apps plug into external tools and data through a standard interface.

Also called: model context protocol

TL;DR

Before MCP, every AI app needed custom glue code for every tool it wanted to use. MCP is a shared plug shape: write a tool server once, and any MCP-compatible agent can use it. People often call it "USB-C for AI".

How it works

MCP uses a client–server model over JSON-RPC 2.0. A host application (an IDE, chat app or agent) runs MCP clients that connect to MCP servers. Servers expose three main primitives: tools (functions the model can call), resources (data the app can read into context) and prompts (reusable templates). Transports include stdio for local servers and streamable HTTP for remote ones. The model never talks to the server directly; the host mediates every call, which is where permissions and approvals live.

Example

Registering a local MCP server in a host's config
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_TOKEN": "<your-token>" }
    }
  }
}

Origin

Coined / introduced by
Anthropic
When
25 Nov 2024
Story
Open-sourced by Anthropic, then adopted by other major AI vendors and tools.

Related jargons

Sources