Use default environment even when env is provided#327
Merged
Kludex merged 1 commit intomodelcontextprotocol:mainmodelcontextprotocol/python-sdk:mainfrom Mar 21, 2025
maxguru:maxguru-patch-issue-326maxguru/modelcontextprotocol-python-sdk:maxguru-patch-issue-326Copy head branch name to clipboard
Merged
Use default environment even when env is provided#327Kludex merged 1 commit intomodelcontextprotocol:mainmodelcontextprotocol/python-sdk:mainfrom maxguru:maxguru-patch-issue-326maxguru/modelcontextprotocol-python-sdk:maxguru-patch-issue-326Copy head branch name to clipboard
env is provided#327Kludex merged 1 commit intomodelcontextprotocol:mainmodelcontextprotocol/python-sdk:mainfrom
maxguru:maxguru-patch-issue-326maxguru/modelcontextprotocol-python-sdk:maxguru-patch-issue-326Copy head branch name to clipboard
Conversation
Member
|
Can you please fix the formatting issue? You should be able to run |
b226a0d to
e2a7338
Compare
…g when env parameter of StdioServerParameters is set
env is provided
Kludex
approved these changes
Mar 21, 2025
This was referenced Mar 21, 2025
Merged
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed issue #326 - MCP client with npx not working when env parameter of StdioServerParameters is set
Motivation and Context
See issue #326
Discarding the output of
get_default_environment()when server.env has additional variables doesn't make sense. A reasonable assumption is that settingenvvariables adds to what was there otherwise.How Has This Been Tested?
I tested it and it fixed the issue for me.
Breaking Changes
If somebody relied on setting the
envparameter to clear default environment variables then they would need to change their code.Types of changes
Checklist
Additional context
None