title: "MCP Servers" last_updated: 2026-03-21 status: experimental difficulty: intermediate prerequisites: [04-hooks-and-commands]
MCP Servers
Coming in V2. This module is scaffolded with an outline.
Core Question
How do I extend agent capabilities with external tools and data?
Module Outline
Concepts
-
What is MCP (Model Context Protocol)? — An open protocol for connecting AI agents to external tools, data sources, and services. MCP servers expose capabilities that agents can discover and invoke.
-
Why MCP matters — Without MCP, your agent can only read files, run commands, and search. With MCP, it can query databases, call APIs, access knowledge bases, manage cloud infrastructure, and more.
-
The MCP architecture — Client (the AI agent) ↔ Server (your tool/service) ↔ Resource (the actual data or capability). Servers declare what they can do; clients discover and use those capabilities.
-
Built-in vs. custom MCP servers — Many tools come with pre-built MCP servers (databases, GitHub, Slack, etc.). You can also build custom servers for your specific tools and workflows.
-
When to use MCP vs. bash commands — MCP provides structured, discoverable interfaces. Bash is ad-hoc. Use MCP when you want the agent to understand what's available and use it reliably.
-
Security considerations — MCP servers can access sensitive resources. Permission models, scoping, and audit logging matter.
Tool-Specific Content
- Claude Code: MCP server configuration in settings.json, built-in MCP support, connecting to databases, APIs, custom tools
- Codex CLI: MCP support status, alternative approaches, Agents SDK integration
Exercises
- Connect to a pre-built MCP server (e.g., filesystem, GitHub)
- Use an MCP-connected agent to query a database
- Build a minimal custom MCP server
- Compare agent performance with and without MCP tools available