MCP: Teaching Claude to Use APIs
Without MCP, Claude guesses for 8 minutes. With MCP, it finishes in seconds. Feel the pain first, then the payoff.
The Second-Hardest Concept
APIs were the first hard concept (Lesson 7). You learned what they are: doors between systems, requests and responses, the restaurant analogy. MCP is the second, and it only makes sense if you have the API foundation solid.
Here is the setup. You give Claude Code an API key and say: "Pull my latest data from this project management tool." Claude knows what a project management tool is in the abstract. It can guess at the API structure. But guessing takes time, and guesses are often wrong.
What follows is roughly eight minutes of fumbling. Claude reads documentation. Tries an endpoint. Wrong authentication. Tries another. Wrong URL format. Finds the right endpoint but mishandles pagination. Eventually it gets a result, but it is painful to watch.
Now imagine you install one thing (an MCP server for that same tool) and ask the exact same question. The answer comes back in seconds. Same API. Same question. Completely different experience.
Without MCP, Claude guesses how to use an API. With MCP, Claude knows exactly what to ask and how.
What MCP Actually Is
MCP stands for Model Context Protocol. It is a standardized way to give Claude a pre-built instruction manual for a specific tool or API.
Instead of Claude figuring out how to talk to your project management tool by trial and error, MCP hands it a complete reference: here are the available actions, here are the required parameters, here is how authentication works, here is what the responses look like.
An API is a door. MCP is the instruction manual that tells Claude which door to knock on, how to knock, and what to say when it opens.
MCP eliminates the trial-and-error loop by giving Claude a complete instruction manual for the API.
The most common confusion: "What is the difference between an MCP and an API?" An API is the thing itself, the actual interface that accepts requests and sends responses. MCP is the layer that teaches Claude how to use that API correctly. The API exists whether or not MCP does. MCP just makes Claude dramatically faster and more reliable when using it.
The Timed Demo: Feel the Pain First
This is the most important exercise in the entire curriculum. Do not skip it. Do not shortcut it. The contrast between "without" and "with" is the entire lesson.
Round 1: Without MCP. Give Claude an API key for a service (a project management tool, a CRM, a data provider). Ask it to pull some data. Start a timer. Watch Claude explore endpoints, hit authentication errors, misread documentation, retry with different parameters. It will get there eventually. Note the time. Note how many failed attempts it took.
Round 2: With MCP. Install the MCP server for that same service. Ask the exact same question. Watch it complete in seconds. No fumbling. No retries. Claude knew exactly what to call because MCP told it.
The contrast is the lesson. You have to feel the pain of "without" to appreciate the speed of "with."
In live teaching sessions, Round 1 typically takes 6-10 minutes. Round 2 takes under 30 seconds. The reaction is always the same: "This is so much quicker." That reaction is the goal. Once someone feels that difference in their gut, MCP never needs to be explained again.
How It Looks in Practice
After installing an MCP, you can see what it gave Claude by looking at the tool list. Claude Code has built-in tools: read, write, edit, search, run commands. When you install an MCP, new tools appear alongside those built-ins.
For example, a project management MCP might add tools like create_issue, list_projects, update_ticket, get_sprint_board. A CRM MCP might add search_contacts, get_deal, create_note. An email MCP might add send_email, list_threads, search_inbox.
These are not vague capabilities. They are specific, named tools with defined parameters. Claude does not have to guess what is available. It can see the full menu.
Run /mcp inside Claude Code to see which MCP servers are connected and what tools they provide.
The MCP Ecosystem
MCP servers exist for hundreds of tools. Some common categories:
- Project management: task trackers, sprint boards, issue systems
- Communication: email, chat platforms, messaging
- Data: CRMs, analytics platforms, data providers
- Databases: direct database access with query capabilities
- Development: GitHub, CI/CD, monitoring
- Custom: you can build your own MCP for any API
Some tools have official MCP servers maintained by the vendor. Others are community-built. And when no MCP exists for a tool you need, you can build one. It is a text-based configuration that maps API endpoints to tool definitions.
Not every API needs an MCP. For simple, well-documented APIs (like a public weather service), Claude can often figure it out on its own. MCP shines when the API is complex, has tricky authentication, or has many endpoints that Claude would otherwise have to discover by trial and error.
Installing an MCP
The typical flow:
- Find the MCP server for your tool (check the MCP directory at modelcontextprotocol.io, or search for "[tool name] MCP server").
- Add it to your Claude Code configuration (usually a JSON entry with the server location and your API credentials).
- Restart Claude Code. The new tools appear automatically.
The credentials (API keys) go in the MCP configuration, not in your code. Claude uses them behind the scenes when calling the tools. You set it up once and forget about it.
Custom MCPs
When no MCP exists for a tool, you build one. This sounds harder than it is. An MCP server is essentially a mapping: "here are the API endpoints, here is what each one does, here are the parameters it needs, here is what it returns."
You can ask Claude Code to build an MCP server for you. Describe the API, point it at the documentation, and it will generate the server configuration. You have now given Claude a permanent instruction manual for that API.
The question "can I build an MCP for anything?" comes up in every session. The answer is yes. If the tool has an API, you can build an MCP for it. The MCP does not replace the API. It wraps it so Claude knows how to use it without fumbling.
Further Reading
Concepts from this lesson:
- Model Context Protocol (Anthropic). The official MCP specification and server directory.
- MCP Servers Directory. Community and official MCP servers.
- Building MCP Servers (Anthropic). How to build your own.