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.
Status: v0.2.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
pipx install mcpcheck-cli # recommended: isolated environment
pip install mcpcheck-cli # or into the current environment
pipx install git+https://github.com/Matrinus/mcpcheck # latest from source
The distribution is mcpcheck-cli; the installed command is mcpcheck. Python 3.11+.
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 |
serve |
mcpcheck as an MCP server over stdio, exposing verify and doctor |
0, 2 |
--json is available on every reporting command and is byte-stable across
runs: no timestamps, sorted keys. The only exception is startup_ms in
probe, which measures real process startup; serve speaks JSON-RPC instead of
--json.
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
--securitychecks 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.
Use it as an MCP server
mcpcheck serve makes mcpcheck itself an MCP server over stdio, so an agent can
check its own environment. It exposes exactly two read-only tools, verify and
doctor. Add it to a client config:
{"mcpServers":{"mcpcheck":{"command":"mcpcheck","args":["serve"]}}}
Arguments are limited to config paths (.json/.toml), lock, fail_on,
security and timeout; no command, args or env is accepted, so nothing
from the client is executed, and each response is capped at 8192 bytes. See
docs/mcp-server.md for the protocol, tools and limits.
Roadmap
- v0.2 — own MCP server (
serve) withverifyanddoctoras tools; 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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcpcheck_cli-0.2.0.tar.gz | 40.0 kB | With provenance | Details for mcpcheck_cli-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcpcheck_cli-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for mcpcheck_cli-0.2.0-py3-none-any.whl |
Total release size: 64.3 kB
Release files / mcpcheck_cli-0.2.0.tar.gz
| Download URL | mcpcheck_cli-0.2.0.tar.gz |
|---|---|
| Size | 40.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da825fcad088642c2654cd6a9682200caf4661962a4f4c62056250a4568f4dd9
|
|
BLAKE2b-256 checksum How to use checksums |
196c31ba41e5cc5368dfec406a8aff2d4ea5b174d094b4696d6190f25cfbdac8
|
| 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 logRelease files / mcpcheck_cli-0.2.0-py3-none-any.whl
| Download URL | mcpcheck_cli-0.2.0-py3-none-any.whl |
|---|---|
| Size | 24.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9bf4fe4f7bf32f36deba962293503ee9e156e506b6295e588ba5b5223ea4b684
|
|
BLAKE2b-256 checksum How to use checksums |
1ae4679df762f5ff89a2d62fc07598e2d14e221bc43f00a3e9daff08667da95b
|
| 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 logSecurity for mcpcheck-cli 0.2.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.
Attestation for mcpcheck_cli-0.2.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 logA 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.