We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53bfac0 commit 467f307Copy full SHA for 467f307
src/mcp/client/stdio.py
@@ -83,7 +83,7 @@ class StdioServerParameters(BaseModel):
83
84
85
@asynccontextmanager
86
-async def stdio_client(server: StdioServerParameters):
+async def stdio_client(server: StdioServerParameters, errlog=sys.stderr):
87
"""
88
Client transport for stdio: this will connect to a server by spawning a
89
process and communicating with it over stdin/stdout.
@@ -100,7 +100,7 @@ async def stdio_client(server: StdioServerParameters):
100
process = await anyio.open_process(
101
[server.command, *server.args],
102
env=server.env if server.env is not None else get_default_environment(),
103
- stderr=sys.stderr,
+ stderr=errlog,
104
)
105
106
async def stdout_reader():
0 commit comments