feat(mcp): add registry posture scanning#280
Open
rodboev wants to merge 1 commit into
Open
Conversation
Signed-off-by: Rod Boev <rod.boev@gmail.com>
rodboev
force-pushed
the
pr/mcp-registry-scan
branch
from
July 17, 2026 07:08
18f495c to
8c49856
Compare
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.
Summary
SkillSpector can now inspect MCP Registry server records before a user connects to them. The new scan mode normalizes the official registry payload (server identity, version and status metadata, repository, package, and remote references) into stable hashed snapshots, then reports deterministic posture risks: unpinned packages, missing integrity hashes, missing repository references, deprecated status, and plain-http remotes, all without changing ordinary skill scans.
Refs #121
This design keeps the diffable-snapshot goal proposed in the issue discussion. Checks that depend on fields the official registry does not publish (tool manifests, declared permissions, security contacts, publisher verification flags) are left to follow-up slices against sources that publish them.
Diff Notes
fileSha256integrity, repository presence, official status, and remote transport security, and aggregate finding risk so unsafe scans cross the CLI threshold{var}URL templates pass through; only structurally unusable payloads fail, with source-named errorsskillspector scan --mcp-registryas a thin CLI route with JSON snapshot output, rejecting unsupported non-JSON formats and skill-only flagsScope
This change leaves the skill graph, MCP server transport, existing LP/TP analyzers, baseline and SARIF formats, and provider credentials unchanged. Unknown registry facts remain unknown instead of being scored as confirmed risks. This first slice is MCP Registry only, so it does not add a generic registry-source selector or any Glama/Smithery adapter. Live Glama/Smithery fetchers, tool-manifest posture checks, generalized registry-verification semantics, dependency-CVE resolution, and cross-snapshot diff presentation are follow-up surfaces.
Verification
uv run pytest tests/unit/test_mcp_registry.py tests/unit/test_cli.py -k "mcp_registry or registry"-51 passed, 12 deselected in 1.03suv run pytest tests/unit/test_cli.py -k "scan and not mcp_registry"-11 passed, 11 deselected in 1.08suv run ruff check src/ tests/-All checks passed!uv run ruff format --check src/ tests/-146 files already formatteduv run mypy src/skillspector/mcp_registry.py-Success: no issues found in 1 source fileLive source checked during implementation:
https://registry.modelcontextprotocol.io/v0/servers, schemahttps://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json.