@thehammer/danx-dashboard-mcp
v0.1.20
Published
Stdio MCP server wrapping danxbot's dashboard /api/issues/* normalized DB-backed HTTP routes for dispatched agents (DX-704 Phase 2).
Readme
@thehammer/danx-dashboard-mcp
Stdio MCP server wrapping danxbot's dashboard /api/issues/* normalized DB-backed HTTP routes. Replaces the legacy "agents Edit/Write .yml files directly" pattern from before DX-704 / DX-811.
Each tool is a thin envelope over one HTTP route — Zod-validated at the MCP boundary, fetch under the hood, server response passed back to the agent verbatim. Refusal envelopes ({error, ...extra} with failed_gate, non_terminal_phases, offending_keys, etc.) come through as {ok: false, status, body} so the agent can pick the right next action without guessing. 5xx and network failures throw.
Env vars (required, fail-loud at boot)
| Var | Purpose |
|---|---|
| DANXBOT_DASHBOARD_URL | Dashboard base, e.g. http://danxbot-dashboard:5555 (inside compose) or http://localhost:5555 (host) |
| DANXBOT_DISPATCH_TOKEN | Per-dispatch bearer — server validates via requireUser/dispatch-token checks |
| DANX_REPO_NAME | Repo half of the qualified board id |
| DANXBOT_BOARD_NAME | Board-slug half of the qualified board id (the dispatch injects board.slug here) |
BOARD-ONLY (DX-1171): board is the first-level concept; repo is DERIVED from board server-side, never passed. At boot the package composes the dispatch's qualified board id <repo>:<slug> from DANX_REPO_NAME + DANXBOT_BOARD_NAME and appends it as ?board=<id> (and body.board on create) to every /api/issues/* request. Each tool exposes an optional board arg — a FULL qualified id <repo>:<slug> (e.g. platform:the-supply-operations-hub) — that overrides it per-call for cross-board reads/writes (unknown board → 404). The dashboard owns board→repo resolution; this package never sends repo.
Tool surface
All exposed as mcp__danx_dashboard__<name> once wired through the workspace mcp.template.json.
| Tool | HTTP | Notes |
|---|---|---|
| issue_list | GET /api/issues | filters: type, parent_id (null → root-only), dispatchable_derived, assigned_agent, include_closed, limit, offset |
| issue_get | GET /api/issues/:id | Returns hydrated card + ancestor chain |
| issue_create | POST /api/issues | Epic REQUIRES non-empty phase_children[] (atomic insert) |
| issue_edit | PATCH /api/issues/:id/edit | Prose-only — semantic keys refused with 400 + pointer to dedicated handler |
| issue_transition | POST /api/issues/:id/transition | Actions: ready, pickup, rollback_pickup, complete, cancel, block, unblock, archive, reopen |
| issue_triage | POST /api/issues/:id/triage | Verdicts: approve, cancel, keep, defer (with optional ICE + ttl_seconds) |
| issue_comment | POST/PATCH/DELETE /api/issues/:id/comments[/:cid] | Author server-stamped, soft-delete preserved |
| issue_dependency | POST/DELETE /api/issues/:id/dependencies[/:did] | depends_on cycle-checked; remove hardcodes reason: "recorded_in_error" |
| issue_requires_human | POST/DELETE /api/issues/:id/requires-human | Set replaces step rows atomically; clear soft-deletes them |
| issue_retro | PUT /api/issues/:id/retro | Requires terminal card; replace semantics |
Build + test
cd packages/danx-dashboard-mcp
npm install
npm test
npm run build # → dist/index.js (executable)Publishing
Out of scope for this package's own code — the make publish-danx-dashboard-mcp target in the danxbot root Makefile owns version bump + npm publish + propagation wait. Standing operator authorization per ~/.claude/skills/thehammer-publish/.
