pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/modelcontextprotocol/python-sdk/pull/2371

8641c0a1f3e0.css" /> Avoid shell=True when launching mcp dev inspector on Windows by raashish1601 · Pull Request #2371 · modelcontextprotocol/python-sdk · GitHub
Skip to content

Avoid shell=True when launching mcp dev inspector on Windows#2371

Open
raashish1601 wants to merge 1 commit intomodelcontextprotocol:mainfrom
raashish1601:contributor-54/python-sdk-1257
Open

Avoid shell=True when launching mcp dev inspector on Windows#2371
raashish1601 wants to merge 1 commit intomodelcontextprotocol:mainfrom
raashish1601:contributor-54/python-sdk-1257

Conversation

@raashish1601
Copy link
Copy Markdown

Summary

  • resolve npx to a concrete executable on Windows instead of probing with shell=True
  • keep mcp dev launching the inspector with a direct argv call and copied environment
  • add focused CLI tests for the Windows resolution path and the shell-free inspector launch

Fixes #1257.

Validation

  • PYTHONPATH=src python -m pytest tests/cli/test_utils.py -q
  • python -m ruff check src/mcp/cli/cli.py tests/cli/test_utils.py
  • git diff --check

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.

Don’t use shell=True in mcp dev subprocess on Windows (command injection risk)

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy