examples/reference-agent/skills/soleri-mcp-doctor/SKILL.md
Use when the user says "MCP not working", "tools missing", "fix MCP", "mcp doctor", or "server not connecting". Diagnoses and repairs MCP server connectivity issues.
npx skillsauth add adrozdenko/soleri soleri-mcp-doctorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Systematically diagnose why MCP servers are not connecting and attempt to repair them.
Read the .mcp.json in the project root to get the list of configured servers.
cat .mcp.json
For each server entry, record:
command field)args field)cwd field, defaults to .)env field, if any)For each configured server, run these checks in order:
which <command>
# e.g. which node, which uvx, which npx
If the binary is missing, report it and suggest installation.
For node commands, check the script file exists:
ls -la <args[0]>
For npx/uvx commands, check the package resolves:
npx --yes <package> --help 2>&1 | head -5
# or
uvx --from <source> <command> --help 2>&1 | head -5
Attempt to start the server with a timeout to verify it initializes:
timeout 10 <full command> 2>&1 &
sleep 3
kill %1 2>/dev/null
Look for:
If the server binds to a port, check for conflicts:
lsof -i :<port>
If a stale process holds the port, report the PID and suggest killing it.
For Node.js servers, check if node_modules exist:
ls <cwd>/node_modules/.package-lock.json 2>/dev/null
If missing, suggest npm install.
For Python (uvx) servers, the virtual env is managed by uvx — check if the package installs cleanly.
For each issue found, apply the appropriate fix:
| Issue | Fix |
|-------|-----|
| Binary not found | Suggest install command |
| Entry point missing | npm run build or check path |
| Port conflict (stale process) | kill <PID> (ask user first) |
| Missing node_modules | npm install in the right directory |
| Config error in .mcp.json | Show the fix, apply with user approval |
| Package resolution failure | Clear cache, retry install |
| Server crashes on start | Show error log, diagnose root cause |
IMPORTANT: Never kill processes without user confirmation. Always show the PID and process name first.
After repairs, instruct the user:
Repairs complete. Please restart MCP connections:
- Type
/mcpin the prompt- Toggle the repaired server(s) off and back on
- Verify tools appear with a ToolSearch
Note: Claude Code does not support programmatic MCP restarts. The user must use /mcp to reconnect.
Present findings as a table:
## MCP Doctor Report
| Server | Binary | Entry Point | Starts | Port | Status |
|--------|--------|-------------|--------|------|--------|
| soleri | node OK | dist/index.js OK | OK | — | Healthy |
| serena | uvx OK | git+... OK | OK | 24285 OK | Healthy |
### Issues Found
| Server | Issue | Fix Applied |
|--------|-------|-------------|
| serena | Stale process on :24285 | Killed PID 1234 |
### Action Required
- [ ] Run `/mcp` and reconnect repaired servers
dist/ hasn't been built. Run the build command.cwd: "." resolves from where Claude Code launched, not the .mcp.json location.| Check | Command | What it tells you |
|-------|---------|-------------------|
| Binary exists | which <cmd> | Is the runtime installed? |
| Script exists | ls <path> | Is the entry point built? |
| Port free | lsof -i :<port> | Is something blocking the port? |
| Deps installed | ls node_modules | Are npm packages present? |
| Server starts | timeout 10 <cmd> | Does initialization succeed? |
testing
Triggers: "terse mode", "be brief", "less tokens", "fewer tokens", "compress output", "caveman", or invokes /terse. Token-efficient responses with full technical accuracy.
tools
Triggers: "compress this file", "compress CLAUDE.md", "compress memory", "shrink this", "reduce tokens in file", or invokes /compress. Compresses natural language files to save input tokens.
testing
Triggers: "release", "bump version", "publish packages", "cut a release", "version bump", "npm publish". Bumps monorepo versions, commits, tags, pushes to trigger CI release. Use deliver-and-ship for quality gates.
development
Triggers: "implement X", "build Y", "fix Z", "add feature", or any work task needing planning + execution. Full orchestration loop: plan, execute, complete with vault context and brain recs.