Skip to content

fix(tools): restrict get-env to accept key parameter only#4001

Open
Jim1874 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Jim1874:fix/issue-3986-get-env-key-param
Open

fix(tools): restrict get-env to accept key parameter only#4001
Jim1874 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Jim1874:fix/issue-3986-get-env-key-param

Conversation

@Jim1874
Copy link
Copy Markdown

@Jim1874 Jim1874 commented Apr 22, 2026

Summary

Security fix: get-env tool was exposing entire process.env to any caller.

Changes:

  • inputSchema now requires a key parameter
  • Returns only process.env[key] instead of full env
  • Returns 'not set' for missing keys

Closes #3986

Security fix: get-env tool was returning full process.env to any caller.
Now requires a 'key' parameter and returns only process.env[key].

Closes modelcontextprotocol#3986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

server-everything: get-env tool returns full process.env without any filtering

1 participant