Skip to content

feat: MCP server exposing the trace query engine to agents (peer of DAP, not via Workbench) #35

Description

@chayan-bit

Gap

Agentic time-travel debugging is currently specified only in the Workbench (its CLAUDE.md: "expose Mirrorscope's DAP ops to the ACP agent as tools"). That violates our own independence rule from the other direction: if the agent surface only exists inside one client, then Mirrorscope-standalone has no agent surface, and every other agent host has to reimplement the Workbench's translation layer.

Meanwhile the market is moving: Undo shipped an MCP integration so AI assistants can drive their time-travel debugger, and Replay.io demonstrated the payoff concretely — an agent fixed 1 of 3 app bugs without replay tooling and found all 3 with time-travel MCP access. Replay is browser/JS-only. Undo is proprietary. There is no open-source deterministic-replay + MCP stack for compiled systems languages. That is an empty square on the board right now.

Scope

  • mirrorscope mcp — an MCP server over the same query engine the DAP adapter uses. Neither protocol is privileged; both are adapters.
  • Tools, minimally: replay_to(seq), reverse_continue(predicate), writes_to(expr), value_became(expr, value), origin_of(expr, seq), logical_stack(task, seq), wake_chain(task), list_checkpoints(), task_timeline().
  • Design the tool contracts for an agent, not for a UI: results are structured, self-describing, and carry sequence numbers the agent can feed back in. Prefer one call that answers a causal question over five calls the agent must compose.
  • Read-only by default. Recording and process control are separate, explicitly-enabled tools.

Explicit constraint

The Workbench consumes this like anyone else. Nothing here may reference Workbench, ACP, or Life OS. When this lands, Workbench's agentic-debugging integration should get simpler, not deeper.

Dependencies

Query engine issue. Ships meaningfully once replay + stepBack/reverseContinue (#8) and watchpoints (#12) exist; the trace-DB index makes it fast rather than possible.

Done when

Claude Code (or any MCP client) can, unaided, attach to a recording of a crashing C program, locate the faulting write, and report the causal chain — with no Workbench in the loop.

Ref: README §7, §10. Gap: "the AI-agent debugging surface is being built right now — and the native-code side is commercial-only."

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureProduct feature workflagshipHeadline differentiatorintegrationCross-repo / protocol integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions