Skip to main content

mcpcheck

Diagnose and lock your MCP setup: validate configs, probe servers over stdio, and diff tool schemas in CI so your agent does not silently gain or lose abilities.

CI GitHub Action License: MIT Python 3.11+

Status: v0.1.0

Demo

# demo: two fixture servers (ok.py, evil.py) in a temporary directory

$ mcpcheck config --config mcp.json
mcp.json (claude)
  fs: stdio
  risky: stdio

$ mcpcheck probe --config mcp.json
name                 status        startup  tools
fs                   ok               11ms      2
risky                ok               11ms      1

$ mcpcheck lock --config mcp.json -o mcp.lock.json
wrote mcp.lock.json

$ mcpcheck verify --config mcp.json --lock mcp.lock.json
no changes

$ mcpcheck verify --config mcp-v2.json --lock mcp.lock.json
~ fs.echo
0 added, 0 removed, 1 changed

$ mcpcheck doctor --config mcp.json --security
info DOC006 risky.exec_shell (mcp.json): tool name looks like it executes or writes: exec_shell
  hint: Disable this tool for untrusted models or scope what it can reach. Treat this as a signal, not a verdict: heuristic, review manually.
info DOC007 risky.exec_shell (mcp.json): description contains "ignore previous": exec_shell
  hint: Inspect the description and consider pinning the server version. Treat this as a signal, not a verdict: heuristic, review manually.
0 errors, 0 warnings, 2 info

all 6 steps behaved as expected

The transcript above is the output of demo.sh on the fixture servers: config and probe see both servers, the lock matches, a changed schema turns verify red, and doctor --security flags the risky tool as info only.

Install

# from source, works today
pipx install git+https://github.com/Matrinus/mcpcheck
pip install git+https://github.com/Matrinus/mcpcheck

# from PyPI, once 0.1.0 is published (the distribution is mcpcheck-cli, the command is mcpcheck)
pipx install mcpcheck-cli

pipx keeps the CLI in its own environment (recommended); pip installs it into the current one. Python 3.11 or newer.

Quickstart

mcpcheck config --config mcp.json                # validate the config and resolve ${VAR}
mcpcheck probe --config mcp.json                 # start each server and read its tools
mcpcheck lock --config mcp.json -o mcp.lock.json # record schemas in a lockfile
mcpcheck verify --config mcp.json --lock mcp.lock.json # compare live tools with the lock
mcpcheck doctor --config mcp.json --security     # aggregate findings and security hints

What it does

command returns exit code
config discovered/validated configs, resolved env, config errors 0, 1, 2
probe per-server status, startup ms, tools, schema hashes, resources 0, 1, 2
lock writes mcp.lock.json for servers that answered 0, 2, 3
verify added / removed / changed tools versus the lockfile 0, 1, 2, 3
doctor findings DOC001–DOC009 with severity and an actionable hint 0, 1, 2

--json is available on every command and is byte-stable across runs: no timestamps, sorted keys. The only exception is startup_ms in probe, which measures real process startup.

How it works

mcpcheck speaks JSON-RPC over stdio itself: one JSON message per line, initialize + notifications/initialized, a deadline on every read, and a process-group kill on timeout or close. It then sends tools/list (following nextCursor) and resources/list. Each tool is hashed as the SHA-256 of its canonical JSON schema with sorted keys, so a new parameter changes the hash while reformatting the config does not. Environment values are expanded and handed to the child process, but never serialized: --json carries only env_keys, so secrets stay out of logs and CI output.

What it does not do

  • HTTP/SSE transports — remote servers are reported as unsupported (v0.2).
  • OAuth or any interactive auth; a server that needs a browser cannot be probed.
  • Tools are never called, so it cannot tell you whether a tool works.
  • The --security checks are heuristics on names and descriptions, not an audit.
  • Linux and macOS only in v0.1.

Exit codes

code meaning
0 success; changes outside the --fail-on policy are still printed
1 config errors, unreachable servers, findings (with --strict also warns), or changes inside the policy
2 usage error, unreadable or invalid config/lockfile
3 a server did not respond during lock/verify, so nothing was compared

Use as a GitHub Action

The composite action installs its own Python 3.12 and runs mcpcheck verify, failing the job on changes inside fail-on (any by default):

- uses: actions/checkout@v4
- uses: Matrinus/mcpcheck@v0.1.0
  with:
    config: .mcp.json
    lock: mcp.lock.json
    fail-on: any

Inputs: config (default .mcp.json), lock (default mcp.lock.json), fail-on (any, added, removed or changed) and timeout in seconds (default 5). Pin the tag to the version of mcpcheck that wrote the lockfile; see action.yml for the full definition.

Roadmap

  • v0.2 — HTTP/SSE transports, --watch, pre-commit hook.
  • v0.3 — per-project policy (policy.yaml), SARIF export for code scanning.
  • v0.4 — compare two machines: what one has that the other does not.

See docs/design.md for the decisions behind v0.1.

Contributing

See CONTRIBUTING.md. New config formats and new doctor rules are designed to be small, self-contained contributions; make check must pass and bash demo.sh must stay green.

License

MIT — see LICENSE.

Metadata

Release files for mcpcheck-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcpcheck-cli 0.1.0
File Size Uploaded Provenance Actions
mcpcheck_cli-0.1.0.tar.gz 32.7 kB With provenance Details for mcpcheck_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcpcheck-cli 0.1.0
File Interpreter ABI Platform Actions
mcpcheck_cli-0.1.0-py3-none-any.whl Python 3 none any Details for mcpcheck_cli-0.1.0-py3-none-any.whl

Total release size: 52.2 kB

Release files / mcpcheck_cli-0.1.0.tar.gz

Download URL mcpcheck_cli-0.1.0.tar.gz
Size 32.7 kB
Tags Source
SHA-256 checksum
How to use checksums
27fe5b8a729278445824fa63d8e73649e5959e630a609bfab7ca8ef47a70671d
BLAKE2b-256 checksum
How to use checksums
cb9c558b97e9ae544fe3720b7b71bd27bc3b512951cb6d98e7bfaf75d3a13c64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / mcpcheck_cli-0.1.0-py3-none-any.whl

Download URL mcpcheck_cli-0.1.0-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbfc5e515d2b10e5c8f4266c589fe983d07546135bde90f194a5370665217b5c
BLAKE2b-256 checksum
How to use checksums
ba9a043465fe55fdd32e817a1f6e8350fb79621780d17e51bbca3b49d8521e30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for mcpcheck-cli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcpcheck_cli-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page