Detrix MCP Server Adds Runtime Debugging to AI Coding Agents

What Detrix Does
Detrix is an MCP (Model Context Protocol) server that connects AI coding agents to your application's debugger via DAP (Debug Adapter Protocol). It allows agents to observe running code without stopping execution, using logpoints—breakpoints that capture values without pausing.
Key Features
- Observe any variable at any line without specifying line numbers (
find_variable) - Capture stack traces, memory snapshots, and evaluate expressions
- Throttle, sample, or rate-limit captures on hot paths
- Observations expire automatically—nothing leaks into production
- Runs locally by default—no cloud dependency, no data leaves your machine
- Works in Docker/cloud—agent connects to wherever the daemon is, no VPN needed
Example Use Case
In the source example, a Go microservice in Docker was reporting wildly inflated revenue. The agent used Detrix to:
- Read the source code and spot dead unit-conversion code
- Wake the service via Detrix
- Observe
txn.Amount,txn.Unit, andtotalvariables in the running container - Identify that
txn.Amount = 8957withtxn.Unit = "cents"was being summed as dollars instead of converting to $89.57 - Fix the client code and report the API contract change upstream
Setup
For Claude Code:
brew install flashus/tap/detrix && detrix init && claude mcp add --scope user detrix -- detrix mcp
For any other MCP-compatible agent, add to .mcp.json:
{
"mcpServers": {
"detrix": {
"command": "detrix",
"args": ["mcp"]
}
}
}
Add one line to your app:
import detrix
detrix.init(name="my-app") # sleeps until the agent needs it
Claude Code Skill
There's a Claude Code skill that changes Claude's default debugging behavior—once installed, Claude reaches for Detrix before suggesting print statements. It also has enable_from_diff: point it at a git diff with print statements someone already added and it converts them to observations automatically.
Install the skill:
mkdir -p ~/.claude/skills/detrix && cp skills/detrix/* ~/.claude/skills/detrix/
GitHub: https://github.com/flashus/detrix
📖 Read the full source: r/LocalLLaMA
👀 See Also

Scalpel v2.0: Codebase Scanner and AI Agent Orchestrator
Scalpel v2.0 is an open-source tool that scans codebases across 12 dimensions and assembles custom AI agent teams. It includes a pure bash scanner that runs without AI tokens and works with Claude Code, Codex, Gemini, Cursor, Windsurf, Aider, and OpenCode.

OpenClaw Multi-Agent Workflow Issues: Stalling, Context Loss, and Token Inefficiency
A developer reports OpenClaw multi-agent workflows frequently stall with agents hanging, experience context leakage despite custom documentation, and consume excessive tokens with no output. The setup used Gemini 3 Pro/Codex models with a COO orchestrator and specialized task agents.

Claude Code Logs Every Session to Disk — Here's How to Index and Recall Them
Claude Code writes every session turn to ~/.claude/projects/ as JSONL. One user indexed 1026 sessions (57MB, 76K turns) into SQLite+FTS5 with an MCP server for search and thread recall across sessions.

BusyDog Desktop: A Local AI Agent with P2P Networking for Mac
BusyDog Desktop is a local AI agent that runs Claude directly on a Mac, can read/write files, run terminal commands, control browsers, and connect with other agents via a P2P network using Hyperswarm DHT and a custom BDP protocol.