Skip to content

Commit c3d5efc

Browse files
committed
readme update
1 parent 10c5af8 commit c3d5efc

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ If you haven't created a uv-managed project yet, create one:
8787
```bash
8888
uv add "mcp[cli]"
8989
```
90+
91+
For optional features, you can add extras:
92+
93+
```bash
94+
# For Redis support in message queue
95+
uv add "mcp[redis]"
96+
```
9097

9198
Alternatively, for projects using pip for dependencies:
9299
```bash
@@ -169,6 +176,7 @@ mcp = FastMCP("My App")
169176
mcp = FastMCP("My App", dependencies=["pandas", "numpy"])
170177

171178

179+
172180
@dataclass
173181
class AppContext:
174182
db: Database
@@ -385,6 +393,27 @@ app.router.routes.append(Host('mcp.acme.corp', app=mcp.sse_app()))
385393

386394
For more information on mounting applications in Starlette, see the [Starlette documentation](https://www.starlette.io/routing/#submounting-routes).
387395

396+
#### Message Queue Options
397+
398+
By default, the SSE server uses an in-memory message queue for incoming POST messages. For production deployments or distributed scenarios, you can use Redis:
399+
400+
```python
401+
mcp = FastMCP(
402+
"My App",
403+
settings={
404+
"message_queue": "redis",
405+
"redis_url": "redis://localhost:6379/0",
406+
"redis_prefix": "mcp:queue:"
407+
}
408+
)
409+
```
410+
411+
To use Redis, add the Redis dependency:
412+
413+
```bash
414+
uv add "mcp[redis]"
415+
```
416+
388417
## Examples
389418

390419
### Echo Server

0 commit comments

Comments
 (0)