agentic-debugger

agentic-debugger

iarmankhan

Enables AI coding assistants to debug code by inserting temporary logging instruments that capture variable values at runtime. Works with JavaScript, TypeScript, and Python across multiple AI coding tools.

An MCP (Model Context Protocol) server that enables interactive debugging with code instrumentation for AI coding assistants. Inspired by Cursor's debug mode.

1147 views1Local (stdio)

What it does

  • Insert debug logging at specific code lines
  • Capture variable values during code execution
  • Start HTTP server for collecting debug logs
  • Remove debug instruments cleanly from code
  • Read and analyze captured runtime data
  • Support JavaScript, TypeScript, and Python debugging

Best for

AI coding assistants debugging runtime issuesDevelopers using Claude, Cursor, or similar toolsTroubleshooting variable state in running codeInteractive debugging without traditional debugger setup
Works with 7+ AI coding toolsLive code instrumentationBrowser debugging support with CORS

About agentic-debugger

agentic-debugger is a community-built MCP server published by iarmankhan that provides AI assistants with tools and capabilities via the Model Context Protocol. Agentic Debugger: MCP server for interactive debugging with code instrumentation, empowering AI coding assistants to ins It is categorized under developer tools. This server exposes 7 tools that AI clients can invoke during conversations and coding sessions.

How to install

You can install agentic-debugger in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

agentic-debugger is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Tools (7)

start_debug_session

Start a debug session. This starts a local HTTP server to receive logs from instrumented code.

stop_debug_session

Stop the current debug session and shut down the log server.

add_instrument

Add a debug instrument at a specific line in a file. The instrument will log variable values when executed.

remove_instruments

Remove debug instruments from files.

list_instruments

List all active debug instruments.

agentic-debugger

An MCP (Model Context Protocol) server that enables interactive debugging with code instrumentation for AI coding assistants. Inspired by Cursor's debug mode.

Works with any MCP-compatible AI coding tool:

  • Claude Code
  • Cursor
  • Windsurf
  • Cline
  • GitHub Copilot
  • Kiro
  • Zed
  • And more...

Features

  • Live code instrumentation - Inject debug logging at specific lines
  • Variable capture - Log variable values at runtime
  • Multi-language support - JavaScript, TypeScript, and Python
  • Browser support - CORS-enabled for browser JS debugging
  • Clean removal - Region markers ensure instruments are fully removed

Installation

Using npx (recommended)

Add to your MCP configuration:

{
  "mcpServers": {
    "debug": {
      "command": "npx",
      "args": ["-y", "agentic-debugger"]
    }
  }
}

Configuration file locations:

  • Claude Code: ~/.mcp.json
  • Cursor: .cursor/mcp.json in your project or ~/.cursor/mcp.json
  • Other tools: Check your tool's MCP documentation

Global install

npm install -g agentic-debugger

Then configure:

{
  "mcpServers": {
    "debug": {
      "command": "agentic-debugger"
    }
  }
}

Available Tools

ToolDescription
start_debug_sessionStart HTTP server for log collection
stop_debug_sessionStop server and cleanup
add_instrumentInsert logging code at file:line
remove_instrumentsRemove debug code from file(s)
list_instrumentsShow all active instruments
read_debug_logsRead captured log data
clear_debug_logsClear the log file

How It Works

  1. Start session - Spawns a local HTTP server (default port 9876)
  2. Add instruments - Injects fetch() calls that POST to the server
  3. Reproduce bug - Run your code, instruments capture variable values
  4. Analyze logs - Read the captured data to identify issues
  5. Cleanup - Remove all instruments and stop the server

Debug Workflow Example

You: "Help me debug why the total is NaN"

AI Assistant:
1. Starts debug session
2. Reads your code to understand the logic
3. Adds instruments at suspicious locations
4. "Please run your code to reproduce the issue"

You: *runs code* "Done"

AI Assistant:
5. Reads debug logs
6. "I see `discount` is undefined at line 15..."
7. Removes instruments
8. Fixes the bug
9. Stops debug session

Instrument Examples

JavaScript/TypeScript

// #region agentic-debug-abc123
fetch('http://localhost:9876/log', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    id: 'abc123',
    location: 'cart.js:15',
    timestamp: Date.now(),
    data: { total, discount, items }
  })
}).catch(() => {});
// #endregion agentic-debug-abc123

Python

# region agentic-debug-abc123
try:
    import urllib.request as __req, json as __json
    __req.urlopen(__req.Request(
        'http://localhost:9876/log',
        data=__json.dumps({
            'id': 'abc123',
            'location': 'cart.py:15',
            'timestamp': __import__('time').time(),
            'data': {'total': total, 'discount': discount}
        }).encode(),
        headers={'Content-Type': 'application/json'}
    ))
except: pass
# endregion agentic-debug-abc123

Supported Languages

LanguageExtensions
JavaScript.js, .mjs, .cjs
TypeScript.ts, .tsx
Python.py

Requirements

  • Node.js >= 18.0.0
  • An MCP-compatible AI coding assistant

License

MIT

Alternatives

Related Skills

Browse all skills
ui-design-system

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

18
ai-sdk

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".

6
api-documenter

Master API documentation with OpenAPI 3.1, AI-powered tools, and modern developer experience practices. Create interactive docs, generate SDKs, and build comprehensive developer portals. Use PROACTIVELY for API documentation or developer portal creation.

4
openai-knowledge

Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.

4
cli-builder

Guide for building TypeScript CLIs with Bun. Use when creating command-line tools, adding subcommands to existing CLIs, or building developer tooling. Covers argument parsing, subcommand patterns, output formatting, and distribution.

3
ydc-ai-sdk-integration

Integrate Vercel AI SDK applications with You.com tools (web search, AI agent, content extraction). Use when developer mentions AI SDK, Vercel AI SDK, generateText, streamText, or You.com integration with AI SDK.

2