Skip to content

extend: mcp-doctor — flag MCP servers that won't start (health complement to mcp-audit)#6

Open
deemwario wants to merge 1 commit into
mainfrom
extend/mcp-doctor-cycle15
Open

extend: mcp-doctor — flag MCP servers that won't start (health complement to mcp-audit)#6
deemwario wants to merge 1 commit into
mainfrom
extend/mcp-doctor-cycle15

Conversation

@deemwario

Copy link
Copy Markdown

Extend: mcp-doctor — flag MCP servers that won't start

#ossengine cycle 15extend the family, additive, no owner gate. The health complement to mcp-audit.

Why

mcp-audit covers MCP security (secrets, egress). Nothing covered health: a configured MCP server whose command isn't installed fails silently — Claude Code just shows no tools from it, no error. mcp-doctor reads your mcpServers and answers "will this start?"

What it does (static — never starts a server or hits the network)

  • CMD_NOT_FOUND (HIGH) — command not on PATH and not an executable file
  • NO_COMMAND_OR_URL (HIGH) — server with neither a command nor a url
  • BAD_URL (HIGH) — malformed remote server url
  • ENV_UNSET (MED, heuristic) — a referenced env var isn't set (name only — value never read/printed)
  • LAZY_FETCH (LOW, heuristic) — npx/uvx/bunx fetched on first run
  • shape-robustness codes — bad JSON shapes become findings, never tracebacks

Exit 0/1/2; --json for CI; always-printed honest disclaimer. Does not duplicate mcp-audit's security checks.

Verification (independently re-run)

  • test_mcp-doctor.sh16/16 green.
  • Exit codes confirmed directly: findings→1, clean→0, missing/invalid→2. --json{source, findings, summary, disclaimer}.
  • Single-file python3, stdlib only. README house-style with the deemwar.com/contact CTA. MIT.

Self-discovering CI (PR #2) picks up test_mcp-doctor.sh on merge.

🤖 Generated with Claude Code

The health complement to mcp-audit (which covers SECURITY). A configured
MCP server whose command isn't installed fails SILENTLY — Claude Code just
shows no tools from it, with no error. mcp-doctor reads your mcpServers and
answers 'will this start?'

Flags: command not on PATH / not an executable (CMD_NOT_FOUND), a server
with neither command nor url (NO_COMMAND_OR_URL), malformed remote url
(BAD_URL), referenced env var not set (ENV_UNSET — name only, value never
read), and npx/uvx/bunx lazy-fetch (LOW). Bad JSON shapes become findings,
never tracebacks. Exit 0/1/2; --json for CI.

Static by construction — resolves the command + validates config; never
starts a server or hits the network, and says so. Does NOT duplicate
mcp-audit's secret/egress checks.

- single-file python3, stdlib only; test_mcp-doctor.sh 16/16 green.
- house-style README with the deemwar.com/contact CTA. MIT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant