π Living glossary
Key terms in this track. Come back here whenever you need to.
read_file, query_db.π‘ The MCP Protocol Explained
Imagine it this way: You hire an assistant who speaks 10 languages. But if every vendor invents its own language, the assistant has to learn 10 grammars. MCP is the "universal language" all vendors use to communicate with AI agents.
MCP means Model Context Protocol. Itβs a protocol open, created by Anthropic and released to the entire community, which standardizes how AI agents discover and use external tools. Before MCP, each tool had its own integration. Now a single protocol connects the agent to any service that implements the pattern.
In practice, MCP uses JSON-RPC 2.0 about a communication channel (usually stdio for local processes, or HTTP with SSE for remote servers). The agent sends a JSON message saying "I want to call tool X with these parameters," and the server responds with the result, also in JSON. Simple, predictable, and extensible.
The client (Claude Code) sends a JSON-RPC request; the server executes it and returns the result.
In one sentence: MCP is the standardized JSON-RPC that lets the agent call any external tool with a single protocol.
ποΈ Client-Server Architecture
Imagine it this way: A restaurant. The waiter (client) takes the order and brings it to the kitchen (server). The kitchen prepares the dish and sends it back. The waiter doesn't need to know how to cook; the kitchen doesn't need to know how to serve. Each does its part.
In the MCP, the client and Claude Code. It knows how to talk to the user, plan tasks, and decide when it needs a tool. The server is a separate process that knows how to do something specific: read files, query a database, send an email. The client finds out what the server offers (via tools/list), and then calls the tool you need (via tools/call).
The channel between them can be stdio (the client starts the server as a child process and communicates via stdin/stdout) or HTTP + SSE (the server runs remotely and accepts connections). In day-to-day use with Claude Code, you almost always use stdio: the agent spawns the MCP process, communicates with it, and kills it when the session ends.
Who is the βclientβ in Claude Codeβs MCP ecosystem?
In one sentence: Claude Code (client) starts the MCP server, discovers the tools, calls what it needs, and shuts down.
π Tool Discovery and Schemas
When the client connects to an MCP server, the first thing it does (after the handshake) is request the list of tools available via tools/list. Each tool comes with three things: a name (e.g., read_query), you description (text that explains what it does), and a inputSchema (JSON Schema saying which parameters it accepts).
The agent reads the schema and "understands" which parameters it needs to provide. It's as if each tool came with a built-in manual. The better the description and schema, the more often the agent gets it right the first time. A bad schema is like giving it a form without labels: the agent will guess.
{
"name": "read_query",
"description": "Execute a SELECT query against the database",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The SQL SELECT query to execute"
}
},
"required": ["query"]
}
}
The schema is the contract
The inputSchema works exactly like an OpenAPI JSON Schema. If you've worked with REST APIs documented using Swagger/OpenAPI, the mechanism is identical: the schema describes types, required fields, and descriptions. The difference is that the one reading the schema isn't a human developer, but the AI agent itself.
In one sentence: each tool has a JSON schema that the agent reads to know exactly what to send.
π‘ Why MCP Matters
Imagine it this way: before USB, every device had a different connector. USB standardized the connection, and the peripheral ecosystem exploded. MCP is the "USB for AI agents."
Without MCP, Claude Code only has its built-in tools: reading/writing files, running bash, and searching the web. It works, but itβs like a computer without USB ports: it handles the basics and stops there. With MCP, you can plug in as many βperipheralsβ as you want: a database, Slack, email, calendar, any API.
The practical impact is huge. Instead of writing glue scripts for each integration, you configure an MCP server and the agent figures it out on its own what it can do. Standardization means any MCP server built by anyone works with any MCP client. Unlimited composition.
Without MCP
- * Built-in tools only (file, bash, web)
- * Each integration = custom script
- * Doesnβt scale: 5 integrations = 5 scripts
- * Agent limited to the filesystem
With MCP
- * Hundreds of tools via a standard protocol
- * Single config in settings.json
- * Scales: 50 tools = same pattern
- * Agent operates DBs, APIs, SaaS, everything
In one sentence: MCP turns Claude Code from a "file editor" into a "systems operator connected to everything."
π Current Ecosystem
The MCP ecosystem is already vast. There are more than 200 open source servers covering categories such as: DevOps (Git, Docker, Kubernetes), Database (Postgres, SQLite, Redis, MongoDB), SaaS (Slack, Notion, Linear, Gmail, Calendar), Cloud (AWS, GCP, Cloudflare), and Utilities (browser automation, web search, file conversion).
Anthropic's official servers cover the basics: filesystem, git, SQLite, Postgres, puppeteer, brave-search. The community contributes the rest. Repositories such as awesome-mcp-servers on GitHub is the marketplace Smithery.ai are the best starting points for discovering what's available.
Main ecosystem categories
Git, Docker, K8s, CI/CD
Postgres, SQLite, Redis, Mongo
Slack, Notion, Linear, Gmail
AWS, GCP, Cloudflare
Browser, search, scraping
PDF, image, email, calendar
In one sentence: 200+ open-source servers, from Git to Slack, ready to plug into Claude Code.
π Analogy with REST APIs
If you've worked with REST APIs, MCP will feel familiar. In REST, you have endpoints (GET /users, POST /orders). With MCP, you have tools (list_users, create_order). With REST, the documentation comes in an OpenAPI spec. With MCP, it comes in the inputSchema.
The fundamental difference: REST was made for human developers to call via code. MCP was made for AI agents call automatically. That's why the schema is more descriptive (the agent needs to "understand" what the tool does just by reading its description) and discovery is automatic (the agent lists the tools at runtime, without reading documentation).
| Aspect | REST API | MCP |
|---|---|---|
| Unit | Endpoint (URL + method) | Tool (name + schema) |
| Documentation | OpenAPI / Swagger | inputSchema (JSON Schema) |
| Discovery | Manual (read the docs) | Automatic (tools/list) |
| Consumer | Human-written code | AI Agent (automatic) |
| Transport | HTTP | stdio or HTTP+SSE |
In one sentence: MCP is like a REST API, but with automatic discovery and optimized for agents (not humans).
π§Ύ Module Summary
Next module:
3.2 β Your First MCPs: hands-on with Filesystem, Git, and SQLite.