FastMCP
Implements a Model Context Protocol (MCP) server in Python, offering both stdio and Streamable HTTP transports for AI clients to discover and invoke tools.
The FastMCP server provides a robust Python implementation of the Model Context Protocol (MCP), an open, JSON-RPC-based standard for AI clients to discover and invoke tools and resources. It offers both local stdio and remote Streamable HTTP transports, powered by a shared, centralized tool registry. Designed with production in mind, it prioritizes security through features like a sandboxed filesystem, SSRF guards, Origin validation, and bearer token authentication, ensuring safe and deterministic tool execution while keeping LLM reasoning within the agent.
Key Features
01Supports stdio and Streamable HTTP transports for flexible integration with AI agents.
02Centralized tool registry ensures consistent tool discovery and invocation across transports.
03Strong security model includes filesystem sandboxing and SSRF guards for HTTP client operations.
04Enforces strict input validation using Pydantic models and JSON Schema for all tools.
05Provides append-only artifact logging for observability, auditing, and multi-turn traceability.
060 GitHub stars
Use Cases
01Providing secure access to filesystem operations and HTTP fetching for AI workflows within a controlled environment.
02Enabling AI agents to safely discover and invoke deterministic tools like file I/O or HTTP requests via a standardized protocol.
03Building audit trails and managing ephemeral state for multi-turn agent interactions using artifact logging and an optional key-value store.