FastMCP
jlowin / fastmcp
Build MCP servers quickly in Python: decorators declare tools, resources and prompts, schemas are generated, with stdio/HTTP transports, auth, composition and testing.
Why choose it
- One decorator turns a function into an MCP tool.
- Both stdio and HTTP transports are covered, simplifying client integration.
- Testing and composition beat hand-written JSON-RPC.
Not for
Not an MCP client; you still need Claude, Cursor or another host.
Production needs your own auth, rate limits, audit and network isolation.
Poor tool descriptions still cause bad model calls.
Minimum setup
- pip install fastmcp, write an add(a, b) tool and test it with the in-memory client.
- Then start HTTP transport and confirm a host can list and call the tool.
- Add logging, timeouts and error returns before thinking about auth.
Dependencies and cost
Python 3.10+; stdio needs no network, HTTP needs an ASGI server and reverse proxy; production needs identity and audit.
License and usage boundaries
Apache-2.0; the MCP specification and clients carry their own terms.
Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.
Alternatives and neighbors
- OpenAI Agents SDK — Start here,A lightweight agent runtime with four core ideas: agents, handoffs, guardrails and traces.
- Google ADK — Production,Google’s code-first Python agent toolkit, bringing tools, sessions, memory, evaluation and deployment into one abstraction, usable with Gemini or other models.
- LangGraph — Production,Write an agent as a stateful graph: nodes, edges, checkpoints, human approval and rollback are explicit.
Next steps
- Open GitHub and read the README, LICENSE, latest release and issues first.
- Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
- Run a small sample first, then decide on production; never start with production data.