Skip to main content

CheckMCP — vendor-neutral quality/security/context-cost audit & score for any MCP server.

Project description

CheckMCP

PyPI License: MIT GitHub Action Web audit

Vendor-neutral quality / security / context-cost audit & score for any MCP server. One uvx/pipx command → an MCP Score /100 + causal opportunities (why the score), Lighthouse-style.

Installed from PyPI as audit-mcp (the name checkmcp was already taken); the command is audit-mcp. Brand, site and repo remain CheckMCP / checkmcp.dev.

uvx audit-mcp https://mcp.deepwiki.com/mcp
# or
pipx run audit-mcp https://mcp.context7.com/mcp --json
audit-mcp https://my-mcp.example.com/mcp --token "$TOKEN"

Use it as an MCP server

audit-mcp mcp turns the auditor itself into an MCP server (stdio) exposing one tool, audit_mcp_server — so your agent can answer "is this MCP server safe?" mid-conversation.

# Claude Code
claude mcp add audit-mcp -- uvx audit-mcp mcp
// Cursor (.cursor/mcp.json) / Claude Desktop (claude_desktop_config.json)
{ "mcpServers": { "audit-mcp": { "command": "uvx", "args": ["audit-mcp", "mcp"] } } }

Registry name: io.github.H129hj/checkmcp

No dependencies (stdlib only). tiktoken optional for exact token counts.

What it measures (7 pillars)

  • Security — OWASP MCP Top 10 (tool poisoning, hardcoded secrets, command injection), lethal-trifecta.
  • Tool design — sprawl/consolidation (percentile-calibrated on real servers: median ~7 tools, p95 ~42).
  • Schemas / desc — descriptions + inputSchema/outputSchema completeness.
  • Context-cost — tokens spent on tools/list, paid on every request (the #1 pain of 2026).
  • Compliance — protocol-version gap, annotations, JSON-RPC error conformance, OAuth discovery.
  • Reliability — single-shot today (not credited; continuous T3 monitoring on checkmcp.dev).
  • Coverage — the 3 primitives (tools + resources + prompts).

Hard floors: secret-in-schema → cap D, failed handshake → cap F. Every penalty is attributed: measure → mechanism → effect → Δscore.

CLI flags

flag what
--json machine-readable report
--badge SVG badge + README embed snippets
--html standalone SEO/GEO page (JSON-LD SoftwareApplication + FAQ)
--repo owner/name add maintenance/license/provenance signal from GitHub
--token <bearer> audit an OAuth-protected server
--min-score N CI: exit 1 if MCP Score < N
--baseline file CI: pin tool definitions; fail on regression (rug-pull)
--gh-summary CI: write a Markdown summary to $GITHUB_STEP_SUMMARY
--deep runtime depth via an external scanner (mcp-scan/snyk) if present
--evals behavioral sandbox: actually invokes read-only tools with canary inputs to catch tool-output prompt-injection, exfiltration vectors, secret/PII leakage and context bombs (sends real traffic; CI-fails on a malicious verdict)

GitHub Action

# .github/workflows/mcp-audit.yml
name: MCP audit
on: [push, pull_request]
jobs:
  checkmcp:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: H129hj/checkmcp@v1
        with:
          url: https://my-mcp.example.com/mcp
          min-score: "70"
          baseline: .checkmcp-baseline.json   # commit it → fails on rug-pull

Behavioral evals (--evals)

Static analysis catches declared danger; --evals catches runtime danger by actually invoking read-only tools with canary inputs and inspecting the responses for tool-output prompt-injection, exfiltration vectors and secret/PII leakage (multilingual; optional callback-canary confirms exfil). CI-fails on a malicious verdict.

Self-hosted security gateway

Beyond auditing, CheckMCP ships an in-band MCP gateway — a proxy you put between your agent and an MCP server. It inspects every call, and in active mode blocks/strips tool-poisoning & exfiltration before they reach the agent. Run it in your own infra (tool traffic never leaves your network):

docker pull ghcr.io/h129hj/checkmcp-gateway:latest   # or build from source
docker run -p 8080:8080 -e GATEWAY_BACKEND_URL=https://mcp.example.com/mcp \
  -e GATEWAY_MODE=active -e GATEWAY_SECRET=$(openssl rand -hex 16) \
  ghcr.io/h129hj/checkmcp-gateway:latest

See GATEWAY.md for config (passive/active, OAuth backends, policy, logs).

Hosted

Full reports, public directory, live badges, continuous drift monitoring, a governance policy API and a hosted gateway at checkmcp.dev.

Honest limitations

  • Percentile bands come from a growing corpus (one+ registries) — widening over time.
  • Exact tokens with pipx install "audit-mcp[exact-tokens]" (cl100k_base); otherwise chars/4 approximation.
  • Pillar weights are expert priors. python -m checkmcp.calibrate samples.json validates them against a labeled agent-success sample (per-pillar correlation + OLS-suggested weights + construct-validity R²) — supply real outcomes to close the loop.

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audit_mcp-0.5.0.tar.gz (50.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audit_mcp-0.5.0-py3-none-any.whl (51.5 kB view details)

Uploaded Python 3

File details

Details for the file audit_mcp-0.5.0.tar.gz.

File metadata

  • Download URL: audit_mcp-0.5.0.tar.gz
  • Upload date:
  • Size: 50.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for audit_mcp-0.5.0.tar.gz
Algorithm Hash digest
SHA256 edcc80a67986f56b640e07f47efad19716b7640811833ca3fa84427026730f55
MD5 67db0ecd7e34bb00e02653f9d53ea8e4
BLAKE2b-256 0d72cc14e7364b5efcf4f9256332a0978bd74c71654ed72132bec3b0c49f5a75

See more details on using hashes here.

Provenance

The following attestation bundles were made for audit_mcp-0.5.0.tar.gz:

Publisher: publish-pypi.yml on H129hj/checkmcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file audit_mcp-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: audit_mcp-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 51.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for audit_mcp-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f6d316a222a65e26f3e1d82871ee68fa44d40bd5a6915d0a5ea8876a11a8e78
MD5 be3d237662c4b5944d8b846644983b3a
BLAKE2b-256 8b558fd5ea21f47e7b89110b5675b81ff0f4171b4731ea685b6a858d35ed098a

See more details on using hashes here.

Provenance

The following attestation bundles were made for audit_mcp-0.5.0-py3-none-any.whl:

Publisher: publish-pypi.yml on H129hj/checkmcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page