magna-nz/aspnetcore-debugger-mcp

πŸ’» Developer Tools
0 Views
0 Installs

️⃣ 🏠 🍎πŸͺŸπŸ§ - MCP server for interactive .NET / ASP.NET Core debugging via netcoredbg. 27 tools: breakpoints (line, function, exception, data), stepping, thread inspection, exception autopsy, hang/deadlock analysis, and request tracing.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "magna-nz-aspnetcore-debugger-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "magna-nz-aspnetcore-debugger-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

ASP.NET Core Debugging MCP Server

The cross-platform .NET debugging MCP β€” runs on Linux, macOS, and Windows.

CI NuGet Downloads .NET MCP Platforms License: MIT Glama Quality

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

Why is my EF Core query returning empty?

You

GET /users/active returns [], but I know there are active users in the DB. What's the query actually doing?

Claude

I'll pause inside UserRepository.GetActiveAsync and read what EF Core actually sent.

SELECT u.*
FROM Users AS u
WHERE u.IsActive = 1 AND u.TenantId = @__tenantId_0

@__tenantId_0 = 0

The SQL is correct; the parameter is wrong. TenantId = 0, but your tenants start at 1. ICurrentUser.TenantId is being read in the repository constructor β€” before the request scope resolves it. Fix: read the tenant inside the query (or apply it via HasQueryFilter with IHttpContextAccessor) instead of capturing it at construction.

Why is my JWT auth returning 401?

You

/admin/users is 401-ing for Anna, but her token looks valid to me. What does the auth handler actually see?

Claude

I'll break inside JwtBearerHandler.HandleAuthenticateAsync after 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 discount at 100 fixes the bug. Test that hypothesis without me touching the code.

Claude

I'll pause inside ApplyDiscount on the next checkout and mutate discount in place.

Paused at PricingService.cs:47
  discount = 250        ← bug: two promos stacked

Set discount = 100, resumed.

Result:
  subtotal = $400
  final    = $300
  refund-service complaints: 0

Capping at 100 unblocks the flow downstream. Hypothesis confirmed β€” time to make the edit for real and decide where the cap belongs (ApplyDiscount itself, or upstream in PromoEngine).

My app is hung β€” what's actually blocking?

You

/reports hangs 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 another SqlConnection from 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: await all the way down in ReportService, or don't hold a connection across the awaited call.

Where is a slow request actually spending its time?

You

GET /order/42 takes 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 caching EnrichmentService.Enrich or moving it off the request path.

More examples β†’

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 β†’

Platforms

Bundled netcoredbg binary is selected at runtime β€” no per-platform install dance.

OSArchitecturesStatus
Linuxx64, arm64βœ… Supported (Samsung prebuilt)
macOSIntel (x64), Apple Silicon (arm64)βœ… Supported (arm64 built by us, since Samsung doesn't ship one)
Windowsx64βœ… 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)

CategoryToolsWhat it's for
Sessiondebug_launch, debug_attach, debug_disconnect, debug_stateStart, attach to, or stop a debug session
Executiondebug_continue, debug_pause, debug_step, breakpoint_waitDrive the debuggee and wait for it to stop
Breakpointsbreakpoint_set, breakpoint_set_function, breakpoint_set_exception, breakpoint_set_data, breakpoint_remove, breakpoint_listLine, function, exception, and data breakpoints
Inspectionthreads_list, stacktrace_get, variables_get, variables_set, evaluate, stack_exploreExamine and mutate program state
Exception Autopsyexception_autopsyOne call: exception chain + top frames + locals + source snippet
Hang / Deadlockhang_analyzeAuto-pause, classify each thread's blocking pattern (Monitor / Task / Semaphore / async / …)
Request Tracingtrace_start, trace_get, trace_stopServer-side request tracing β€” auto-instrument a call chain and capture arguments at every entry
Process I/Oprocess_read_outputDrain the debuggee's stdout/stderr
Healthdebugger_healthQuick check that netcoredbg loaded and the bundled binary is reachable

Full tool reference with parameters β†’

How this compares

ProjectLicensePlatformsApproach.NET
aspnetcore-debugger-mcp (this)MITLinux + macOS + Windowsnetcoredbg via DAP, ASP.NET-focused composites (request tracing, hang analysis)Native, .NET 10
debug-mcpAGPL-3.0Linux only (Win/macOS planned)ICorDebug direct, Roslyn code navNative, .NET 10
mcp-debuggerβ€”Cross-platformDAPVia external debugger
dap-mcpβ€”Cross-platformDAPVia external debugger
LLDB MCPNCSACross-platformNative LLDBNo

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

License

MIT β€” see LICENSE. Built on netcoredbg (MIT) and the ModelContextProtocol SDK (MIT).

Related MCP Servers

Moxie-Docs-MCPβ˜… Featured

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

πŸ’» Developer Tools2 views
3KniGHtcZ/codebeamer-mcp

πŸ“‡ ☁️ 🍎 πŸͺŸ 🐧 - Codebeamer ALM integration for managing work items, trackers, and projects. Provides 17 tools for reading and writing items, associations, references, comments, and risk management data via Codebeamer REST API v3.

πŸ’» Developer Tools1 views
21st-dev/Magic-MCP

Create crafted UI components inspired by the best 21st.dev design engineers.

πŸ’» Developer Tools0 views
a-25/ios-mcp-code-quality-server

πŸ“‡ 🏠 🍎 - iOS code quality analysis and test automation server. Provides comprehensive Xcode test execution, SwiftLint integration, and detailed failure analysis. Operates in both CLI and MCP server modes for direct developer usage and AI assistant integration.

πŸ’» Developer Tools0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it β†’
β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.