|
1 | 1 | <!-- omit in toc -->
|
2 |
| -# FastMCP |
| 2 | +# FastMCP 🚀 |
3 | 3 |
|
4 | 4 | <div align="center">
|
5 | 5 |
|
6 | 6 | [](https://pypi.org/project/fastmcp)
|
7 | 7 | [](https://github.com/jlowin/fastmcp/actions/workflows/run-tests.yml)
|
8 | 8 | [](https://github.com/jlowin/fastmcp/blob/main/LICENSE)
|
9 | 9 |
|
| 10 | +A fast, Pythonic way to build Model Context Protocol servers |
| 11 | + |
10 | 12 | </div>
|
11 | 13 |
|
12 |
| -FastMCP is a high-level, intuitive framework for building [Model Context Protocol (MCP)](https://modelcontextprotocol.io) servers with Python. While MCP is a powerful protocol that enables LLMs to interact with local data and tools in a secure, standardized way, the specification can be cumbersome to implement directly. FastMCP lets you build fully compliant MCP servers in the most Pythonic way possible - in many cases, simply decorating a function is all that's required. |
| 14 | +FastMCP makes building [Model Context Protocol (MCP)](https://modelcontextprotocol.io) servers simple and intuitive. Create tools, expose resources, and define prompts with clean, Pythonic code: |
| 15 | + |
| 16 | +```python |
| 17 | +from fastmcp import FastMCP |
13 | 18 |
|
14 |
| -🚧 *Note: FastMCP is under active development, as is the low-level MCP Python SDK* 🏗️ |
| 19 | +mcp = FastMCP("Demo 🚀") |
| 20 | + |
| 21 | +@mcp.tool() |
| 22 | +def add(a: int, b: int) -> int: |
| 23 | + """Add two numbers""" |
| 24 | + return a + b |
| 25 | +``` |
| 26 | + |
| 27 | +That's it! FastMCP handles all the complex protocol details and server management, so you can focus on building great tools. It's designed to be high-level and Pythonic - in most cases, decorating a function is all you need. |
| 28 | + |
| 29 | +🚨 🚧 🏗️ *FastMCP is under active development, as is the MCP specification itself. Core features are working but some advanced capabilities are still in progress.* |
15 | 30 |
|
16 | 31 | Key features:
|
17 |
| -* **Intuitive**: Designed to feel familiar to Python developers, with powerful type hints and editor support |
18 |
| -* **Simple**: Build compliant MCP servers with minimal boilerplate |
19 |
| -* **Fast**: High-performance async implementation |
20 |
| -* **Full-featured**: Complete implementation of the MCP specification |
| 32 | +* **Fast**: High-level interface means less code and faster development |
| 33 | +* **Simple**: Build MCP servers with minimal boilerplate |
| 34 | +* **Pythonic**: Feels natural to Python developers |
| 35 | +* **Complete***: FastMCP aims to provide a full implementation of the core MCP specification |
| 36 | + |
| 37 | +(\*emphasis on *aims* during construction) |
21 | 38 |
|
22 | 39 | <!-- omit in toc -->
|
23 | 40 | ## Table of Contents
|
|
0 commit comments