mcp-debug
Skill34 starsChanged 21 days agoMITView on GitHub
MCP server health check, tool tracing, and audit. Use when an MCP tool fails silently or errors, to check server status, or to audit the configured servers: /mcp-debug [status|trace|audit]. MCP servers only; the health of the whole setup is /system-audit.
In this repository21 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-agentSkill
- build-listSkill
- chart-tufteSkill
- councilSkill
- design-precheckSkill
- document-exportSkill
- handoverSkill
- index-memorySkill
- log-decisionSkill
- meeting-prepSkill
- memory-debtSkill
- merge-contactsSkill
- morning-briefSkill
- post-callSkill
- reflectSkill
- setupSkill
- system-auditSkill
- tasksSkill
- visual-explainerSkill
- weekly-reviewSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
No args or status: health check all configured MCP servers.
- Very specific: line 29
If the CLI is unavailable, parse ~/.claude.json (top-level mcpServers) and ./.mcp.json directly.
- Distinctive: line 102
Run the status check (Mode 1) for the full server list.
- Distinctive: line 104
If you keep tool-usage telemetry (this kit does not ship any), summarise the last 7 days:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- List configured servers via the Claude Code CLI:
If the CLI is unavailable, parseclaude mcp list~/.claude.json(top-levelmcpServers) and./.mcp.jsondirectly. - 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 / sse:
curl -s -o /dev/null -w "%{http_code}"the URL. - Authenticated remote: a
401or403means reachable, not down. Flag asauthrather thanerror.
- stdio: confirm the command exists on
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 - For
warning/errorrows, 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] serversMode 2: Trace
Steps
- Parse the tool name from args (e.g.
/mcp-debug trace some-tool). - 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.jsonor.mcp.json. - Show the server's configuration:
- Transport (stdio / http / sse).
- Command or URL.
- Args.
- Env vars (always redact secrets, show
***instead of values for any key matching(?i)(token|key|secret|password)).
- Classify the likely failure mode:
- Auth expired: OAuth token needs refresh.
- Schema mismatch: tool expects different parameters than what was sent.
- Timeout: server takes too long to respond.
- Server down: process crashed or port unreachable.
- Config error: missing env var, wrong path, or stale wrapper script.
Output
## Tool trace: <tool-name>
Server: <server>
Transport: stdio | http | sse
Command / URL: <value>
Status: <from health check>
### Configuration
[relevant config, secrets redacted]
### Likely cause
<classification + suggested fix>Mode 3: Audit
Steps
- Run the status check (Mode 1) for the full server list.
- If you keep tool-usage telemetry (this kit does not ship any), summarise the last 7 days:
- Tools called per server.
- Error rate per server.
- Most-used and least-used servers.
- Identify:
- Unused servers: configured but never called. Candidates for removal (each one adds startup overhead).
- High-error servers: called often but failing frequently.
- Duplicate capabilities: multiple servers providing similar tools.
- Missing servers: tools referenced in agents/skills but no server configured.
Output
## MCP audit report
Date: YYYY-MM-DD
Servers: <N> configured
### Health summary
[status table]
### Usage (last 7 days)
| Server | Calls | Errors | Error rate |
|---|---|---|---|
[from session logs, or "no usage data available"]
### Recommendations
1. Remove: <servers not used in 7+ days, with rationale>
2. Fix: <servers with high error rates>
3. Consolidate: <servers with overlapping capabilities>
4. Add: <missing servers referenced by agents>Constraints
- Never expose secrets. Redact API keys, tokens, passwords in every output.
- Read-only. This skill does not start, stop, or modify any servers or config.
- Do not delete servers without explicit user approval.
401/403/405on URL servers = reachable, not down. Mark asauthso the operator knows to refresh credentials rather than restart the server.
Quality checklist
- All MCP config locations checked (
~/.claude.json+.mcp.json). - Secrets redacted in every output line.
- False-positive warnings (e.g. spaces in command paths handled by the shell) are flagged as such, not as errors.
- Recommendations include a one-line rationale, not just an action.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

