Who it is forA developer with internal scripts who wants Claude or a coding agent to use them directly.
The problemWriting an MCP server by hand means schemas, validation and protocol handling before any real logic.
The outcomeA working MCP server whose tools are plain Python functions, with schemas and docs generated for you.
What you need first
- Python and uv (recommended) for installation
- An MCP client to connect your server to, such as an AI assistant or coding agent
- For TypeScript projects: the separate fastmcp-ts package
Steps
- Run
uv add fastmcpin your project - Create an instance with
mcp = FastMCP("Demo 🚀")and decorate each function with @mcp.tool - Give each function type hints and a docstring; FastMCP builds the schema, validation and documentation from them
- Call mcp.run() under the main guard, as in the README example, and start the script
- Connect the server to your MCP client following the quickstart
Prompt for your agent
Using PrefectHQ/fastmcp, turn these Python functions into an MCP server: <list functions>. Add type hints and docstrings so the schemas are generated automatically, then connect it to my <MCP client> and test each tool.
Caveat. A tool runs with your machine's permissions, so only expose functions you would be comfortable letting an AI call.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for PrefectHQ/fastmcp and "Turn your Python functions into MCP tools"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer