What the agent gets
Once connected, the agent can:- Spin up a Mirra session from inside its coding context.
- Introspect mirror state — list customers in Stripe, emails in Resend, messages in Twilio.
- Fire real requests against the mirror and see the real response shape — not a guess.
- Inspect webhooks that fired — payload, signature header, timing — to verify the handler it just wrote.
- Reset mirror state between iterations so its experiments don’t pile up.
The MCP endpoint
Authorization: Bearer <token> header. Tokens are the same ones the CLI uses — if you’re already logged in (mirra login) the same token works.
The fast install: @mirrahq/skills
The easiest way to wire any of Claude Code / Cursor / Windsurf / Cline / Copilot is:
- Detects which agent(s) you have installed.
- Installs the Mirra MCP connection into each agent’s config.
- Detects the vendors your current project uses and registers them.
- Drops a starter scenario into
scenarios/so you have something to run immediately.
Per-agent setup
If you’d rather wire it manually:- Claude Code
- Cursor
- Copilot (agent mode)
- Windsurf
- Cline
Add to Restart Claude Code. The Mirra tools appear in the tool picker.
~/.config/claude-code/mcp.json:MIRRA_TOKEN environment variable set (or hardcoded into the config if you prefer).
The tools the agent gets
Once wired, these MCP tools are available in the agent’s context:mirra.session.start
mirra.session.start
Create a new ephemeral or persistent session. Parameters:
mirrors (list), seeds (optional), persistent (bool). Returns the session ID and mirror URLs.mirra.session.state
mirra.session.state
Dump the current state of one or all mirrors in a session. Returns JSON. The agent can inspect “what customers exist in this Stripe mirror” without running any of your code.
mirra.session.request
mirra.session.request
Fire an arbitrary HTTP request at a mirror. Parameters:
mirror, method, path, body, headers. Returns the full response. Used by the agent to explore the API surface before writing code that uses it.mirra.session.webhooks
mirra.session.webhooks
List webhooks that fired in the session. Parameters:
mirror, since. Returns event type, payload, signature header, timestamp. The agent uses this to verify its webhook handler received what it expected.mirra.session.reset
mirra.session.reset
Reset mirror state mid-session. Parameters:
mirror (optional, defaults to all), seed (optional). Returns when reset is complete.mirra.session.end
mirra.session.end
Tear down the session. Called automatically when the agent’s coding session ends, but can be explicit.
What a session with an agent looks like
A typical Claude Code conversation after the MCP wiring:The difference it makes
Without Mirra, the same agent:- Writes a subscription upgrade handler based on training-data recall of Stripe’s API.
- Writes a mock that matches its recall.
- Writes tests that pass against the mock.
- Ships to prod. Real Stripe’s
past_due → canceledtransition takes different amounts of time than the agent remembered. Dunning breaks. Customers get double-billed.
- Runs
mirra.session.requesttwice, sees the real state machine. - Writes a handler grounded in actual behavior.
- Writes tests against the same mirror — deterministic and real.
- Ships to prod. The handler matches vendor behavior because it was built against vendor behavior.
Where to go next
First scenario
Write a scenario an agent can drive against.
Mirrors catalog
Which vendors your agent can verify against today.