| 1 | <div align="center"> |
| 2 | |
| 3 | <!-- omit in toc --> |
| 4 | |
| 5 | <picture> |
| 6 | <source width="550" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-4-dark.png"> |
| 7 | <source width="550" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-4.png"> |
| 8 | <img width="550" alt="FastMCP Logo" src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-2.png"> |
| 9 | </picture> |
| 10 | |
| 11 | # FastMCP 🚀 |
| 12 | |
| 13 | <strong>Move fast and make things.</strong> |
| 14 | |
| 15 | *Made with 💙 by [Prefect](https://www.prefect.io/)* |
| 16 | |
| 17 | [](https://gofastmcp.com) |
| 18 | [](https://discord.gg/uu8dJCgttd) |
| 19 | [](https://pypi.org/project/fastmcp) |
| 20 | [](https://github.com/PrefectHQ/fastmcp/actions/workflows/run-tests.yml) |
| 21 | [](https://github.com/PrefectHQ/fastmcp/blob/main/LICENSE) |
| 22 | |
| 23 | <a href="https://trendshift.io/repositories/21461" target="_blank"><img src="https://trendshift.io/api/badge/repositories/21461" alt="prefecthq%2Ffastmcp | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> |
| 24 | </div> |
| 25 | |
| 26 | --- |
| 27 | |
| 28 | The [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) connects LLMs to tools and data. FastMCP gives you everything you need to go from prototype to production: |
| 29 | |
| 30 | ```python |
| 31 | from fastmcp import FastMCP |
| 32 | |
| 33 | mcp = FastMCP("Demo 🚀") |
| 34 | |
| 35 | @mcp.tool |
| 36 | def add(a: int, b: int) -> int: |
| 37 | """Add two numbers""" |
| 38 | return a + b |
| 39 | |
| 40 | if __name__ == "__main__": |
| 41 | mcp.run() |
| 42 | ``` |
| 43 | |
| 44 | ## Why FastMCP |
| 45 | |
| 46 | Building an effective MCP application is harder than it looks. FastMCP handles all of it. Declare a tool with a Python function, and the schema, validation, and documentation are generated automatically. Connect to a server with a URL, and transport negotiation, authentication, and protocol lifecycle are managed for you. You focus on your logic, and the MCP part just works: **with FastMCP, best practices are built in.** |
| 47 | |
| 48 | **That's why FastMCP is the standard framework for working with MCP.** FastMCP 1.0 was incorporated into the official MCP Python SDK in 2024. Today, the actively maintained standalone project is downloaded a million times a day, and some version of FastMCP powers 70% of MCP servers across all languages. |
| 49 | |
| 50 | FastMCP has three pillars: |
| 51 | |
| 52 | <table> |
| 53 | <tr> |
| 54 | <td align="center" valign="top" width="33%"> |
| 55 | <a href="https://gofastmcp.com/servers/server"> |
| 56 | <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/servers-card.png" alt="Servers" /> |
| 57 | <br /><strong>Servers</strong> |
| 58 | </a> |
| 59 | <br />Expose tools, resources, and prompts to LLMs. |
| 60 | </td> |
| 61 | <td align="center" valign="top" width="33%"> |
| 62 | <a href="https://gofastmcp.com/apps/overview"> |
| 63 | <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/apps-card.png" alt="Apps" /> |
| 64 | <br /><strong>Apps</strong> |
| 65 | </a> |
| 66 | <br />Give your tools interactive UIs rendered directly in the conversation. |
| 67 | </td> |
| 68 | <td align="center" valign="top" width="33%"> |
| 69 | <a href="https://gofastmcp.com/clients/client"> |
| 70 | <img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/clients-card.png" alt="Clients" /> |
| 71 | <br /><strong>Clients</strong> |
| 72 | </a> |
| 73 | <br />Connect to any MCP server — local or remote, programmatic or CLI. |
| 74 | </td> |
| 75 | </tr> |
| 76 | </table> |
| 77 | |
| 78 | **[Servers](https://gofastmcp.com/servers/server)** wrap your Python functions into MCP-compliant tools, resources, and prompts. **[Clients](https://gofastmcp.com/clients/client)** connect to any server with full protocol support. And **[Apps](https://gofastmcp.com/apps/overview)** give your tools interactive UIs rendered directly in the conv |