smcp-doctor

smcp-doctor is a skill for Claude Code from Heretyc/subagent-mcp. It costs 82 tokens per session (1,535 once invoked), scanned A, original, Apache-2.0.

A diagnostic skill for checking whether subagent-mcp is installed and connected correctly. It explains each health check and asks before making any repair.

In plain words
What is it for?
Running a non-interactive health check, explaining warnings or failures, and performing approved repairs.
Why use it?
It helps identify setup problems while keeping configuration changes under your control.

Skill for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: mentions subagents; mentions Codex.

Part of the subagent-mcp plugin — 8 skills, 3 hooks, 1 MCP server shipped together

Good fit Running a non-interactive health check, explaining warnings or failures, and performing approved repairs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/heretyc/subagent-mcp/smcp-doctor
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.

Any agent
npx skills add Heretyc/subagent-mcp --skill smcp-doctor
Clone the repo
git clone --depth 1 https://github.com/Heretyc/subagent-mcp

Made for: Claude Code.

Or install subagent-mcp, the plugin that ships this one along with the rest of its 8 skills, 3 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for smcp-doctor

README.md
[![agentmods](https://agentmods.dev/badge/skills/heretyc/subagent-mcp/smcp-doctor/github.svg)](https://agentmods.dev/skills/heretyc/subagent-mcp/smcp-doctor)
Your own site
<a href="https://agentmods.dev/skills/heretyc/subagent-mcp/smcp-doctor"><img src="https://agentmods.dev/badge/skills/heretyc/subagent-mcp/smcp-doctor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for smcp-doctor

Your own site · 80×15
<a href="https://agentmods.dev/skills/heretyc/subagent-mcp/smcp-doctor"><img src="https://agentmods.dev/badge/skills/heretyc/subagent-mcp/smcp-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,535 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00082 $0.01535
Opus 5 $0.00041 $0.00767
Sonnet 5 $0.00016 $0.00307
Haiku 4.5 $0.00008 $0.00153

Measured 10d ago against content hash 5e75f8a44e85, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

smcp-doctor scanned grade A with 0 findings 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 10d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/smcp-doctor/SKILL.md · 113 lines

How it starts

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

subagent-mcp Doctor

Diagnose subagent-mcp install and wiring health, explain the results, and drive repairs with the user in the loop. This skill mirrors the CLI's S8 repair behavior: it asks in conversation, then runs a repair only after the user confirms. It never edits a config on its own.

Step 1: Run doctor non-interactively

Run the CLI with stdin redirected from empty so it is never a TTY and can never prompt. In non-TTY mode every check is read-only and reports no changes made for anything repairable:

# macOS / Linux
subagent-mcp doctor < /dev/null
# Windows
subagent-mcp doctor < NUL

If subagent-mcp is not on PATH, the addon is likely not installed globally - point the user at the /smcp:help install steps and stop.

Step 2: Parse the E1 output

Every check prints one line in this exact shape, followed by a summary line:

[PASS|WARN|FAIL|INFO] <id> <name>: <detail>
Summary: pass=<n> warn=<n> fail=<n> info=<n> exit=<0|1>

Exit code is 1 when any check is FAIL, else 0. Read each line by its id and name, and explain the detail in plain English. Status meanings:

  • [PASS] - healthy, nothing to do.
  • [WARN] - degraded or incomplete; usually has a repair.
  • [FAIL] - broken; blocks correct operation and needs a fix.
  • [INFO] - informational only (for example network probes); no repair.

Step 3: The 9 checks and their repairs

Cover every check. For each WARN or FAIL that has a repair, offer the exact repair path below and ask a clear Y/n question before running anything that changes a config. On Y, run the repair; on n, skip it and move on. The CLI creates a timestamped backup before it modifies any file (via its backup routine and .bak- copies), so state that the change is reversible. Note that reachability, update-check, and a healthy session-state line are the only INFO-class outputs and carry no repair.

  1. install-mode - is subagent-mcp installed via npm-global or a marketplace plugin? FAIL means no install was found. Repair (guidance, not a config edit): reinstall per /smcp:help, then re-run doctor.
  2. mcp-registration - does the host's live MCP config resolve to an existing dist/index.js? WARN/FAIL flags a stale or dangling entry. Repair: ask "Repair MCP registration now? [Y/n]"; on Y run subagent-mcp doctor interactively (a real terminal) so its built-in "Fix MCP registration?" prompt fires, or re-register with claude mcp add / codex mcp add per /smcp:help.
  3. duplicate-hooks - are there redundant subagent-mcp hook entries (same id, a legacy pair, or a user copy that duplicates a plugin manifest)? WARN lists each duplicate. Repair: ask "Remove the duplicate hook entries? [Y/n]"; on Y run subagent-mcp doctor interactively so its per-entry "Remove duplicate entry ...? [Y/n]" prompts fire (it backs up first).
  4. provider-config - does providers.jsonc exist and parse? FAIL means it is missing or malformed. Repair: if missing, ask "Scaffold providers.jsonc now? [Y/n]" and on Y run subagent-mcp config init (backs up any existing file). If it is a parse error, do not auto-run anything - explain the parse error location and have the user fix the JSONC by hand.
  5. env-keys - are all key_env vars present in .env and not left as YOUR_KEY_HERE? WARN lists missing keys or a missing .env. Repair (no CLI edit - secrets are user-owned): tell the user which keys to add to ~/.subagent-mcp/.env; offer to open or scaffold via subagent-mcp config init only with Y/n confirmation, and never print or invent a key value.
  6. routing-coverage - how many of the 14 task categories have a provider slotted at 1 or greater? WARN no API routing active means the v3.0.0 slot router has no provider to use for API-routed tasks. The "repair" is optional: set slots in providers.jsonc per /smcp:help. No confirmation needed since nothing is auto-changed.
  7. reachability - INFO per configured base_url: reports the HTTP status or unreachable. No repair; surface it as a note (this is the reachability signal /smcp:status may reference).
  8. update-check - is a newer published version available? WARN means yes. Repair: ask "Upgrade subagent-mcp now? [Y/n]"; on Y run subagent-mcp upgrade (it backs up, repairs hooks, and re-runs doctor). INFO offline or undeterminable needs nothing.
  9. session-state - is the SessionStart hook present in the installed manifest, and can server session state be reached via get_status? WARN means the hook is missing. Repair: ask "Restore the SessionStart hook? [Y/n]"; on Y run subagent-mcp doctor interactively so its "Restore SessionStart hook? [Y/n]" prompt fires (it backs up first). A healthy state is INFO and needs nothing.

Read the full file on GitHub · 113 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. 10d ago First seen · 113 lines · 82 tokens per session scan A 5e75f8a44e85

Subscribe to this mod's changes

smcp-doctor is a skill published in the GitHub repository Heretyc/subagent-mcp (3 stars, last pushed 5d ago), licensed Apache-2.0. It adds 82 tokens to every session and 1,535 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

operating-cadence

Designs the rhythm an organization runs on — which reviews happen weekly, monthly and quarterly, what each one decides, who owns the numbers presented, and how a signal at the front line reaches the people who can act on it. Use this to set up a management operating system, fix a meeting calendar that produces no…

cbrock84/headcount · 95 tokens

analyze

Deep-dive codebase analysis that explains how things actually work — business rules, architecture patterns, auth flows, data models, integrations, and performance hotspots. Use whenever the user asks "how does X work", "map the Y flow", "what are the business rules for Z", "trace the auth path", "explore the codebase…

rsmdt/the-startup · 118 tokens

debug

Systematically diagnose and resolve bugs through conversational investigation and root cause analysis.

rsmdt/the-startup · 15 tokens

testing

Writing effective tests and running them successfully. Covers layer-specific mocking rules, test design principles, debugging failures, and flaky test management. Use when writing tests, reviewing test quality, or debugging test failures.

rsmdt/the-startup · 42 tokens

performance-analysis

Measurement approaches, profiling patterns, bottleneck identification, and optimization guidance. Use when diagnosing performance issues, establishing baselines, identifying bottlenecks, or planning for scale. Always measure before optimizing.

rsmdt/the-startup · 42 tokens

sgrep

Semantic and hybrid code and conversation search for intent-based queries. Use when exploring unfamiliar codebases, finding code by concept instead of exact text, or recalling past agent conversations about similar problems.

XiaoConstantine/sgrep · 40 tokens