Claude Code
Connect Claude Code to Looma with the Looma agent, MCP tools, and optional slash command.
Use the Claude Code integration when you want real agent activity captured automatically through MCP and hooks.
Start Looma
bun install
bun devOpen /dashboard, sign in, and create a Looma API key.
Install and connect
Install the public beta agent package:
npm i -g looma-agent@beta
looma setup claude-code --app-url $NEXT_PUBLIC_APP_URL --api-key <token>
LOOMA_API_URL=$NEXT_PUBLIC_APP_URL LOOMA_API_KEY=<token> looma doctor --e2elooma setup claude-code writes local Claude Code MCP and hook configuration in the current project:
.mcp.jsonstarts Looma through the installed package entrypoint with an absolutenode .../dist/cli.js mcpcommand..claude/settings.local.jsoninstalls asyncPostToolUseandPostToolUseFailurehooks with the same installed package entrypoint.LOOMA_API_URLandLOOMA_API_KEYare scoped to the generated project config.
Use looma doctor --e2e for a real integration check. It creates a recording, writes a test event, stops the recording, and prints the replay URL.
Check /mcp
In Claude Code, run:
/mcpConfirm the looma server exposes:
record_startrecord_eventrecord_stop
After record_start, Looma stores the active session in ~/.looma/active_session, so record_event and record_stop can use the active session without repeating sessionId.
Add optional /record
Create .claude/commands/record.md in the Claude Code project:
---
description: Start or stop a Looma recording through MCP.
---
Use the Looma MCP tools for recording.
- If the user says `/record start <name>`, call `record_start` with that name, `harness: "claude-code"`, and the current workspace name.
- If the user says `/record stop`, call `record_stop` without `sessionId`; Looma reads `~/.looma/active_session`. Include `finalOutput.content` when the final answer should appear on the replay page.
- Do not send secrets or full file contents through `record_event`.
User arguments: $ARGUMENTSThis command is a convenience wrapper. MCP tools and hooks remain the source of truth.
Manual E2E
- Run
/record start "Claude Code smoke test"or ask Claude to callrecord_start. - Let Claude run a harmless
Read,Bash, and edit in a throwaway workspace. - Open the returned
/sessions/{sessionId}URL. - Confirm the recording indicator and event count update while the session is active.
- Run
/record stopor callrecord_stop. - Confirm the replay includes events, markers, chapters, notes, and behavior summary.
Public beta notes
Use looma-agent@beta until the Claude Code bridge is promoted to the latest tag. The fixed public beta is 0.1.0-beta.1; it uses deterministic Claude Code config and supports record_stop.finalOutput.