mcp-debug

A diagnostic tool for checking Model Context Protocol (MCP) servers and the tools they provide. It can check server health, trace a tool, or audit the configuration.

In plain words
What is it for?
Use it to check configured servers, investigate a specific tool failure, and review MCP configuration for errors or redundancy.
Why use it?
It helps explain why an MCP tool is failing silently or why a server is unavailable. It also reveals unused or duplicate servers.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/chacosoldier/compabob/mcp-debug
Any agent
npx skills add chacosoldier/compabob --skill mcp-debug
Clone the repo
git clone --depth 1 https://github.com/chacosoldier/compabob

Made for: Claude Code, Codex.

Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00047 $0.01269
Opus 5 $0.00023 $0.00634
Sonnet 5 $0.00009 $0.00254
Haiku 4.5 $0.00005 $0.00127

Measured 3d ago against content hash 6e130f93118c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-debug scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **http / sse** — `curl -s -o /dev/null -w "%{http_code}"` the URL.
.claude/skills/mcp-debug/SKILL.md · 150 lines

How it starts

The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCP Debugger

A diagnostic tool for MCP (Model Context Protocol) server health and tool execution. Helps identify why MCP tools fail, which servers are down, and which servers are unused or redundant.

Reads MCP config from the two standard locations:

  • ~/.claude.json — user-scope servers.
  • <project>/.mcp.json — project-scope servers.

Mode detection

Check the arguments:

  • No args or status — health check all configured MCP servers.
  • trace <tool-name> — trace a specific tool's configuration and likely failure modes.
  • audit — full audit with recommendations (unused servers, error patterns, consolidation candidates).

Mode 1: Status (default)

Steps

  1. List configured servers via the Claude Code CLI:

    claude mcp list
    

    If the CLI is unavailable, parse ~/.claude.json (top-level mcpServers) and ./.mcp.json directly.

  2. For each server, run the lightweight connectivity check appropriate to its transport:

    • stdio — confirm the command exists on $PATH (which <bin>) and the wrapper script is executable.
    • http / ssecurl -s -o /dev/null -w "%{http_code}" the URL.
    • Authenticated remote — a 401 or 403 means reachable, not down. Flag as auth rather than error.
  3. Present a status table:

    Server Transport Status Note
    foo stdio ok
    bar http auth 401 — token may need refresh
    baz stdio error binary not on PATH
  4. For warning/error rows, propose the next debugging step (install the binary, refresh the token, check the env var).

Output

## MCP Server Status

[table]

### Issues found
- <server>: <description + suggested fix>

### Summary
[X] ok | [Y] warnings | [Z] errors out of [N] servers

Mode 2: Trace

Steps

  1. Parse the tool name from args (e.g. /mcp-debug trace some-tool).

  2. Find which server provides this tool. The MCP tool naming convention is mcp__<server-slug>__<tool-name>; the server slug maps back to a key in ~/.claude.json or .mcp.json.

Read the full file on GitHub · 150 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 150 lines · 47 tokens per session scan A 6e130f93118c

Subscribe to this mod's changes

mcp-debug is a skill published in the GitHub repository chacosoldier/compabob (32 stars, last pushed 2mo ago), licensed MIT. It adds 47 tokens to every session and 1,269 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.