ASP.NET Core Debugger — MCP Server for AI Agents MCP Server
io.github.magna-nz/aspnetcore-debugger-mcp
Cross-platform .NET/ASP.NET Core debugging for AI agents via netcoredbg and DAP.
What is the ASP.NET Core Debugger — MCP Server for AI Agents MCP server?
The ASP.NET Core Debugger MCP server enables AI agents like Claude to interactively debug .NET and ASP.NET Core applications on Linux, macOS, and Windows. It bridges the Model Context Protocol to netcoredbg (Samsung's MIT-licensed debugger) via the Debug Adapter Protocol, allowing agents to pause execution, inspect runtime state, mutate variables, and trace request flows to diagnose bugs grounded in actual program behavior.
This MCP server gives AI agents full interactive debugging capabilities for .NET applications. Instead of guessing at bugs, Claude can attach to your running app, set breakpoints, inspect variables, test fixes by mutating state, analyze hangs and deadlocks, and trace request execution paths. It bundles netcoredbg for all major platforms—no separate debugger install needed—and provides high-level composites like exception autopsy, hang analysis, and request tracing optimized for agent workflows.
How to install ASP.NET Core Debugger — MCP Server for AI Agents
Copy-paste configuration for popular MCP clients.
Tools & capabilities
Tools this server exposes to the agent.
debug_launch— Start a debug session on a .NET processdebug_attach— Attach to a running .NET processdebug_disconnect— Stop a debug sessiondebug_state— Query current debug session statedebug_continue— Resume execution of the debuggeedebug_pause— Pause execution of the debuggeedebug_step— Step through code (into, over, or out)breakpoint_wait— Wait for execution to hit a breakpointbreakpoint_set— Set a line breakpointbreakpoint_set_function— Set a function breakpointbreakpoint_set_exception— Set an exception breakpointbreakpoint_set_data— Set a data breakpointbreakpoint_remove— Remove a breakpointbreakpoint_list— List all active breakpointsthreads_list— List all threads in the debuggeestacktrace_get— Get the call stack for a threadvariables_get— Inspect variables and their valuesvariables_set— Mutate variable values at runtimeevaluate— Evaluate expressions in the current contextstack_explore— Composite tool to explore the call stack with context
Use cases
- Debug why an EF Core query returns empty or wrong results by pausing inside the repository and inspecting actual SQL and parameter values
- Diagnose JWT authentication failures by breaking inside the auth handler and reading token claims, signature validity, and expiration
- Test hypothetical fixes without code changes by pausing at a breakpoint and mutating variables in place to verify behavior
- Analyze application hangs and deadlocks by auto-pausing all threads and classifying what each is blocked on (connection pools, locks, async waits)
- Trace slow HTTP requests end-to-end by auto-instrumenting a call chain to see where time is actually spent (database, external APIs, business logic)
ASP.NET Core Debugger — MCP Server for AI Agents MCP server FAQ
It's an MCP server that lets AI agents like Claude interactively debug .NET and ASP.NET Core applications. It bundles netcoredbg (Samsung's MIT-licensed debugger) for Linux, macOS, and Windows, and exposes 27 debugging tools via the Debug Adapter Protocol—breakpoints, stepping, variable inspection, exception analysis, hang detection, and request tracing.
Yes. The server is MIT-licensed, and netcoredbg (which it bundles) is also MIT-licensed. No paid tiers or licensing required.
Install the .NET 10 SDK, then run `dotnet tool install -g AspNetCoreDebuggerMcp --prerelease`. Register with Claude using `claude mcp add aspnetcore-debugger -- aspnetcore-debugger-mcp` or by editing your Claude config file directly.
Yes—Linux (x64, arm64), macOS (Intel x64 and Apple Silicon arm64), and Windows (x64) are all supported. The bundled netcoredbg binary is selected at runtime, so no per-platform install dance is needed.
The .NET 10 SDK on your host machine, and the MCP server installed. The target .NET application can be any .NET version that netcoredbg supports; you attach to a running process or launch one from the debugger.
Yes. You can pause execution, use `variables_set` to change values in place, and resume to test hypotheses. This is useful for validating fixes before committing code changes.
README (reference)
Source of truth, from the repository.
ASP.NET Core Debugging MCP Server
The cross-platform .NET debugging MCP — runs on Linux, macOS, and Windows.
<!-- mcp-name: io.github.magna-nz/aspnetcore-debugger-mcp -->An MIT-licensed MCP server that lets an AI agent (Claude, etc.) debug your .NET / ASP.NET Core app — netcoredbg bundled for every platform, nothing extra to install.
Instead of "I think the bug is around line 42, try this", the agent runs your code, pauses it, reads the actual runtime values, mutates state to test a fix, and answers grounded in what it actually saw.
Contents
- See it in action — 5 conversations showing the agent at work
- How it works — architecture diagram
- Use it in 3 steps — install + register with Claude
- Platforms — supported OS / architecture matrix
- Tools (27) — full tool surface grouped by purpose
- How this compares — vs. other .NET / DAP MCPs
- Docs — install, examples, tool reference, limits
- License
See it in action
Why is my EF Core query returning empty?
You
GET /users/activereturns[], but I know there are active users in the DB. What's the query actually doing?
Claude
I'll pause inside
UserRepository.GetActiveAsyncand read what EF Core actually sent.SELECT u.* FROM Users AS u WHERE u.IsActive = 1 AND u.TenantId = @__tenantId_0 @__tenantId_0 = 0The SQL is correct; the parameter is wrong.
TenantId = 0, but your tenants start at 1.ICurrentUser.TenantIdis being read in the repository constructor — before the request scope resolves it. Fix: read the tenant inside the query (or apply it viaHasQueryFilterwithIHttpContextAccessor) instead of capturing it at construction.
Why is my JWT auth returning 401?
You
/admin/usersis 401-ing for Anna, but her token looks valid to me. What does the auth handler actually see?
Claude
I'll break inside
JwtBearerHandler.HandleAuthenticateAsyncafter her request lands.Token signature: ✓ valid Claims built: name : anna role : User iss : https://auth.staging.example aud : app-api exp : 2026-05-26T14:12:00Z (not expired)The token validates fine — but the claim is
role=User. Your endpoint is[Authorize(Roles="Admin")]. So the 401 is correct: Anna isn't actually an admin yet upstream. Either her IdP record needs updating, or this policy is wrong.
Test a fix without restarting
You
I think capping
discountat 100 fixes the bug. Test that hypothesis without me touching the code.
Claude
I'll pause inside
ApplyDiscounton the next checkout and mutatediscountin place.Paused at PricingService.cs:47 discount = 250 ← bug: two promos stacked Set discount = 100, resumed. Result: subtotal = $400 final = $300 refund-service complaints: 0Capping at 100 unblocks the flow downstream. Hypothesis confirmed — time to make the edit for real and decide where the cap belongs (
ApplyDiscountitself, or upstream inPromoEngine).
My app is hung — what's actually blocking?
You
/reportshangs forever in staging. Attach and tell me why.
Claude
Attached. Ran
hang_analyze.Thread 12 (HTTP request) → blockedOnTask at ReportService.cs:38 Task.Wait() on T#14 Thread 14 (worker) → blockedOnMonitor at SqlConnectionPool.cs:91 waiting for SqlConnection (pool max=5, in-use=5)Classic sync-over-async deadlock. Thread 12 calls
.Wait()on a task that itself needs to open anotherSqlConnectionfrom a fully-held pool. The connection it's holding can't be released until the task completes; the task can't proceed until a connection frees up. Fix:awaitall the way down inReportService, or don't hold a connection across the awaited call.
Where is a slow request actually spending its time?
You
GET /order/42takes 800ms. I don't want to set breakpoints all over — just show me where the time is going.
Claude
I'll auto-instrument your order pipeline and fire the request. Each entry logs the timestamp + arguments, then resumes — the code runs near-normal speed.
[+ 4ms] → OrderController.GetOrder() id=42 [+ 6ms] --→ OrderService.LookupOrder() id=42 [+ 9ms] ----→ OrderRepository.FetchById() id=42 [+ 14ms] ------→ SqlClient.ExecuteQuery() sql="SELECT * FROM orders WHERE id=42" [+ 287ms] ----→ EnrichmentService.Enrich() raw="rows(...)" [+ 781ms] ------→ HttpClient.PostAsync() url="https://crm.internal/enrich"Time is in the CRM enrichment HTTP call — 500ms inside
HttpClient.PostAsync. DB itself was 5ms. Worth cachingEnrichmentService.Enrichor moving it off the request path.
How it works
Claude (MCP client)
│ MCP (stdio / JSON-RPC)
▼
aspnetcore-debugger-mcp ← this server
│ DAP (Debug Adapter Protocol)
▼
netcoredbg ← Samsung's MIT-licensed .NET debugger, child process
│ ICorDebug
▼
target .NET process
A protocol bridge with agent-friendly composites on top — exception_autopsy, stack_explore,
hang_analyze, and the trace tools — that bundle multiple DAP requests into a single tool call.
Use it in 3 steps
- Install the tool — needs the .NET 10 SDK.
The package bundles prebuiltdotnet tool install -g AspNetCoreDebuggerMcp --prereleasenetcoredbgforlinux-x64,linux-arm64,win-x64,osx-x64, andosx-arm64— no separate install needed. - Register with Claude — either the quick CLI command:
…or editclaude mcp add aspnetcore-debugger -- aspnetcore-debugger-mcp.mcp.json(project-scoped) /~/.claude.json(global) /claude_desktop_config.json(Claude Desktop) directly:{ "mcpServers": { "aspnetcore-debugger": { "command": "aspnetcore-debugger-mcp" } } } - Just chat with Claude.
/mcpconfirms it's connected. From there, describe what you want — "why does this endpoint return null" — and the agent picks the right tools.
Full install + troubleshooting →
Platforms
Bundled netcoredbg binary is selected at runtime — no per-platform install dance.
| OS | Architectures | Status |
|---|---|---|
| Linux | x64, arm64 | ✅ Supported (Samsung prebuilt) |
| macOS | Intel (x64), Apple Silicon (arm64) | ✅ Supported (arm64 built by us, since Samsung doesn't ship one) |
| Windows | x64 | ✅ Supported (Samsung prebuilt) |
Requires the .NET 10 SDK on the host. The MCP server itself is a cross-platform .NET global tool — same install command everywhere.
Tools (27)
| Category | Tools | What it's for |
|---|---|---|
| Session | debug_launch, debug_attach, debug_disconnect, debug_state | Start, attach to, or stop a debug session |
| Execution | debug_continue, debug_pause, debug_step, breakpoint_wait | Drive the debuggee and wait for it to stop |
| Breakpoints | breakpoint_set, breakpoint_set_function, breakpoint_set_exception, breakpoint_set_data, breakpoint_remove, breakpoint_list | Line, function, exception, and data breakpoints |
| Inspection | threads_list, stacktrace_get, variables_get, variables_set, evaluate, stack_explore | Examine and mutate program state |
| Exception Autopsy | exception_autopsy | One call: exception chain + top frames + locals + source snippet |
| Hang / Deadlock | hang_analyze | Auto-pause, classify each thread's blocking pattern (Monitor / Task / Semaphore / async / …) |
| Request Tracing | trace_start, trace_get, trace_stop | Server-side request tracing — auto-instrument a call chain and capture arguments at every entry |
| Process I/O | process_read_output | Drain the debuggee's stdout/stderr |
| Health | debugger_health | Quick check that netcoredbg loaded and the bundled binary is reachable |
Full tool reference with parameters →
How this compares
| Project | License | Platforms | Approach | .NET |
|---|---|---|---|---|
| aspnetcore-debugger-mcp (this) | MIT | Linux + macOS + Windows | netcoredbg via DAP, ASP.NET-focused composites (request tracing, hang analysis) | Native, .NET 10 |
| debug-mcp | AGPL-3.0 | Linux only (Win/macOS planned) | ICorDebug direct, Roslyn code nav | Native, .NET 10 |
| mcp-debugger | — | Cross-platform | DAP | Via external debugger |
| dap-mcp | — | Cross-platform | DAP | Via external debugger |
| LLDB MCP | NCSA | Cross-platform | Native LLDB | No |
Different sweet spots: this project is the MIT, cross-platform option, with ASP.NET-flavoured composites on top of a DAP. debug-mcp goes deeper into runtime internals via ICorDebug but is Linux-only and AGPL today.
Docs
- Install & configure — 3 steps, both Claude Code & Desktop, troubleshooting
- What you can do with it — 7 things you can ask Claude to do for you
- Full tool reference — every parameter on every tool
- Known limits — when not to use this tool, adapter & tracing limits
- macOS Apple Silicon — building netcoredbg
- Contributing — repo layout, tests, dev loop
License
MIT — see LICENSE. Built on netcoredbg (MIT) and the ModelContextProtocol SDK (MIT).
Related MCP servers

Search your Google, Telegram, Spotify and Instagram exports locally. Fully offline.
GDB/SWD MCP server over a smolmux broker: breakpoints, memory, Cortex-M fault decode, board probing.

Serial console MCP server over a smolmux broker: shared UART, send/expect, history, boot stages.

Magpie Capital
Solana lending tools: live stats, 160+ collateral tokens, loan terms, x402 agent borrowing
Agent-native lending on Solana via x402: borrow against tokens, arm in-vault TP/SL, repay.

Project knowledge graph with history-checked belief staleness, changeset proposals, cost reporting