Skip to main content

mcp-audit

Audit MCP servers for install-time issues before you install them.

mcp-audit is a CLI utility that runs a set of install-time validation checks against any Model Context Protocol server, so you can see the problems before you wire the server into your agent config and lose an afternoon debugging silent failures.

Status: v0.1 alpha. Install-time validation only. Security-boundary check lands in v0.2, runtime spec-compliance in v0.3. See "Roadmap" below.

The problem

MCP is a fast-growing ecosystem - thousands of servers exist across public directories, community registries, and internal deployments. Quality varies wildly. If you have installed more than a handful, you have hit one of:

  • Manifest / init response missing required fields; agent client refuses to load.
  • Server declares tools in its capabilities but tools/list returns method-not-found.
  • Tool inputSchema is not valid JSON Schema; agents pass malformed args and the tool crashes at call time.
  • Server hangs on initialize; agent times out silently and the tool disappears from your session.

mcp-audit runs 4 checks in about a second and tells you which of these the server has before you install it.

Install

pip install mcp-server-audit

Requires Python 3.10+.

The PyPI package name is mcp-server-audit; the CLI command is mcp-audit.

Use

mcp-audit "python -m my_mcp_server"
mcp-audit "npx -y @modelcontextprotocol/server-filesystem /tmp"
mcp-audit "uvx some-mcp-server" --json
mcp-audit "node build/index.js" --timeout 60 --verbose

The single positional argument is the shell-style command that spawns the MCP server over stdio. mcp-audit will launch the subprocess, run the handshake, probe tools/list / resources/list / prompts/list, run its 4 checks, and close the server cleanly.

Default timeout is 30 seconds per request. For npx -y cold-cache first runs (which can take 20-60s to download + start), the default usually works. If you hit a CRITICAL on first run, retry with --timeout 60 and see if it clears. For CI where packages are pre-cached, use --timeout 5 for tighter checks.

What v0.1 checks

Four checks:

Check What it verifies
handshake Server subprocess spawns; responds to initialize within timeout; returns a valid response envelope; shuts down cleanly on stdin close.
descriptor serverInfo, protocolVersion, capabilities present and well-typed in initialize response. Each tool / resource / prompt entry has its required fields (name, uri, etc.).
capabilities Declared capabilities match implementation. Flags "declared but not implemented" (breaks strict clients) and "implemented but not declared" (hidden from clients that respect declarations).
tool_schemas Each declared tool's inputSchema (and outputSchema if present) is valid JSON Schema Draft 2020-12 per meta-validation.

Output

Human-readable colored terminal report by default. Add --json for machine-readable output (CI-friendly).

Exit codes:

  • 0 - all checks passed
  • 1 - warnings only (server usable, quality issues present)
  • 2 - errors (server broken; do not install without fixing)
  • 3 - critical (could not run server at all)

Roadmap

  • v0.1 (this release): install-time validation, 4 checks above
  • v0.2: security-boundary check - vulnerability patterns, credential exfil, unsafe defaults, auth-boundary violations
  • v0.3: runtime spec-compliance - error handling, rate-limit honor, timeout behavior beyond handshake
  • v0.5+: hosted service - continuous monitoring, regression alerts
  • v1.0+: enterprise tier - on-prem, compliance-heavy features

Why this exists

The MCP ecosystem is at the point (2026) where quantity has outpaced ecosystem-level quality signals. First-party curation from Anthropic will land eventually, but the gap is real today. This tool addresses one specific slice: install-time validation you can run in a second before adding a server to your agent config.

Adjacent tools cover different slices:

  • mcpgrade - usability grading of published servers
  • Glama - MCP server registry / discovery
  • MCPJam, Runlayer, Manufact, Reticle, MCPwn, mcp-fortress, mcpserver-audit - various adjacent quality/security/observability tools

mcp-audit is deliberately narrow: install-time schema validation, meta-checkable properties, one shot per server, exit-code-scriptable. If you want the other axes, use the adjacent tools too.

Contributing

Issues and PRs welcome at github.com/Yveshby27/mcp-server-audit.

If you hit an MCP server that mcp-audit misses a real issue on - open an issue with the server command and the observed behavior. Real-world failures are the best guide to which checks matter.

License

MIT - see LICENSE.

Download files

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

Source Distribution

mcp_server_audit-0.1.1.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

mcp_server_audit-0.1.1-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_audit-0.1.1.tar.gz.

File metadata

  • Download URL: mcp_server_audit-0.1.1.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.9

File hashes

Hashes for mcp_server_audit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3b0815d0c6de2479439bb566fd20140387fd16dea3a690e7c311b0d5cba12fbb
MD5 c495820ae9bf04aa4ec1126ae8129da8
BLAKE2b-256 b7450156a7e0d03fdc3cea0f4dac1c65b086db520b4448f1d3518bae07722307

See more details on using hashes here.

File details

Details for the file mcp_server_audit-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_audit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b3b27cfc4ed2a3bf05002e38fb8cac776e5a28f52f7c5a90c5681c28e6c95d3
MD5 924ca1714606f9a1d74d65e7e0532101
BLAKE2b-256 1843f359c8a6f60f48f68da23a2529367785660e8d2fa1c51843ad6a98ab4488

See more details on using hashes here.

Supported by

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