Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/mcp/client/stdio.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ async def stdio_client(server: StdioServerParameters, errlog: TextIO = sys.stder

process = await anyio.open_process(
[server.command, *server.args],
env=server.env if server.env is not None else get_default_environment(),
env=(
{**get_default_environment(), **server.env}
if server.env is not None
else get_default_environment()
),
stderr=errlog,
cwd=server.cwd,
)
Expand Down