Expand description
agentmux-mcp doctor [--heal]: why this agent’s AgentMux tools aren’t
connected, run from its shell with no MCP session
(docs/specs/SPEC_AGENT_MCP_SELF_HEAL_2026_10_10.md §7). It checks what a
person would check by hand: that this binary starts and answers MCP, also
through Claude Code’s shell prefix the way the CLI starts it; the agent’s
.mcp.json; what srv saw and tried; and Claude Code’s own log for the
server. Read-only, except --heal, which asks srv to run the repair for
the caller’s own pane.
Structs§
Constants§
Functions§
- check_
cli_ 🔒log - check_
config 🔒 - check_
handshakes 🔒 - Start the server the way the CLI does, and without the prefix too, so a failure says which part broke.
- check_
srv 🔒 - cli_
cache_ 🔒dir - Where Claude Code keeps its per-project caches (the
env-pathscache folder forclaude-cli). Its own layout, so a miss is reported, not an error. - handshake 🔒
- Send
initializeand wait for the answer: the server’s version, or why not. - log_
outcome 🔒 - What the CLI’s log says happened: the last attempt’s error, with what the server printed on stderr (the useful half), or that it connected.
- project_
key 🔒 - Claude Code’s folder name for a project: its path with every character
that isn’t a letter or digit made
-. - request_
heal 🔒 - run
- Run the checks, print the report, and return the exit code: 1 when a check failed.
- srv_
health_ 🔒line - One line on what srv saw and did, from its
mcp-healthanswer.