Favicon of FastMCP

FastMCP

An open-source Python MCP framework for building servers, connecting to local or remote tools, and adding interactive interfaces to conversations. Apache 2.0.

Screenshot of FastMCP website

FastMCP is an open-source Python framework for developers connecting AI agents to their own tools and data through the Model Context Protocol (MCP). It supports locally running servers and connections to remote servers, with server development and client access in the same framework. It uses the Apache 2.0 license.

Ordinary Python functions become tools that an agent can call. Servers can also expose data as resources and supply reusable prompts. FastMCP generates the descriptions of tool inputs and outputs, checks their validity, and handles protocol compatibility and authentication. That reduces the protocol code developers need to write around existing application logic.

Tools can return interactive interfaces within a conversation, including forms, tables, and charts alongside their results. The client supports connections through Python, the command line, or another MCP application, so developers can use the framework both to publish tools and to call them. It manages connection lifecycles and the communication details for local and remote servers.

Prefect maintains FastMCP and an official TypeScript counterpart with the same server, client, and interactive app concepts. Its separate Horizon enterprise gateway adds centralized deployment and access management for teams, including a private server registry, SSO, permissions for individual tools, audit logs, and endpoints that combine approved tools.

Similar to FastMCP