Skip to main content
Glama

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

Related MCP server: VSCode Debug MCP

Installation

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

Tool

Description

start_debug_session

Start HTTP server for log collection

stop_debug_session

Stop server and cleanup

add_instrument

Insert logging code at file:line

remove_instruments

Remove debug code from file(s)

list_instruments

Show all active instruments

read_debug_logs

Read captured log data

clear_debug_logs

Clear 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

Language

Extensions

JavaScript

.js, .mjs, .cjs

TypeScript

.ts, .tsx

Python

.py

Requirements

  • Node.js >= 18.0.0

  • An MCP-compatible AI coding assistant

License

MIT

Available Tools

7 tools
add_instrumentB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the file to instrument (relative to working directory)
lineYesLine number where to insert the instrument (1-indexed)
captureNoVariable names to capture and log

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions the instrument 'will log variable values when executed', which hints at runtime behavior, but lacks details on permissions, side effects (e.g., file modification), error handling, or execution context. For a mutation tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences with zero waste, front-loading the core action and purpose. Every word earns its place, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (mutating files for debugging) and lack of annotations or output schema, the description is incomplete. It doesn't cover behavioral aspects like how the instrument works, what 'log' means, or interaction with sibling tools, leaving significant gaps for an AI agent to infer usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters (file, line, capture). The description adds minimal value beyond the schema by implying the instrument logs variable values, which relates to the 'capture' parameter, but doesn't provide additional syntax or format details. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Add a debug instrument'), resource ('at a specific line in a file'), and purpose ('will log variable values when executed'). It distinguishes from siblings like 'list_instruments' or 'remove_instruments' by focusing on creation rather than querying or deletion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'start_debug_session' or 'remove_instruments'. The description implies usage for debugging but doesn't specify prerequisites, exclusions, or contextual recommendations relative to sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

clear_debug_logsB

Clear all collected debug logs.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a destructive action ('Clear') but doesn't specify if logs are permanently deleted, if this requires specific permissions, or what happens after clearing (e.g., confirmation, error handling). This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words, front-loading the key action and resource. It's appropriately sized for a simple tool with no parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's destructive nature (implied by 'Clear'), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like safety, permissions, or what to expect after execution, which are crucial for a mutation tool in a debugging context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema description coverage is 100%, so there's no need for parameter details in the description. The baseline for zero parameters is 4, as the description appropriately doesn't waste space on non-existent parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Clear') and the resource ('all collected debug logs'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'read_debug_logs' or 'stop_debug_session' in terms of scope or relationship, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'read_debug_logs' or 'stop_debug_session', nor does it mention prerequisites such as needing an active debug session. It only states what the tool does, not when it's appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_instrumentsB

List all active debug instruments.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists 'active' instruments, which implies a read-only operation, but doesn't clarify what 'active' means, whether there are rate limits, or what the output format looks like. This leaves significant gaps for a tool that likely interacts with debug sessions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 0 parameters and no output schema, the description is minimally adequate but lacks depth. It doesn't explain what 'active' means in context of sibling tools like debug sessions, nor does it describe the return format, leaving the agent unsure about behavioral details. This is a basic read operation, but more context would help.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a high baseline score, though it doesn't add extra value beyond the schema's completeness.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'active debug instruments', making the purpose specific and understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'read_debug_logs' or 'start_debug_session', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'read_debug_logs' or 'add_instrument'. It lacks context about prerequisites, such as whether a debug session must be active, or exclusions for when other tools might be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_debug_logsB

Read the collected debug logs from the current session.

ParametersJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format (default: pretty)pretty

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is a read operation, implying it's non-destructive, but doesn't cover other aspects like permissions needed, rate limits, session dependency, or what the output looks like (e.g., log format, size limits). For a tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's front-loaded with the core purpose, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one optional parameter) and high schema coverage, the description is minimally adequate. However, with no annotations and no output schema, it lacks details on behavioral traits (e.g., session requirements) and return values, leaving gaps for an agent to infer usage context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the single parameter 'format' with its enum values and default. The description adds no parameter-specific information beyond what the schema provides, meeting the baseline of 3 when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Read') and the resource ('collected debug logs from the current session'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'clear_debug_logs' or 'list_instruments', which would require a more specific scope statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an active debug session), exclusions, or comparisons to sibling tools like 'clear_debug_logs' for log management or 'list_instruments' for instrument-related data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

remove_instrumentsC

Remove debug instruments from files.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileNoPath to file to remove instruments from. If not specified, removes from all instrumented files.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('remove') but doesn't clarify if this is destructive, irreversible, or requires specific permissions. It also omits details like error handling or what happens if no instruments are present, which are critical for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose with no wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation operation with no annotations and no output schema), the description is insufficient. It doesn't explain the return values, error conditions, or behavioral nuances, leaving significant gaps for an agent to understand how to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, fully documenting the single parameter. The description adds no additional meaning beyond the schema's explanation of the 'file' parameter, so it meets the baseline of 3 without compensating for any gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('remove') and target ('debug instruments from files'), which is specific and understandable. However, it doesn't explicitly distinguish this tool from its sibling 'clear_debug_logs' or 'list_instruments', which might also involve instrument management, so it misses full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'clear_debug_logs' or 'list_instruments'. It lacks context about prerequisites (e.g., whether instruments must exist first) or exclusions, leaving the agent to infer usage from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

start_debug_sessionC

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

ParametersJSON Schema
NameRequiredDescriptionDefault
portNoPort number for the debug server (default: 9876)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions starting a local HTTP server but doesn't cover critical aspects like whether this requires specific permissions, if it's a long-running process, potential side effects (e.g., port conflicts), or error handling. This leaves significant gaps for a tool that initiates a server.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with zero waste, front-loading the core action and efficiently explaining the mechanism. Every word contributes directly to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of starting a debug server with no annotations and no output schema, the description is incomplete. It lacks details on what happens after starting (e.g., server lifecycle, how logs are received, success/failure indicators), which is crucial for an agent to use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'port' parameter well-documented including its default value. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Start a debug session') and the mechanism ('starts a local HTTP server to receive logs from instrumented code'), which distinguishes it from siblings like 'stop_debug_session' or 'read_debug_logs'. However, it doesn't explicitly differentiate from all siblings (e.g., 'add_instrument' also involves debug setup).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'stop_debug_session' or prerequisites such as needing instrumented code first. The description implies usage for receiving logs but lacks explicit context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stop_debug_sessionA

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool stops a session and shuts down a server, implying a destructive action, but does not disclose behavioral traits like whether this is reversible, what permissions are required, or potential side effects (e.g., losing logs). This leaves significant gaps for a tool that likely alters system state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('Stop') and resource. There is no wasted text, and it directly communicates the tool's purpose without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (likely a destructive operation with no annotations or output schema), the description is minimally adequate but incomplete. It states what the tool does but lacks details on outcomes (e.g., what happens after stopping), error conditions, or dependencies, which are important for safe invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately does not discuss parameters, earning a baseline score of 4 for not adding unnecessary information beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Stop') and target resource ('the current debug session and shut down the log server'), distinguishing it from sibling tools like 'start_debug_session' (which initiates rather than terminates) and 'clear_debug_logs' (which clears data rather than stopping the session).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by referencing 'the current debug session', suggesting it should be used when a debug session is active. However, it does not explicitly state when not to use it (e.g., if no session exists) or name alternatives like 'clear_debug_logs' for different cleanup needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: adding, listing, and removing instruments; starting and stopping debug sessions; and reading and clearing logs. The descriptions make it easy to differentiate between them, such as distinguishing 'add_instrument' from 'remove_instruments' and 'read_debug_logs' from 'clear_debug_logs'.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case, such as 'add_instrument', 'clear_debug_logs', and 'start_debug_session'. There are no deviations in naming conventions, making the set predictable and easy to understand.

Tool Count5/5

With 7 tools, the count is well-scoped for a debugger server, covering core operations like instrument management, session control, and log handling. Each tool earns its place without feeling excessive or insufficient for the domain.

Completeness5/5

The tool set provides complete coverage for a debugger's lifecycle: it includes CRUD operations for instruments (add, list, remove), session management (start, stop), and log handling (read, clear). There are no obvious gaps, as all essential workflows are supported without dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/iarmankhan/agentic-debugger'

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