Using Krometrail with Claude Code
Krometrail gives Claude Code runtime debugging — it can set breakpoints, inspect variables, and trace execution to find bugs.
Setup: MCP Server (Recommended)
Add via the CLI or edit the project .mcp.json directly:
claude mcp add --transport stdio --scope project krometrail -- krometrail --mcpOr add to .mcp.json in your project root (shared with your team):
{
"mcpServers": {
"krometrail": {
"command": "krometrail",
"args": ["--mcp"]
}
}
}{
"mcpServers": {
"krometrail": {
"command": "npx",
"args": ["krometrail@latest", "--mcp"]
}
}
}{
"mcpServers": {
"krometrail": {
"command": "bunx",
"args": ["krometrail@latest", "--mcp"]
}
}
}Claude discovers the debug_* tools automatically — no CLAUDE.md changes needed.
Focused tool sets
If you only need debugging or only need browser observation, add a filtered server:
# Debug tools only
claude mcp add --transport stdio --scope project krometrail-debug -- krometrail --mcp --tools=debug
# Browser tools only
claude mcp add --transport stdio --scope project krometrail-browser -- krometrail --mcp --tools=browserSetup: CLI with Skill
The CLI provides the same debugging capabilities as the MCP tools, accessed through bash commands. Some setups prefer CLI tools for their transparency and scriptability.
Install the krometrail skill:
npx skills add nklisch/krometrail --skill krometrail-debug krometrail-chromeVerification
- Start Claude Code
- Ask: "What debug tools do you have available?"
- Claude should list the
debug_*tools (MCP) or describe the CLI commands (skill)
Example Workflow
Ask Claude Code:
The
test_gold_discounttest is failing with an assertion error. Use the debugger to find the root cause.
Claude Code will:
- Identify the test file and set a breakpoint at the assertion
- Launch the test under the debugger:
debug_launchwithpytest tests/test_discount.py::test_gold_discount - Continue to the breakpoint:
debug_continue - Inspect variables:
debug_evaluateontier_multipliers,discount, etc. - Trace back to find the incorrect value
- Report the root cause with the specific line and variable that is wrong
Tips
- MCP path is zero-config — Claude discovers tools automatically from the server
- CLI path exposes the same tools as bash commands — transparent, scriptable, and preferred by some agent setups
- Let Claude choose breakpoints — it knows the code better after reading it
- Conditional breakpoints are powerful for loops:
krometrail debug break app.py:25 when discount < 0 - The viewport is compact (~400 tokens per stop) so Claude can take many debug steps without exhausting context
- Framework auto-detection works for pytest, jest, go test, Django, Flask, etc.
Checking Installation
krometrail doctorThis shows which language adapters are installed and their versions.