Lesson 42 of 1596
MCP Deep Dive: The USB-C for AI Tools
Model Context Protocol is the most important open standard in agents. One protocol, 1,200+ servers, and your agent can plug into almost any system. Here's how it actually works.
Creators · Agentic AI · ~33 min read
Why MCP exists
Before MCP, every agent-to-tool connection was custom. Claude had one way to call a database. GPT had another. Your LangChain glue was a third. Multiply that by 1,000 tools and you had a combinatorial nightmare. Anthropic introduced MCP in late 2024 as 'USB-C for AI tools' — one protocol, any client, any server. By 2026 it's backed by Anthropic, OpenAI, Google, and the GitHub registry has 1,200+ servers.
The architecture
Compare the options
| Piece | Role |
|---|---|
| Host | The app the user interacts with (Claude Desktop, Claude Code, Cursor, OpenClaw). |
| Client | The host's MCP client instance, one per connected server. |
| Server | A separate process exposing tools/resources/prompts. |
| Transport | stdio (spawned subprocess) or HTTP/SSE (remote service). |
| Protocol | JSON-RPC 2.0. Typed message schemas. |
What a server exposes
- Tools — function-like actions (call with args, get a result).
- Resources — readable data URIs (file://, db://, custom://).
- Prompts — reusable prompt templates the host can surface.
- Sampling (optional) — server can ask host's model for completions.
- Roots — URI hints about where the server operates.
A real MCP config
Claude Desktop / Claude Code MCP config. Four real servers in the April 2026 registry. Drop this into ~/.claude/claude_desktop_config.json and restart.
{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects" ] }, "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_" } }, "supabase": { "command": "npx", "args": [ "-y", "@supabase/mcp-server-supabase@latest", "--project-ref", "your-project-ref" ], "env": { "SUPABASE_ACCESS_TOKEN": "sbp_" } }, "notion": { "url": "https://mcp.notion.com/sse", "transport": "sse", "headers": {"Authorization": "Bearer ntn_"} } } }Writing your own MCP server
A complete, minimal MCP server. Registers one tool, speaks stdio. About 30 lines.
// A tiny MCP server in TypeScript (@modelcontextprotocol/sdk) import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js"; const server = new Server( { name: "my-server", version: "0.1.0" }, { capabilities: { tools: {} } } ); server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [{ name: "greet", description: "Say hello to a person.", inputSchema: { type: "object", properties: { name: { type: "string" } }, required: ["name"], }, }], })); server.setRequestHandler(CallToolRequestSchema, async (req) => { if (req.params.name === "greet") { const name = (req.params.arguments as any)?.name ? "friend"; return { content: [{ type: "text", text: `Hello, ${name}!` }] }; } throw new Error("Unknown tool"); }); const transport = new StdioServerTransport(); await server.connect(transport);Servers worth knowing (April 2026)
- modelcontextprotocol/server-filesystem — scoped file access.
- modelcontextprotocol/server-github — issues, PRs, repos.
- modelcontextprotocol/server-postgres — SQL over any Postgres.
- Supabase, Neon, Vercel, Stripe — all ship official first-party MCPs.
- Zapier MCP — proxies to 8,000+ Zapier-connected apps.
- Notion, Linear, Slack, Google Drive, Calendar — official.
- Chroma, Pinecone, Vectara — vector DBs for RAG.
- Sentry, Datadog — observability from inside your agent.
Transports
Compare the options
| Transport | Use case | Pros | Cons |
|---|---|---|---|
| stdio | Local-only, spawned by host. | Zero network; trivial auth. | One process per client. |
| SSE / HTTP | Remote or shared server. | Multi-tenant, scales. | Need auth, TLS, ops. |
| Streamable HTTP (2025+) | Bidirectional over HTTP/2. | Best of both; modern. | Newer, fewer libs. |
MCP is the one thing to learn cold. Once you have it, every agent gets cheaper, every tool is reusable, and switching models becomes a config change.
Key terms in this lesson
End-of-lesson quiz
Check what stuck
8 questions · Score saves to your progress.
Tutor
Curious about “MCP Deep Dive: The USB-C for AI Tools”?
Ask anything about this lesson. I’ll answer using just what you’re reading — short, friendly, grounded.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Creators · 75 min
Capstone: Build and Ship a Real Agent
Everything comes together. Design, code, test, secure, and ship a production-quality agent with open-source code you can fork today.
Creators · 50 min
Tool Use at the API Level: The Primitive
Underneath every agent framework is the same primitive — the model returns a structured tool call, you execute it, you feed the result back. Master this loop and every framework looks familiar.
Creators · 48 min
Multi-Agent Orchestration: Planner + Executor + Verifier
One smart agent is fine. Two agents checking each other's work is better. Master the canonical orchestration patterns: planner/executor, judge/worker, debate, and swarm.
