Skip to main content

agent-mcp-check

你的 MCP Server 敢过一遍安全体检吗?
One-shot black-box security check for MCP servers — 6 probes, PASS/FAIL/WARN, hash-chained trail.

pip install agent-mcp-check            # zero deps, Python 3.9+

GitCode GitHub tests license python

agent-mcp-check launches your MCP server (stdio transport) and throws a battery of malformed and hostile JSON-RPC messages at it. A well-behaved server rejects them all with proper JSON-RPC errors. A sloppy server crashes, hangs, or — worst case — executes a tool it should never have run. Part of the Verifiable-agent family.

⚠️ Research prototype — AI-assisted development. This is an open-source research/experimental prototype produced with AI assistance. It is provided AS IS, without warranty of any kind, and is not a commercial or production-grade product. Use at your own risk.

Verifiable-agent family

Repo Role
agent-mcp-check MCP security check (this repo)
agent-call-audit audit engine
agent-memory-ledger verifiable memory layer
agent-audit-gateway HTTP gateway
agent-route-grid audited multi-agent routing

Why

MCP is the new Unix pipe for AI agents. Everyone is shipping MCP servers fast, and most of them were never pushed with {"method": "tools/call", "params": null}. This tool turns "is my MCP server fail-closed?" into one command.

What you get:

  • 6 black-box probes: malformed params, unknown method, missing tool name, notification without id, unknown tool, missing arguments.
  • PASS / FAIL / WARN grading per probe, with the exact sent/received pairs.
  • Hash-chained probe trail: every probe verdict is recorded in a verifiable JSONL trail.
  • Zero dependencies — pure Python 3.9+ stdlib, launches any stdio MCP server.

Install

pip install agent-mcp-check

Quick start

# Probe an MCP server that starts as `python -m my_server` (stdio transport)
agent-mcp-check run --command python --args -m my_server

# Append a hash-chained trail
agent-mcp-check run --command npx --args mcp-server-filesystem --trail ./probe.trail.jsonl

Proof of life

$ agent-mcp-check run --command python --args tests/mock_mcp_server.py
# MCP Server Security Check

- **Server**: `python tests/mock_mcp_server.py`
- **Grade**: **PASS**
- **Passed / Failed / Warned**: 6 / 0 / 0

| Probe | Description | Status | Note |
|:--|:--|:--|:--|
| P-01 | malformed JSON must yield an error, not a crash | PASS | server answered with a JSON-RPC error |
| P-02 | unknown method must answer method-not-found | PASS | server answered with a JSON-RPC error |
| P-03 | tools/call without a name must be rejected | PASS | server answered with a JSON-RPC error |
| P-04 | tools/call notification (no id) must not execute | PASS | notification sent, no unexpected execution |
| P-05 | unknown tool must answer an error | PASS | server answered with a JSON-RPC error |
| P-06 | tools/call missing arguments must be protocol-rejected | PASS | server answered with a JSON-RPC error |

A failing server shows FAIL entries with the received payload, so you can see exactly where it misbehaves.

Probes

ID Probe Why it matters
P-01 tools/call with params: null fail-closed servers reject; weak ones crash
P-02 unknown method must answer -32601, never silently succeed
P-03 tools/call missing tool name protocol error, must not fall through
P-04 notification without id a server must never execute a tool for it
P-05 unknown tool must answer an error, not pretend success
P-06 tools/call missing arguments protocol error

Invariants

# Invariant Enforced by
1 Every malformed call expects a JSON-RPC error _run_probe
2 No response / crash / hang → FAIL _run_probe
3 Trail is a hash chain (prev_hash + entry_hash) run_checks trail writer
4 Synthetic data only — probes never persist real payloads _build_probes
5 Server is launched fresh per run McpProbeClient.start

License

MIT. 中文版

Metadata

Release files for agent-mcp-check 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 agent-mcp-check 0.1.0
File Size Uploaded Provenance Actions
agent_mcp_check-0.1.0.tar.gz 9.5 kB With provenance Details for agent_mcp_check-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-mcp-check 0.1.0
File Interpreter ABI Platform Actions
agent_mcp_check-0.1.0-py3-none-any.whl Python 3 none any Details for agent_mcp_check-0.1.0-py3-none-any.whl

Total release size: 19.3 kB

Release files / agent_mcp_check-0.1.0.tar.gz

Download URL agent_mcp_check-0.1.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4214d8ea49c947bfb4776f4948fa6f49c4f36e80ddbcf5fcdef03d47294fff3f
BLAKE2b-256 checksum
How to use checksums
774cb4a1484471e37ff4b4ea40c186691458e04e97e8b8e2af4bb9b68a0ab328
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 Nov 13, 2026.

Transparency log

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

Download URL agent_mcp_check-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f3b063952a2f166de06905f46f1d216700dbe3d63bfabc56843d7c8d09e14e1
BLAKE2b-256 checksum
How to use checksums
49b1c6073f8bf480eecaf4108abfc4fd2459e17e66b4314d398bdd12a74667fe
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 Nov 13, 2026.

Transparency log

Security for agent-mcp-check 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 agent_mcp_check-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 Nov 13, 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