debug-mcp
MCP server exposing .NET debugging as 34 AI-accessible tools via ICorDebug APIs — breakpoints, stepping, inspection, exception autopsy, and code analysis.
debug-mcp.net
MCP server for .NET debugging — enable AI agents to debug .NET applications interactively.
What is debug-mcp?
debug-mcp is a Model Context Protocol server that exposes .NET debugging capabilities as structured API tools. It allows AI assistants like Claude, GPT, or Copilot to:
- Launch or attach to .NET processes
- Set breakpoints, exception breakpoints, and tracepoints
- Step through code line by line
- Inspect variables, evaluate expressions, and read memory
- Analyze stack traces and threads
- Get full exception context with one call (exception autopsy)
- Navigate code with go-to-definition, find usages, and diagnostics
- Automatically resolve symbols from public symbol servers
Unlike similar tools that use external debuggers via DAP protocol, debug-mcp interfaces directly with the .NET runtime using ICorDebug APIs — the same approach used by JetBrains Rider.
Quick Start
Run
# No installation needed (.NET 10+)
dnx -y debug-mcp
Requirements
- .NET 10 SDK or later
- Linux (Windows and macOS support planned)
Configure with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"dotnet-debugger": {
"command": "dnx",
"args": ["-y", "debug-mcp"]
}
}
}
Configure with Claude Code
Add to your .mcp.json:
{
"mcpServers": {
"dotnet-debugger": {
"command": "dnx",
"args": ["-y", "debug-mcp"]
}
}
}
Example Conversation
You: Debug my ASP.NET app and find why GetUser returns null
Claude: I'll launch your application and investigate.
[Calls debug_launch with program path]
[Calls breakpoint_set at UserService.cs:42]
[Calls debug_continue]
[Calls breakpoint_wait with 30s timeout]
The breakpoint was hit. Let me check the variables.
[Calls variables_get for current frame]
I found the issue: the `userId` parameter is an empty string.
The bug is in the calling code at line 28 where...
You: My app throws NullReferenceException somewhere in checkout. Find it.
Claude: I'll set an exception breakpoint and trigger the flow.
[Calls debug_launch with program path]
[Calls breakpoint_set_exception for System.NullReferenceException]
[Calls debug_continue]
[Calls breakpoint_wait with include_autopsy: true]
Caught it! The exception was thrown in OrderService.cs at line 87.
Here's the full context from the autopsy:
- cart.Items was null because LoadCart() returned an empty cart
- The null check at line 85 only checked cart, not cart.Items
Tools (34)
| Category | Tools | Description |
|---|---|---|
| Session | debug_launch, debug_attach, debug_disconnect, debug_state | Start, stop, and monitor debug sessions |
| Execution | debug_continue, debug_pause, debug_step | Control program flow |
| Breakpoints | breakpoint_set, breakpoint_remove, breakpoint_list, breakpoint_enable, breakpoint_wait | Set and manage source breakpoints |
| Exception Breakpoints | breakpoint_set_exception | Break on specific exception types (first/second chance) |
| Tracepoints | tracepoint_set | Non-blocking breakpoints that log messages without pausing |
| Exception Autopsy | exception_get_context | Full exception analysis: type, message, inner exceptions, stack frames with source, and local variables |
| Inspection | threads_list, stacktrace_get, variables_get, evaluate | Examine program state |
| Memory | object_inspect, memory_read, layout_get, references_get, members_get | Deep object and memory analysis |
| Modules | modules_list, modules_search, types_get | Explore loaded assemblies and types |
| Code Analysis | code_load, code_goto_definition, code_find_usages, code_find_assignments, code_get_diagnostics | Roslyn-powered code navigation and diagnostics |
| Process I/O | process_write_input, process_read_output | Interact with debuggee stdin/stdout |
Resources (4)
| URI | Description |
|---|---|
debugger://session | Current debug session state |
debugger://breakpoints | All active breakpoints |
debugger://threads | Thread list with states |
debugger://source/{file} | Source file contents |
Documentation
- Architecture — System design and components
- How Debugging Works — ICorDebug internals explained
- MCP Tools Reference — Complete API documentation
- MCP Resources — Subscribable state views
- Development Guide — Building, testing, contributing
Similar Projects
| Project | Language | Approach | .NET Support |
|---|---|---|---|
| mcp-debugger | TypeScript | DAP | Via external debugger |
| dap-mcp | Python | DAP | Via external debugger |
| LLDB MCP | C++ | Native | No |
| debug-mcp | C# | ICorDebug | Native, direct |
License
AGPL-3.0 — see LICENSE for details.
संबंधित सर्वर
Scout Monitoring MCP
प्रायोजकPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
प्रायोजकAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Advanced Unity MCP Integration
An MCP server for Unity, enabling AI assistants to interact with projects in real-time, access scene data, and execute code.
Webhook Tester MCP Server
Interact with webhook-test.com to automate and manage webhook tokens, inspect incoming requests, and perform analytics.
Clangaroo
Provides fast C++ code intelligence for LLMs using the clangd language server.
Context Portal MCP (ConPort)
A server for managing structured project context using SQLite, with support for vector embeddings for semantic search and Retrieval Augmented Generation (RAG).
MCP Read Images
Analyze images using OpenRouter's vision models. Requires an OpenRouter API key.
ABP.IO MCP Server
An MCP server for ABP.IO that enables AI models to interact with your ABP applications and framework.
Remote MCP Server on Cloudflare
A template for deploying a remote MCP server on Cloudflare Workers, allowing for custom tool integration.
Compute MCP
An MCP server for evaluating arithmetic expressions using a Pratt parser in Rust.
Debugger MCP Server
A development tool for real-time debugging, code quality monitoring, and AI insights for React/Next.js applications.
Context 7
Up-to-date Docs For Any Cursor Prompt