Jeremiah Lowin commited on
Commit
f80ec7c
Β·
1 Parent(s): 0332908

update readme

Browse files
Files changed (2) hide show
  1. README.md +68 -48
  2. docs/getting-started/welcome.mdx +7 -4
README.md CHANGED
@@ -4,6 +4,7 @@
4
  # FastMCP v2 πŸš€
5
  <strong>The fast, Pythonic way to build MCP servers.</strong>
6
 
 
7
  [![PyPI - Version](https://img.shields.io/pypi/v/fastmcp.svg)](https://pypi.org/project/fastmcp)
8
  [![Tests](https://github.com/jlowin/fastmcp/actions/workflows/run-tests.yml/badge.svg)](https://github.com/jlowin/fastmcp/actions/workflows/run-tests.yml)
9
  [![License](https://img.shields.io/github/license/jlowin/fastmcp.svg)](https://github.com/jlowin/fastmcp/blob/main/LICENSE)
@@ -27,48 +28,27 @@ if __name__ == "__main__":
27
  mcp.run()
28
  ```
29
 
30
- Run it locally for testing:
31
- ```bash
32
- fastmcp dev server.py
33
- ```
34
 
35
- Install it for use with Claude Desktop:
36
  ```bash
37
- fastmcp install server.py
38
  ```
39
 
40
  FastMCP handles the complex protocol details and server management, letting you focus on building great tools and applications. It's designed to feel natural to Python developers.
41
 
42
- ## Key Features:
43
-
44
- * **Simple Server Creation:** Build MCP servers with minimal boilerplate using intuitive decorators (`@tool`, `@resource`, `@prompt`).
45
- * **Proxy MCP Servers:** Create proxy servers to expose existing MCP servers or clients with modifications, or convert between transport protocols (e.g., expose a Stdio server via SSE for web access).
46
- * **Compose MCP Servers:** Compose complex applications by mounting multiple FastMCP servers together.
47
- * **API Generation:** Automatically create MCP servers from existing **OpenAPI specifications** or **FastAPI applications**.
48
- * **Powerful Clients:** Programmatically interact with *any* MCP server, regardless of how it was built.
49
- * **LLM Sampling:** Request completions from client LLMs directly within your MCP tools.
50
- * **Pythonic Interface:** Designed with familiar Python patterns like decorators and type hints.
51
- * **Context Injection:** Easily access core MCP capabilities like sampling, logging, and progress reporting within your functions.
52
-
53
- ---
54
-
55
- ### What's New in v2?
56
-
57
- FastMCP 1.0 made it so easy to build MCP servers that it's now part of the [official Model Context Protocol Python SDK](https://github.com/modelcontextprotocol/python-sdk)! For basic use cases, you can use the upstream version by importing `mcp.server.fastmcp.FastMCP` (or installing `fastmcp=1.0`).
58
-
59
- Based on how the MCP ecosystem is evolving, FastMCP 2.0 builds on that foundation to introduce a variety of new features (and more experimental ideas). It adds advanced features like proxying and composing MCP servers, as well as automatically generating them from OpenAPI specs or FastAPI objects. FastMCP 2.0 also introduces new client-side functionality like LLM sampling.
60
-
61
-
62
- ---
63
 
64
  <!-- omit in toc -->
65
  ## Table of Contents
66
 
67
- - [Key Features:](#key-features)
68
- - [What's New in v2?](#whats-new-in-v2)
69
- - [Installation](#installation)
70
- - [Quickstart](#quickstart)
71
  - [What is MCP?](#what-is-mcp)
 
 
 
 
 
 
 
 
72
  - [Core Concepts](#core-concepts)
73
  - [The `FastMCP` Server](#the-fastmcp-server)
74
  - [Tools](#tools)
@@ -98,7 +78,62 @@ Based on how the MCP ecosystem is evolving, FastMCP 2.0 builds on that foundatio
98
  - [Formatting \& Linting](#formatting--linting)
99
  - [Pull Requests](#pull-requests)
100
 
101
- ## Installation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
  We strongly recommend installing FastMCP with [uv](https://docs.astral.sh/uv/), as it is required for deploying servers via the CLI:
104
 
@@ -117,7 +152,7 @@ cd fastmcp
117
  uv sync
118
  ```
119
 
120
- ## Quickstart
121
 
122
  Let's create a simple MCP server that exposes a calculator tool and some data:
123
 
@@ -146,23 +181,8 @@ You can install this server in [Claude Desktop](https://claude.ai/download) and
146
  fastmcp install server.py
147
  ```
148
 
149
- Alternatively, you can test it with the MCP Inspector:
150
- ```bash
151
- fastmcp dev server.py
152
- ```
153
-
154
  ![MCP Inspector](/docs/assets/demo-inspector.png)
155
 
156
- ## What is MCP?
157
-
158
- The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:
159
-
160
- - Expose data through **Resources** (think GET endpoints; load info into context)
161
- - Provide functionality through **Tools** (think POST/PUT endpoints; execute actions)
162
- - Define interaction patterns through **Prompts** (reusable templates)
163
- - And more!
164
-
165
- FastMCP provides a high-level, Pythonic interface for building and interacting with these servers.
166
 
167
  ## Core Concepts
168
 
 
4
  # FastMCP v2 πŸš€
5
  <strong>The fast, Pythonic way to build MCP servers.</strong>
6
 
7
+ [![Docs](https://img.shields.io/badge/docs-gofastmcp.com-blue)](https://gofastmcp.com)
8
  [![PyPI - Version](https://img.shields.io/pypi/v/fastmcp.svg)](https://pypi.org/project/fastmcp)
9
  [![Tests](https://github.com/jlowin/fastmcp/actions/workflows/run-tests.yml/badge.svg)](https://github.com/jlowin/fastmcp/actions/workflows/run-tests.yml)
10
  [![License](https://img.shields.io/github/license/jlowin/fastmcp.svg)](https://github.com/jlowin/fastmcp/blob/main/LICENSE)
 
28
  mcp.run()
29
  ```
30
 
 
 
 
 
31
 
32
+ Run the server locally:
33
  ```bash
34
+ fastmcp run server.py
35
  ```
36
 
37
  FastMCP handles the complex protocol details and server management, letting you focus on building great tools and applications. It's designed to feel natural to Python developers.
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  <!-- omit in toc -->
41
  ## Table of Contents
42
 
 
 
 
 
43
  - [What is MCP?](#what-is-mcp)
44
+ - [Why FastMCP?](#why-fastmcp)
45
+ - [Key Features](#key-features)
46
+ - [Servers](#servers)
47
+ - [Clients](#clients)
48
+ - [What's New in v2?](#whats-new-in-v2)
49
+ - [Documentation](#documentation)
50
+ - [Installation](#installation)
51
+ - [Quickstart](#quickstart)
52
  - [Core Concepts](#core-concepts)
53
  - [The `FastMCP` Server](#the-fastmcp-server)
54
  - [Tools](#tools)
 
78
  - [Formatting \& Linting](#formatting--linting)
79
  - [Pull Requests](#pull-requests)
80
 
81
+
82
+ ## What is MCP?
83
+
84
+ The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:
85
+
86
+ - Expose data through **Resources** (think GET endpoints; load info into context)
87
+ - Provide functionality through **Tools** (think POST/PUT endpoints; execute actions)
88
+ - Define interaction patterns through **Prompts** (reusable templates)
89
+ - And more!
90
+
91
+ FastMCP provides a high-level, Pythonic interface for building and interacting with these servers.
92
+
93
+ ## Why FastMCP?
94
+
95
+ The MCP protocol is powerful but implementing it involves a lot of boilerplate - server setup, protocol handlers, content types, error management. 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.
96
+
97
+ FastMCP aims to be:
98
+
99
+
100
+ πŸš€ **Fast:** High-level interface means less code and faster development
101
+
102
+ πŸ€ **Simple:** Build MCP servers with minimal boilerplate
103
+
104
+ 🐍 **Pythonic:** Feels natural to Python developers
105
+
106
+ πŸ” **Complete:** FastMCP aims to provide a full implementation of the core MCP specification for both servers and clients
107
+
108
+ ## Key Features
109
+
110
+ ### Servers
111
+ - **Create** servers with minimal boilerplate using intuitive decorators
112
+ - **Proxy** existing servers to modify configuration or transport
113
+ - **Compose** servers by into complex applications
114
+ - **Generate** servers from OpenAPI specs or FastAPI objects
115
+
116
+ ### Clients
117
+ - **Interact** with MCP servers programmatically
118
+ - **Connect** to any MCP server using any transport
119
+ - **Test** your servers without manual intervention
120
+ - **Innovate** with core MCP capabilities like LLM sampling
121
+
122
+
123
+ ## What's New in v2?
124
+
125
+ FastMCP 1.0 made it so easy to build MCP servers that it's now part of the [official Model Context Protocol Python SDK](https://github.com/modelcontextprotocol/python-sdk)! For basic use cases, you can use the upstream version by importing `mcp.server.fastmcp.FastMCP` (or installing `fastmcp=1.0`).
126
+
127
+ Based on how the MCP ecosystem is evolving, FastMCP 2.0 builds on that foundation to introduce a variety of new features (and more experimental ideas). It adds advanced features like proxying and composing MCP servers, as well as automatically generating them from OpenAPI specs or FastAPI objects. FastMCP 2.0 also introduces new client-side functionality like LLM sampling.
128
+
129
+
130
+ ## Documentation
131
+
132
+ πŸ“š FastMCP's documentation is available at [gofastmcp.com](https://gofastmcp.com).
133
+
134
+ ---
135
+
136
+ ### Installation
137
 
138
  We strongly recommend installing FastMCP with [uv](https://docs.astral.sh/uv/), as it is required for deploying servers via the CLI:
139
 
 
152
  uv sync
153
  ```
154
 
155
+ ### Quickstart
156
 
157
  Let's create a simple MCP server that exposes a calculator tool and some data:
158
 
 
181
  fastmcp install server.py
182
  ```
183
 
 
 
 
 
 
184
  ![MCP Inspector](/docs/assets/demo-inspector.png)
185
 
 
 
 
 
 
 
 
 
 
 
186
 
187
  ## Core Concepts
188
 
docs/getting-started/welcome.mdx CHANGED
@@ -47,10 +47,13 @@ The MCP protocol is powerful but implementing it involves a lot of boilerplate -
47
 
48
  FastMCP aims to be:
49
 
50
- - **Fast**: High-level interface means less code and faster development
51
- - **Simple**: Build MCP servers with minimal boilerplate
52
- - **Pythonic**: Feels natural to Python developers
53
- - **Complete**: FastMCP aims to provide a full implementation of the core MCP specification
 
 
 
54
 
55
  **FastMCP v1** focused on abstracting the most common boilerplate of exposing MCP server functionality, and is now included in the official MCP Python SDK. **FastMCP v2** expands on that foundation to introduce novel functionality mainly focused on simplifying server interactions, including flexible clients, proxying and composition, and deployment.
56
 
 
47
 
48
  FastMCP aims to be:
49
 
50
+ πŸš€ **Fast**: High-level interface means less code and faster development
51
+
52
+ πŸ€ **Simple**: Build MCP servers with minimal boilerplate
53
+
54
+ 🐍 **Pythonic**: Feels natural to Python developers
55
+
56
+ πŸ” **Complete**: FastMCP aims to provide a full implementation of the core MCP specification
57
 
58
  **FastMCP v1** focused on abstracting the most common boilerplate of exposing MCP server functionality, and is now included in the official MCP Python SDK. **FastMCP v2** expands on that foundation to introduce novel functionality mainly focused on simplifying server interactions, including flexible clients, proxying and composition, and deployment.
59