Asynkron.McpDebugger.Client 0.1.0

dotnet add package Asynkron.McpDebugger.Client --version 0.1.0
                    
NuGet\Install-Package Asynkron.McpDebugger.Client -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Asynkron.McpDebugger.Client" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Asynkron.McpDebugger.Client" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Asynkron.McpDebugger.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Asynkron.McpDebugger.Client --version 0.1.0
                    
#r "nuget: Asynkron.McpDebugger.Client, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Asynkron.McpDebugger.Client@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Asynkron.McpDebugger.Client&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Asynkron.McpDebugger.Client&version=0.1.0
                    
Install as a Cake Tool

Asynkron.McpDebugger

AI-controlled cooperative debugger via MCP (Model Context Protocol).

Add breakpoints to your C# code that pause execution until an AI (like Claude) resumes them. The AI can inspect the call stack, view source code context, and control program flow.

How It Works

┌─────────────────┐     MCP (stdio)      ┌─────────────────────────┐
│   AI (Claude)   │ ◄──────────────────► │   mcpdebugger mcp       │
└─────────────────┘                       └───────────┬─────────────┘
                                                      │ HTTP
                                          ┌───────────▼─────────────┐
                                          │   mcpdebugger serve     │
                                          └───────────┬─────────────┘
                                                      │ HTTP
                                          ┌───────────▼─────────────┐
                                          │   Your Application      │
                                          │   with DebugBreak calls │
                                          └─────────────────────────┘

Installation

Install the CLI tool (global)

dotnet tool install -g Asynkron.McpDebugger

Add the client library to your project

dotnet add package Asynkron.McpDebugger.Client

Quick Start

1. Add breakpoints to your code

using Asynkron.McpDebugger.Client;

public class MyService
{
    public async Task ProcessOrderAsync(Order order)
    {
        // Async breakpoint - doesn't block threadpool threads
        await DebugBreak.HereAsync();

        // Your code continues after AI resumes...
        await ValidateOrder(order);

        // Another breakpoint
        await DebugBreak.HereAsync();

        await ChargeCustomer(order);
    }
}

2. Start the debug server

mcpdebugger serve

3. Configure Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "debugger": {
      "command": "mcpdebugger",
      "args": ["mcp"]
    }
  }
}

4. Run your application

Your app will pause at each DebugBreak call until the AI resumes it.

API

Client Library

// Async breakpoint (recommended) - doesn't steal threadpool threads
await DebugBreak.HereAsync();

// Sync breakpoint - blocks the current thread
DebugBreak.Here();

// Configure server URL (default: http://localhost:5200)
DebugBreak.Configure("http://localhost:5200");

// Disable/enable breakpoints
DebugBreak.Disable();
DebugBreak.Enable();

MCP Tools (available to AI)

Tool Description
get_breakpoints List all active breakpoints
get_context Get call stack and source code for a breakpoint
resume Resume a specific breakpoint
resume_all Resume all active breakpoints

HTTP API (for direct access)

# List active breakpoints
curl http://localhost:5200/status

# Resume a specific breakpoint
curl -X POST http://localhost:5200/resume/{breakpoint-id}

# Resume all breakpoints
curl -X POST http://localhost:5200/resume-all

CLI Commands

mcpdebugger serve [--port 5200]   # Start the HTTP debug server
mcpdebugger mcp [--port 5200]     # Start the MCP server (for AI integration)
mcpdebugger --help                # Show help

How the Breakpoints Work

The async breakpoint (HereAsync) uses TaskCompletionSource internally:

  • Your code awaits an HTTP POST to the debug server
  • The server holds the request until the AI calls resume
  • No threadpool threads are blocked

The sync breakpoint (Here) simply blocks on the HTTP call:

  • The calling thread is blocked until resume
  • Use sparingly to avoid thread starvation

Building from Source

git clone https://github.com/asynkron/Asynkron.McpDebugger.git
cd Asynkron.McpDebugger
dotnet build

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 168 1/19/2026