Skip to content

Commit 4bce7d8

Browse files
committed
cleanup
1 parent fd97501 commit 4bce7d8

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,6 @@ 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-
```
9790

9891
Alternatively, for projects using pip for dependencies:
9992
```bash
@@ -413,7 +406,7 @@ mcp = FastMCP("My App", message_queue=redis_queue)
413406
To use Redis, add the Redis dependency:
414407

415408
```bash
416-
uv add redis types-redis
409+
uv add "mcp[redis]"
417410
```
418411

419412
## Examples

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ dependencies = [
3636
rich = ["rich>=13.9.4"]
3737
cli = ["typer>=0.12.4", "python-dotenv>=1.0.0"]
3838
ws = ["websockets>=15.0.1"]
39-
redis = ["redis>=5.2.1"]
40-
types-redis = ["types-redis>=4.6.0.20241004"]
39+
redis = ["redis>=5.2.1", "types-redis>=4.6.0.20241004"]
4140

4241
[project.scripts]
4342
mcp = "mcp.cli:app [cli]"

src/mcp/server/sse.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,8 @@ async def sse_writer():
140140
async with self._message_queue.active_for_request(
141141
session_id, message_callback
142142
):
143-
try:
144-
logger.debug("Yielding read and write streams")
145-
yield (read_stream, write_stream)
146-
finally:
147-
logger.debug(f"Closing SSE connection for session {session_id}")
143+
logger.debug("Yielding read and write streams")
144+
yield (read_stream, write_stream)
148145

149146
async def handle_post_message(
150147
self, scope: Scope, receive: Receive, send: Send

0 commit comments

Comments
 (0)