Detrix
About
Agentic debugger Browse Detrix MCP Server for Claude, Cursor, VS Code, and other AI agents.
Details
- Author
- flashus
- Categories
- Developer Tools
Jump to
Setup
Install Detrix in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/flashus/detrix
Follow the installation instructions in the repository README, then restart your MCP client.
- Watch any variable at any line— agent sets an observation point in seconds, zero code changes during debugging
- Local or cloud— same workflow for Docker containers and remote hosts
- Python, Go, Rust— observation points capture values without pausing, without restarting
- Built for agents— observe, query, manage observations via natural language; Claude Code, Cursor, Windsurf
1-minute demo:A Go service in Docker starts reporting wrong numbers. Nothing in the client code changed. Claude watches it live and finds the cause.
Here's what the session looks like:
You: "The order-service in Docker is reporting wildly inflated revenue. Daily total is in the thousands when transactions should be $20-200." Agent: → reads the source, spots dead unit-conversion code → wakes the service via Detrix → observes txn.Amount, txn.Unit, total (no line number — find_variable locates it in the running container) "Found it. The pricing API changed what it's returning. txn.Amount = 8957, txn.Unit = "cents" → should be $89.57, summed as $8957 In calculateRevenue, the unit field is fetched and discarded: unit := txn.Unit _ = unit // ← conversion was intended, never implemented total += amount // ← adds cents as if they were dollars This didn't matter before. It matters now." → fixed the client code → reported the API contract change upstream
No code was modified to instrument. No restarts. The old workflow — add a log line, rebuild, redeploy, wait for the bug to reproduce — replaced by watching it live.
You don't need to know the line number either — describe the behavior and the agent finds where to look.
You hit a bug. The old workflow: add aprint, restart, reproduce, remove the print, repeat. If it's in production, redeploy. If it's in a Docker container, get into the container. If it's intermittent, wait.
With Detrix, you just ask the agent. It finds the right line, plants an observation point, and tells you what it sees — live, nothing restarting.
That bug that cost you hours last week — redeploy after redeploy, still can't reproduce — your agent can investigate it in minutes, while your app keeps running.
¹ Embeddetrix.init()once for zero restarts forever. Or restart once to attach the debugger (--debugpy,dlv,lldb-dap) — from that point on, the agent adds and removes observations without any further restarts.
Try it in 2 minutes. Your agent handles everything after step 3.
curl --proto '=https' --tlsv1.2 -LsSf \ https://github.com/flashus/detrix/releases/latest/download/detrix-installer.sh | sh
irm https://github.com/flashus/detrix/releases/latest/download/detrix-installer.ps1 | iex
docker pull ghcr.io/flashus/detrix:latest
cargo install --git https://github.com/flashus/detrix detrix
Then initialise (creates config and sets up local storage):
One line — the debugger sleeps until your agent needs it, zero overhead when idle:
import detrix detrix.init(name="my-app")
Go and Rust work the same way — seeApp Integration.
claude mcp add --scope user detrix -- detrix mcp
Cursor / Windsurf— add to.mcp.jsonin your project root:
{ "mcpServers": { "detrix": { "command": "detrix", "args": ["mcp"] } } }
For cloud setup and other editors, see thesetup guide.
That's it. Ask your agent to observe any line in your running app — no restarts, nothing ships to prod.
Don't want to add a dependency? Start your app directly under a debugger instead:
# Python python -m debugpy --listen 127.0.0.1:5678 app.py # Go dlv debug --headless --listen=127.0.0.1:5678 --api-version=2 main.go # Rust lldb-dap --port 5678
Listens on127.0.0.1— local only. See thelanguage setup guidefor remote and Docker.
Detrix is a daemon that runs locally or in the cloud and connects your AI agent to any running process via 29 MCP tools. Under the hood, it talks to your app's debugger via theDebug Adapter Protocol (DAP). It setslogpoints— breakpoints that evaluate an expression and log the result instead of pausing. Your application runs at full speed; Detrix captures the values.
AI Agent Detrix Daemon Debugger (DAP) Your App (Claude Code, Cursor, (local or Docker/cloud) debugpy / dlv / (Python/Go/Rust, Windsurf, local) lldb-dap local/cloud) │ │ │ │ │── "observe line 127" ──▶│ │ │ │ │── set logpoint ─────────▶│ │ │ │ │── captures value ───▶│ │ │◀────────────── captured values ─────────────────│ │◀── structured events ───│ │ │ │ │ │ │ │ App never pauses. No code changes. No restarts. │
The daemon runs locally or alongside your service in Docker — same protocol either way. In cloud mode, source files are fetched automatically so the agent can find the right lines without them on your machine. See theInstallation Guidefor cloud setup.
import detrix detrix.init(name="my-app") # That's it. Agent controls the rest.
Production pattern:Build one service instance with debug symbols and a Detrix client. Route suspect traffic to it via Kafka, a sidecar, or your load balancer. The rest of your fleet runs unaffected — full-speed, no instrumentation overhead. You get deep observability on one instance without touching production.
See theClients Manualfor full documentation.
Detrix uses debugger logpoints to observe variables. For expressions to evaluate successfully, the binary needsdebug symbols(DWARF info). The good news: you don't need a debug build. Each language has a production-friendly strategy that preserves most variable visibility with minimal performance impact.
Go's defaultgo buildalready produces anoptimized binary with DWARF debug symbols. Delve attaches to it and evaluates logpoint expressions on most variables — especially heap-allocated struct fields. No special flags needed.
# This is already debuggable. Nothing to change. go build -o myservice ./cmd/myservice
If the optimizer hides a specific local variable (<optimized out>), useper-package debug flagsto disable optimizations only where you need visibility:
# Disable optimizations in the payments package only. # net/http, encoding/json, and all other packages stay fully optimized. go build -gcflags="myservice/internal/payments=-N -l" -o myservice ./cmd/myservice
Stripping symbols(-ldflags="-s -w") removes DWARF info and makes debugging impossible. If you strip for production, keep one instance with symbols for Detrix.
Rust debug builds (cargo build) are 10-100x slower than release — unusable in production. Instead, use acustom Cargo profilethat compiles your dependencies at full optimization (O3) and your code at a lower level (O1) that preserves most variable visibility:
# Cargo.toml — add a "detrix" profile for observable production builds [profile.detrix] inherits = "release" opt-level = 1 # Your code: light optimization, most variables visible debug = 2 # Full DWARF debug info codegen-units = 16 # Default parallelism [profile.detrix.package."*"] opt-level = 3 # All dependencies: full optimization debug = false # No debug info needed for deps (smaller binary)
Generics caveat:Generic code from dependencies (serde, tokio, axum) is monomorphized in your crate and compiles atyouropt-level (O1), not the dependency's (O3). For most services this is negligible since I/O dominates, but serialization-heavy hot paths may see a larger impact.
For functions you want to keep fully visible regardless of optimization:
#[inline(never)] // Prevents inlining — always visible as a separate stack frame fn process_order(order: &Order) -> Result<ProcessedOrder> { // Detrix can always set logpoints here }
No special build configuration needed. CPython is always debuggable — debugpy attaches to the running interpreter as-is.
import detrix detrix.init(name="my-app") # Works on any Python 3.10+ installation
See theClients Manualfor full documentation.
No code changes.The agent instruments your running code via observation points — nothing gets committed, nothing ships to prod.
No pausing.Observation points evaluate expressions at full execution speed, with no breakpoint-style halting. For high-frequency code paths, use sample or throttle modes to control event volume.
No forgotten cleanup.Metrics expire automatically via TTL, or remove everything with one command.
cargo fmt --all && cargo clippy --all -- -D warnings && cargo test --all
- Fork the repository
- Create a feature branch
- Run the checks above
- Submit a Pull Request
Found a bug?Open an issue. Found in minutes what took you days?Tell us in Discussions.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
AI-powered live runtime debugging with Lightrun production context.
Run, debug, and triage tests via natural language across HyperExecute, Automation, SmartUI, and Accessibility on the TestMu AI cloud.
Understand, develop, and debug authorization policies in Oso Cloud.
A comprehensive proxy that combines multiple MCP servers into a single MCP. It provides discovery and management of tools, prompts, resources, and templates across servers, plus a playground for debugging when building MCP servers.
Proxyman MCP allows AI to inspect HTTP traffic, create debugging rules, and control Proxyman - all through natural language conversations.
Debug your remote Node.js and Next.js applications directly from your AI IDE like Cursor.
Live browser debugging for AI assistants — DOM, console, network via MCP.
Drives an Android emulator or a real device over adb: screenshots, UI hierarchy with true device-pixel coordinates, tap and type, app lifecycle, logcat, and Gradle builds and tests.
Interact with Android devices using the Android Debug Bridge (ADB).
Policy-gated MCP tools that let coding agents build, flash, stimulate and observe real embedded hardware (OpenOCD, pyOCD, STM32CubeProgrammer, serial, CAN).
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





