mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 14:04:18 +02:00
Fix run() call indentation to be inside stdio_server context
The run() call was outside the async with stdio_server() block, meaning
the streams would be closed before being used.
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
4028b648bc
commit
91df79d43c
1 changed files with 9 additions and 9 deletions
|
|
@ -2382,16 +2382,16 @@ class FastMCP(Generic[LifespanResultT]):
|
|||
f"Starting MCP server {self.name!r} with transport 'stdio'{mode}"
|
||||
)
|
||||
|
||||
await self._mcp_server.run(
|
||||
read_stream,
|
||||
write_stream,
|
||||
self._mcp_server.create_initialization_options(
|
||||
notification_options=NotificationOptions(
|
||||
tools_changed=True
|
||||
await self._mcp_server.run(
|
||||
read_stream,
|
||||
write_stream,
|
||||
self._mcp_server.create_initialization_options(
|
||||
notification_options=NotificationOptions(
|
||||
tools_changed=True
|
||||
),
|
||||
),
|
||||
),
|
||||
stateless=stateless,
|
||||
)
|
||||
stateless=stateless,
|
||||
)
|
||||
finally:
|
||||
reset_transport(token)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue