Skip to content

Commit dad0194

Browse files
dsp-antclaude
andcommitted
docs: Update README.md to include FastMCP
Update the README.md to include FastMCP as the recommended way to build MCP servers. FastMCP is a high-level, Pythonic interface that makes it easy to build MCP servers with minimal boilerplate. The low-level implementation is still available for more control. 🤖 Generated with Claude CLI. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 87cee0f commit dad0194

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,35 @@ Connections between clients and servers are established through transports like
7171

7272
## Quick Start
7373

74-
### Creating a Server
74+
### FastMCP
7575

76-
MCP servers follow a decorator approach to register handlers for MCP primitives like resources, prompts, and tools. The goal is to provide a simple interface for exposing capabilities to LLM clients.
76+
The fastest way to build MCP servers is with FastMCP, which provides a high-level, Pythonic interface:
7777

78-
**example_server.py**
78+
```python
79+
from fastmcp import FastMCP
80+
81+
mcp = FastMCP("Demo")
82+
83+
@mcp.tool()
84+
def add(a: int, b: int) -> int:
85+
"""Add two numbers"""
86+
return a + b
87+
88+
@mcp.resource("greeting://{name}")
89+
def get_greeting(name: str) -> str:
90+
"""Get a personalized greeting"""
91+
return f"Hello, {name}!"
92+
```
93+
94+
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.
95+
96+
For more information about FastMCP, see the [FastMCP documentation](https://github.com/jlowin/fastmcp).
97+
98+
### Low-Level Implementation
99+
100+
For more control, you can use the low-level MCP implementation directly. This gives you full access to the protocol and allows you to customize every aspect of your server:
79101

80102
```python
81-
# /// script
82-
# dependencies = [
83-
# "mcp"
84-
# ]
85-
# ///
86103
from mcp.server import Server, NotificationOptions
87104
from mcp.server.models import InitializationOptions
88105
import mcp.server.stdio
@@ -339,4 +356,4 @@ We are passionate about supporting contributors of all levels of experience and
339356

340357
## License
341358

342-
This project is licensed under the MIT License - see the LICENSE file for details.
359+
This project is licensed under the MIT License - see the LICENSE file for details.

0 commit comments

Comments
 (0)