See what an MCP server exposes before you trust or connect it.
Project description
mcp-surfaceprint
Inspect, fingerprint, and diff an MCP server’s declared capability surface.
An MCP server can gain tools, parameters, resources, prompts, or new actions beneath an existing tool name. mcp-surfaceprint captures that client-visible surface as a deterministic snapshot, computes a stable digest when inspection is complete, and shows structural differences over time.
Use it as:
- an interface compatibility check for MCP server maintainers
- a capability-change review gate for teams consuming third-party MCP servers
If you want the deeper framing and experiments, see You can’t prove an MCP server hasn’t changed.
Why
You review an MCP server before installing it. Later, a dependency upgrade adds a destructive action beneath an existing tool name. The package version changed, but nothing gives you a durable, structural record of the declared capability surface you previously reviewed.
mcp-surfaceprint turns that declaration into a versioned artifact that can be committed, compared, and reviewed.
Quick start (snapshot + check)
pipx install mcp-surfaceprint
# Commit a baseline snapshot (one-time)
mcp-surfaceprint --save mcp-surface.json "uv run server.py"
git add mcp-surface.json
# Later, locally or in CI: check the live server against the baseline
mcp-surfaceprint check mcp-surface.json "uv run server.py"
A changed surface is not automatically unsafe; check turns it into an explicit review event rather than allowing it to pass unnoticed.
Safety: This command starts the server locally. MCP discovery does not invoke its declared tools, but a server can execute arbitrary code while handling any request. Use
--isolate-hometo prevent it from using your normalHOMEand XDG directories; this is not a sandbox.
Example change
Surface changed.
Tools:
~ manage_items
inputSchema.properties.action.enum:
+ delete
Previous: sha256:...
Current: sha256:...
Structured output:
mcp-surfaceprint check --json mcp-surface.json "uv run server.py" > check.json
What it captures and compares
- Tools, descriptions, and full input schemas
- Schema fields, required parameters, and enum values, including changes beneath unchanged tool names
- Resources and resource templates
- Prompts and prompt arguments
- Optional per-tool manifest operations for servers that multiplex actions behind one tool (see docs/server-manifest.md)
Integrations
The snapshot, surface digest, and structured check --json output can be consumed by registries, governance systems, agent runtimes, and security gateways. These systems can anchor approval to a specific observed surface and trigger re-review when that surface changes.
mcp-surfaceprint supplies the inspection artifact; the consuming system decides whether to allow, block, sandbox, or require approval.
Common workflows
# Inspect (human-readable)
mcp-surfaceprint "uv run server.py"
mcp-surfaceprint "npx my-mcp-server"
mcp-surfaceprint "python3 /path/to/server.py"
# Save a snapshot (JSON)
mcp-surfaceprint --save snapshot.json "uv run server.py"
# Check against a baseline snapshot
mcp-surfaceprint check mcp-surface.json "uv run server.py"
# Diff two saved snapshots
mcp-surfaceprint diff before.json after.json
# JSON output
mcp-surfaceprint --json "uv run server.py"
CI workflow
check turns declared-surface changes into an explicit review step, with stable exit codes and optional structured JSON (--json).
- Commit a baseline snapshot (one-time).
- Run
mcp-surfaceprint check ...in CI. - If the surface changed, review the diff in the PR and intentionally update the baseline snapshot.
Exit codes:
- 0 — unchanged: inspection was complete and the surface digests match
- 1 — changed: inspection was complete and the surface digests differ
- 2 — inspection failed: timeout, auth required, startup error, etc.
- 3 — incomplete inspection: preflight could not establish a comparable surface digest
- 4 — invalid baseline: missing/partial baseline, unsupported snapshot version, invalid JSON
Machine-readable output:
mcp-surfaceprint check --json mcp-surface.json "uv run server.py" > check.json
echo "exit_code=$?"
Snapshots and identity
Snapshots separate observation metadata from the declared surface. Only the normalized surface is hashed.
A digest is emitted only when every supported identity-bearing discovery section completes successfully. An incomplete inspection produces no digest, rather than claiming a comparable identity.
See Snapshot format and normalization.
Interactive inspection
The interactive inspect output is useful for first-time exploration, debugging, and manual review.
Example interactive inspection output
my-server (MCP 2025-03-26)
Caution: the server process runs locally without sandboxing.
Use --isolate-home to prevent access to your real HOME directory.
MCP Tools (client-visible):
🟢 list_items "List all items in the database"
🟢 get_item "Get a single item by ID"
🟡 create_item "Create a new item"
🟡 update_item "Update an existing item"
🔴 delete_item "Permanently delete an item"
Resources:
📄 my-server://items
📄 my-server://items/{id}
Additional declared operations (from server manifest, 12 across 3 tools):
Not represented as separate entries in tools/list.
These are server-declared actions multiplexed behind the tools above.
↳ items (8): list, get, create, update, delete, search, export, archive
↳ reports (3): daily, weekly, monthly
↳ auth_login (single action)
Prompts:
💬 analyze_items (project_name)
Auth-gated servers / custom env
Some MCP servers only reveal tools/resources after authentication. mcp-surfaceprint does not run login flows, so it may be unable to enumerate some or all of the declared surface until credentials are provided.
# Pass a token via env
export MCP_SERVER_TOKEN=...
mcp-surfaceprint "npx -y my-mcp-server"
# Point HOME (and XDG_* dirs) somewhere else (useful for servers that read ~/.config, ~/.local, etc.)
mcp-surfaceprint --home /tmp/mcp-surfaceprint-home "npx -y my-mcp-server"
# Isolate HOME entirely to reduce side effects/pollution
mcp-surfaceprint --isolate-home "npx -y my-mcp-server"
Optional heuristic annotations
Interactive inspection can add heuristic signals, including read/write/destructive annotations, based on tool names and descriptions. These are hints only: they are not enforced and do not participate in the surface digest.
Disable them with:
mcp-surfaceprint --no-signals "uv run server.py"
Non-goals
mcp-surfaceprint does not provide sandboxing, policy enforcement, or runtime analysis. It describes the interface a server declares; it does not prove that declaration is truthful, exhaustive, or safe.
Documentation
- Snapshots: see docs/snapshots.md
- Server manifests (optional): see docs/server-manifest.md
- Design principles: see PRINCIPLES.md
- Deeper framing/experiments: see You can’t prove an MCP server hasn’t changed
Project
- Bugs / feature requests: GitHub Issues
- License: LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_surfaceprint-0.5.1.tar.gz.
File metadata
- Download URL: mcp_surfaceprint-0.5.1.tar.gz
- Upload date:
- Size: 46.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbceea32359a3715cd332611b7203ec25d2d031e7beabbbc85f318f56379c523
|
|
| MD5 |
13538ac440ea9dbbd9063e0542892d4f
|
|
| BLAKE2b-256 |
9600d5d6dc4417051b4af70f2fb89d0b006796bb405ebae37f6ebdc171265d59
|
Provenance
The following attestation bundles were made for mcp_surfaceprint-0.5.1.tar.gz:
Publisher:
publish.yml on mcp-surfaceprint/mcp-surfaceprint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_surfaceprint-0.5.1.tar.gz -
Subject digest:
cbceea32359a3715cd332611b7203ec25d2d031e7beabbbc85f318f56379c523 - Sigstore transparency entry: 1998468790
- Sigstore integration time:
-
Permalink:
mcp-surfaceprint/mcp-surfaceprint@878ede975835b10cf33290480c45d0bc7f62b26c -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/mcp-surfaceprint
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@878ede975835b10cf33290480c45d0bc7f62b26c -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_surfaceprint-0.5.1-py3-none-any.whl.
File metadata
- Download URL: mcp_surfaceprint-0.5.1-py3-none-any.whl
- Upload date:
- Size: 33.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55ea86e1699af4afbeae6ee1f90f9f8b84b8b9e0e5aba55129b7cb906f924fa5
|
|
| MD5 |
3cb285e66427226115f35341aa097184
|
|
| BLAKE2b-256 |
a30773b4b7c8be6fcf2a66bdb937768b35ffad9fb224e0a5877bc6d0021655d1
|
Provenance
The following attestation bundles were made for mcp_surfaceprint-0.5.1-py3-none-any.whl:
Publisher:
publish.yml on mcp-surfaceprint/mcp-surfaceprint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_surfaceprint-0.5.1-py3-none-any.whl -
Subject digest:
55ea86e1699af4afbeae6ee1f90f9f8b84b8b9e0e5aba55129b7cb906f924fa5 - Sigstore transparency entry: 1998468961
- Sigstore integration time:
-
Permalink:
mcp-surfaceprint/mcp-surfaceprint@878ede975835b10cf33290480c45d0bc7f62b26c -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/mcp-surfaceprint
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@878ede975835b10cf33290480c45d0bc7f62b26c -
Trigger Event:
release
-
Statement type: