Ad space · Your tool here
PluginStack
MCP Dev Tools · by Prefect

FastMCP

FastMCP official site ↗

Last checked against the official docs:

What it does

A Python framework for building MCP servers, clients and interactive apps. You write ordinary Python functions and FastMCP generates the tool schemas, validation and docs. FastMCP 1.0 was folded into the official MCP Python SDK in 2024; this is the actively maintained standalone project. Apache-2.0.

Who it's for

Python developers who want to turn their own functions or APIs into an MCP server quickly.

How to set it up

  1. Add it to your project with uv:

    bash
    uv add fastmcp
  2. Create server.py:

    text
    from fastmcp import FastMCP
    
    mcp = FastMCP("Demo")
    
    @mcp.tool
    def add(a: int, b: int) -> int:
        """Add two numbers"""
        return a + b
    
    if __name__ == "__main__":
        mcp.run()
  3. Run it with python server.py, then add it to your MCP client. A TypeScript counterpart is available as @prefecthq/fastmcp-ts.

Check the official FastMCP docs for the latest steps.

Example prompts

prompt
Turn the functions in utils/weather.py into a FastMCP server with one tool each.
prompt
Add a FastMCP resource that exposes our README as context.
prompt
Write a FastMCP client script that connects to my server and lists its tools.

Demo

Demo coming soon

A short walkthrough of FastMCP in action.

See all MCP Dev Tools on PluginStack