Skip to main content

mcp-doctor

One command, every MCP audit — session hygiene, wire shapes, name collisions.

PyPI CI

MCP integrations break in three places and none of them crash:

Where What breaks Auditor
Recorded session dangling tool_call_id poisons later requests (opencode #44852), swallowed isError (zeroclaw #7122), error-channel confusion (memoria #258) session — mcp-session-audit
Advertised listings schemas that make strict clients silently reject tools (gitlab-mcp #286, langfuse #13804, strapi #27395) schema — mcp-schema-audit
Tool names collision between servers makes the agent call the wrong tool (VSCode #324992, Copilot #11480) collide — mcp-collision

Install

pip install mcpmedic

Usage

mcp-doctor check recording.jsonl                  # session + schema, one pass
mcp-doctor session recording.jsonl                # session hygiene only
mcp-doctor schema recording.jsonl                 # wire-shape conformance only
mcp-doctor collide config.json --client claude    # name collisions across installed servers
mcp-doctor collide --tools a.json b.json          # collisions across pre-dumped tool lists

Input: JSONL of recorded MCP messages — a CI log, a debug dump, a user-reported session file. No live server needed.

{"direction":"request","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25"}}
{"direction":"response","id":1,"result":{"protocolVersion":"2025-11-25","serverInfo":{"name":"srv","version":"1.0"}}}
{"direction":"response","id":2,"result":{"tools":[{"name":"search","inputSchema":{"type":"object","properties":{}}}]}}

Exit codes (CI-friendly): 0 clean · 1 warnings, or an incomplete collide scan (a server could not be inspected) · 2 critical. A real collision (2) outranks an incomplete scan (1).

Member auditors

  • mcp-session-audit — dangling calls, orphan/duplicate responses, isError swallowed, error-as-text, unknown tools
  • mcp-schema-audit — empty schemas, root type violations, draft-07 tuples, duplicate names, protocol version sanity
  • mcp-collision — predicts tool-name collisions before your agent does

Development

python -m unittest        # full suite, no extra dependencies needed
python -m build --sdist   # sdist contents are pinned in pyproject.toml

MIT License.

Metadata

Release files for mcpmedic 0.2.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 mcpmedic 0.2.0
File Size Uploaded Provenance Actions
mcpmedic-0.2.0.tar.gz 22.7 kB Without provenance Details for mcpmedic-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcpmedic 0.2.0
File Interpreter ABI Platform Actions
mcpmedic-0.2.0-py3-none-any.whl Python 3 none any Details for mcpmedic-0.2.0-py3-none-any.whl

Total release size: 42.8 kB

Release files / mcpmedic-0.2.0.tar.gz

Download URL mcpmedic-0.2.0.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0a74045d5e6138320a61793e028c1bbadb6f59a8a38fe2af82bc1ab0d6f752e4
BLAKE2b-256 checksum
How to use checksums
6cf4a38cdba4a5eda9b8a35bcb919f171f580cb6160f8f897eaf7a304a7d7115
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mcpmedic-0.2.0-py3-none-any.whl

Download URL mcpmedic-0.2.0-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4461299e74598418f63de8294749400b388f5f35f1ae2db3c027d1c70cac2945
BLAKE2b-256 checksum
How to use checksums
3c4cf004866ed6f6ae5a4f25611f4a9ee5205c37939d9d27b1e14e5a89315bc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mcpmedic 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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