Repository navigation
cli: flag unpinned npx/uvx package specs in mcp list - #275
Open
raymondginger2018-sudo wants to merge 2 commits into
Open
raymondginger2018-sudo wants to merge 2 commits into
raymondginger2018-sudo wants to merge 2 commits into
Conversation
The posture line counts only servers whose configuration resolves, and launcher availability differs by host (Windows path / uvx missing on CI), so a hardcoded 9 failed upstream while passing locally. Derive the count from the CONFIG column instead; the concerns map assertion is unchanged.
This branch has not been deployed
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.
Responds to the closing invitation on #269: "a small PR that adds a concern to
mcp listitself, for example an unpinned package (npx/uvxwith@latestor no version) or a server that receives credential environment variables."
Of those two examples the credential-env concern already exists on main
(
cred->sends-credential, merged via #241 / 2fafe40), so this PR adds theremaining one:
unpinned-package. It replaces #269's separatemcp auditcommand with a concern on
mcp listitself, as suggested.What it does
mcp listnow reportsunpinned-packageon a stdio server row when it islaunched through
npx/uvxand its package argument floats -- no version atall (
npx -y left-pad) or a floating tag (npx -y left-pad@latest,pkg@next). Those resolve whatever the registry serves at each start, so theeffective code was never chosen by the operator.
Recognition rules
npx -y left-padnpx -y left-pad@latestnpx -y left-pad@nextuvx mcp-server-timenpx -y left-pad@1.2.3uvx mcp-server-time==0.3.0npx @modelcontextprotocol/server-filesystem@delimiter is only searched past position 0)npx --index-url https://... pkgpkgis the package tokennpx ./server.js,npx C:\x.jsnpx --version(flags only)python3 server.py.cmd/.exe/.bat/.ps1) are stripped beforematching, so
C:\Program Files\nodejs\npx.cmd -y left-padis caught.server's own operands (
npx -y pkg /data).vin the version (pkg@v1.2.3) counts as pinned.Scope
command/argskeys ofmcp_server_view-- noserializer,
McpServerInfo, or JSON-output change (consistent with how theexisting concerns are table-only).
cli/mcp_cli.py(+65),tests/test_mcp_cli.py(+88); pure additions.Testing
test_mcp_list_flags_unpinned_launcher_packagescovers the rows above.tests/test_mcp_cli.py: 8 passed; pinned ruff 0.15.21 check + format clean;local CI preflight
KNOWN-RED | new=0(the 2 known reds are the documentedWindows environment baselines:
job-windows-lifecycle:group2_rc,job-desktop-quality:test_rc).