You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can install this server in [Claude Desktop](https://claude.ai/download) and interact with it right away by running:
180
+
You can install this server in [Claude Code](https://docs.claude.com/en/docs/claude-code/mcp) and interact with it right away. First, run the server:
176
181
177
182
```bash
178
-
uv run mcp install server.py
183
+
uv run --with mcp examples/snippets/servers/fastmcp_quickstart.py
179
184
```
180
185
181
-
Alternatively, you can test it with the MCP Inspector:
186
+
Then add it to Claude Code:
182
187
183
188
```bash
184
-
uv run mcp dev server.py
189
+
claude mcp add --transport http my-server http://localhost:8000/mcp
185
190
```
186
191
192
+
Alternatively, you can test it with the MCP Inspector. Start the server as above, then in a separate terminal:
193
+
194
+
```bash
195
+
npx -y @modelcontextprotocol/inspector
196
+
```
197
+
198
+
In the inspector UI, connect to `http://localhost:8000/mcp`.
199
+
187
200
## What is MCP?
188
201
189
202
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:
@@ -943,6 +956,7 @@ class SimpleTokenVerifier(TokenVerifier):
943
956
# Create FastMCP instance as a Resource Server
944
957
mcp = FastMCP(
945
958
"Weather Service",
959
+
json_response=True,
946
960
# Token verifier for authentication
947
961
token_verifier=SimpleTokenVerifier(),
948
962
# Auth settings for RFC 9728 Protected Resource Metadata
@@ -1158,7 +1172,7 @@ Note that `uv run mcp run` or `uv run mcp dev` only supports server using FastMC
1158
1172
1159
1173
### Streamable HTTP Transport
1160
1174
1161
-
> **Note**: Streamable HTTP transport is superseding SSE transport for production deployments.
1175
+
> **Note**: Streamable HTTP transport is the recommended transport for production deployments. Use `stateless_http=True` and `json_response=True` for optimal scalability.
0 commit comments