Skip to main content
Glama
magna-nz

ASPNET Core Debugging MCP Server

ASP.NET Core Debugging MCP Server

CI NuGet .NET MCP License: MIT

An MIT-licensed Model Context Protocol server that lets an AI agent (Claude, etc.) debug your .NET / ASP.NET Core app.

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.

26 tools across launching, breakpoints, stepping, inspection, expression evaluation, exception autopsy, hang analysis, and server-side request tracing that captures the full call chain with variables — without you setting any breakpoint manually.

See it in action

Why is my endpoint returning null?

You

GET /users/42 is returning null. Can you figure out why?

Claude

I'll run your app and stop inside the handler when the request hits.

I followed the call from the controller into the user service and then into the repository. Here's the query the repo is issuing against the DB:

SELECT * FROM users WHERE id = '42'

That's the bug — the id is being dropped into the SQL as text instead of as a value, but the id column is an int. Postgres returns zero rows for that comparison. Fix is to use a parameter for the id and pass it as an int.

Why did my app throw?

You

My /checkout endpoint throws a NullReferenceException somewhere. Find it.

Claude

I'll catch any unhandled exception and run through your checkout flow. Caught it.

Thrown at OrderService.cs:67

  65: if (cart == null) throw new ArgumentNullException(nameof(cart));
  66: var total = 0m;
→ 67: foreach (var item in cart.Items) total += item.Price;

At the throw:
  cart.Items = null

LoadCart(userId) on line 62 returned a Cart whose Items is null for new users — and the null check on line 65 only checks cart itself, not cart.Items. Two fix options: initialise Items = [] in the Cart constructor, or use cart.Items ?? [] on line 67.

Trace a request through the call chain

You

Hit GET /order/42 and show me which methods get called and the arguments at each one — I don't want to set breakpoints by hand.

Claude

I'll instrument your order pipeline (Controller → Service → Repository → SqlClient) and fire the request. The instrumentation auto-resumes after each capture, so your code runs at near-normal speed.

[+  679ms] → OrderController.GetOrder()       id=42, data=null
[+  711ms] --→ OrderService.LookupOrder()     id=42, raw=null, enriched=null
[+  735ms] ----→ OrderRepository.FetchById()  id=42
[+  759ms] ------→ SqlClient.ExecuteQuery()   sql="SELECT * FROM orders WHERE id = 42"
[+  783ms] ----→ EnrichmentService.Enrich()   raw="rows(sql=…)"

Every line is one real method entry with the actual arguments at that moment. The arrows show call depth. The request finished with 200 — no manual breakpoints, no pauses.

See 5 more →

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

  1. Install the tool — needs the .NET 10 SDK.

    dotnet tool install -g AspNetCoreDebuggerMcp --prerelease

    The package bundles prebuilt netcoredbg for linux-x64, linux-arm64, win-x64, osx-x64, and osx-arm64 — no separate install needed.

  2. Register with Claude — either the quick CLI command:

    claude mcp add aspnetcore-debugger -- aspnetcore-debugger-mcp

    …or edit .mcp.json (project-scoped) / ~/.claude.json (global) / claude_desktop_config.json (Claude Desktop) directly:

    {
      "mcpServers": {
        "aspnetcore-debugger": {
          "command": "aspnetcore-debugger-mcp"
        }
      }
    }
  3. Just chat with Claude. /mcp confirms 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 →

Docs

License

MIT — see LICENSE. Built on netcoredbg (MIT) and the ModelContextProtocol SDK (MIT).

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
7Releases (12mo)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/magna-nz/aspnetcore-debugger-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server