Wrap an API as MCP tools with FastMCP, then call them from an agent. The same tools then work in every MCP client.
Out on Monday 26 October10 minutes, one build start to finish
Why this matters
Every agent needs tools, and writing them again for each framework is wasted work. The Model Context Protocol lets you write a tool once and use it from Claude Code, other MCP clients and your own agents. FastMCP turns a few Python functions into a server in minutes.
What you build
An MCP server that lets any agent call your API, tested from Claude Code.
Wrap two calls to your API as tools with FastMCP.
Run the server and list the tools it offers.
Add it to Claude Code and call the tools from a prompt.
Point a second MCP client at the same server, unchanged.
The ideas behind it
MCP
An open protocol for serving tools, data and prompts to AI applications, so any client can use any server.
Tools from functions
FastMCP reads a Python function's name, types and docstring and serves it as a tool.
One server, many clients
The same server works unchanged in every MCP client.
Before you start
You need
Python 3.10 or later, and an API you want an agent to call.
Length
About 10 minutes, one build start to finish.
Questions
Do I need FastMCP?
No, the official SDK works too. FastMCP removes most of the boilerplate.
Should the server call our production API?
Start against a test environment, and expose only the calls an agent should make.
How do I secure it?
Add OAuth before anyone else can reach it. The recorded lab Add Auth to an MCP Server shows how.
Is the recorded lab free?
Yes. Watch it any time, follow the steps and keep the code you build.
How is it different from a Live Lab?
A recorded lab is one short build you follow on your own. A Live Lab builds a bigger part of the system in an hour, with time for your questions.
Then take it further
This build is one piece. The Live Lab Build a Team of AI Agents goes from here to a working part of a real system.
Split one agent into roles
A planner, an engineer and a reviewer, each with its own prompt and model.
Scope tools per role
Each agent calls only the tools its role needs, and every call is logged.
Decide when it pays
Compare the team with one agent on quality, latency and token cost.
The parts of a production agent system that lab builds, lit on the map:
Week 1Architect
Roles and modelsOne job per agent, a model chosen for that job, and a token budget.
OrchestrationA queue agents pick work from, with hand-offs a person can follow.
Context and memoryRetrieval with sources, memory across sessions, prompts laid out for the cache.
Tool callingTyped tools that act in GitHub, Linear and Google.
Week 2Build
MCP serversEvery tool behind an MCP gateway, scoped to the role that needs it.
Durable executionRuns that resume after a crash and never repeat a write.
Human in the loopA person approves anything that cannot be undone.
Week 3Secure and deploy
Identity and permissionsEach agent signs in as itself and acts on behalf of a user.
LLM gatewayRouting, caching and a budget on every model call.
Traces, evals and costEvery run traced, scored and charged to the agent that made it.
Multi-tenancyEach team or customer kept apart, in data and in the bill.
Week 4Govern and extend
Policy as codeRules checked on every action, not written in a document.
Signed skillsNew roles built from reviewed, signed skills.