fastmcp
View on GitHub🚀 The fast, Pythonic way to build MCP servers and clients.
FastMCP is a Pythonic framework for building MCP servers and clients: decorate a function with @mcp.tool and it handles schema generation, validation, transports, and auth. It also offers a client for any MCP server and in-conversation app UIs.
Use Cases
Build MCP servers exposing Python functions as toolsConnect to remote or local MCP servers from Python or CLIExpose resources and prompts to LLMsGenerate tool schemas from type hints automaticallyAdd interactive UIs to MCP toolsProxy and compose existing MCP serversAuthenticate MCP clients and serversTest MCP servers in-memoryDeploy MCP servers as HTTP/SSE endpointsGenerate MCP servers from OpenAPI specs
Built With
- Language
- Python
- Frameworks
- FastMCP · MCP Python SDK · Starlette · Uvicorn · Pydantic · HTTPX · OpenAPI · Anthropic SDK · OpenAI SDK · Google Gemini SDK · Azure SDK · Typer
Tags
mcp · mcp-server · mcp-client · model-context-protocol · python · tool-calling · llm-integration · agent-tools · framework · server-framework · cli · authentication · transports · interactive-apps · openapi · prefect