Documentation
¶
Overview ¶
gemba-mcp is the MCP-tool sibling of gemba-ask + gemba-state (gm-97w7.2). It exposes four tools Claude Code (or any other MCP-capable agent) can call with schema-validated arguments instead of shelling out to the CLI binaries:
ask_question(role, text, bead_id?, title?) raise_blocker(role, text, bead_id?, title?) # role MUST be "manager" report_state(state, bead_id?, note?) emit_skill_output(skill_id, lines) # gm-twp2
emit_skill_output is the structured-output channel for persona consults. A persona-spawned session calls it with the array of skill-defined output lines (e.g. strategy + recommendations + summary for the PM's epic_order skill); the dispatcher tails the session log, runs each line through skill.ValidateOutputLine, and persists the PersonaConsultRecord audit row.
Why an MCP server in addition to the CLIs:
- The CLIs stay as the fallback for shell-only agents.
- MCP tools appear natively in the agent's trace (no Bash wrap) and get schema-validated arg handling from the SDK.
- The same (kind, channel=tool_call, urgency) shape lands on the session log, so the bridge translator and escalation index don't care which surface produced the frame.
Install path: `gemba install-bridge` registers this binary as an MCP server under `.claude/settings.local.json` alongside the hook stanza (gm-native.7 extended in this bead). The MCP + hook installs are additive — both run for the same session.
Design invariants (mirrors gemba-ask / gemba-state):
- Zero state. Zero network. One file write per tool invocation.
- Any failure in the handler returns a typed MCP error so the agent sees the problem immediately.
- Frame shape MUST stay lock-step with internal/adapter/native/bridge/frame.go Frame.