The Node.js Debugger MCP Server provides comprehensive tools for managing and debugging Node.js applications, particularly for AI agents:
Process Management: Start Node.js scripts with debugging enabled, list active processes, and terminate them by PID
Debugger Attachment: Connect to running Node.js processes via debug ports
Execution Control: Set breakpoints (using
file://
URLs for reliability), pause execution, and control program flow (step into/out/over functions)Runtime Inspection: Evaluate JavaScript expressions within the current debugging context
Provides debugging capabilities for Node.js applications, including process management, breakpoint setting, code stepping, expression evaluation, and connection to Node.js Inspector API
Node.js Debugger MCP Server
An MCP server that provides Node.js debugging capabilities with process management for AI agents.
Features
Process Management: Start/stop Node.js processes with debugging enabled
Debugging Tools: Set breakpoints, step through code, evaluate expressions
Inspector Integration: Connect to Node.js Inspector API
AI Agent Friendly: Designed for long-running debugging sessions
Installation
Build the server:
npm install npm run buildFor Project-Specific Use: The
.mcp.json
file is already configured in this projectFor User-Wide Use: Add to your global Claude Code configuration:
claude mcp add --scope user debugger-mcp node /absolute/path/to/debugger-mcp/build/index.jsFor Global Use: Copy the
.mcp.json
to your projects or add to global config
Usage with Claude Code
Once configured, you'll have access to these tools in Claude Code:
Process Management
start_node_process
- Launch Node.js scripts with debuggingkill_process
- Terminate processes by PIDlist_processes
- Show all managed processes
Debugging
attach_debugger
- Connect to debug portset_breakpoint
- Set breakpoints with optional conditionsImportant: Use full
file://
URLs for reliable breakpoint hitsExample:
file:///Users/you/project/script.js
step_debug
- Step through code (next/step/continue/out)pause_execution
- Manually pause a running processevaluate_expression
- Evaluate expressions in debug context
Resources
debug://session
- Current debug session statedebug://processes
- List of managed processes
Example Usage
Start a Node.js process:
Use the start_node_process tool with script: "example-app.js"Attach debugger:
Use attach_debugger tool with the port returned from step 1Set breakpoints and debug:
# Set a breakpoint using full file URL Use set_breakpoint tool with: - file: "file:///absolute/path/to/example-app.js" - line: 5 # Control execution Use step_debug tool with action: "continue"
Key Features
Automatic Pause on Start: Uses
--inspect-brk
flag to pause at first lineFull Chrome DevTools Protocol: Real debugging, not simulation
Reliable Breakpoints: Use
file://
URLs for consistent breakpoint hitsProcess Management: Track and manage multiple debugging sessions
Testing
Test with the included example app:
Then use the MCP tools to debug it!
Debug the MCP Server
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
Provides Node.js debugging capabilities with process management for AI agents, allowing them to start/stop Node.js processes, set breakpoints, step through code, and evaluate expressions.
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityAllows Claude to directly debug a NodeJS server by setting breakpoints, inspecting variables and stepping through code.Last updated -1344281
- AsecurityFlicenseAqualityProvides GDB debugging functionality for use with Claude or other AI assistants, allowing users to manage debugging sessions, set breakpoints, examine variables, and execute GDB commands through natural language.Last updated -161354
- AsecurityAlicenseAqualityUnleashes LLM-powered agents to autonomously execute and debug web apps directly in your code editor, with features like webapp navigation, network traffic capture, and console error collection.Last updated -21,189Apache 2.0
- -securityAlicense-qualityA bridge that enables AI assistants to connect to VS Code's debugger, allowing them to interact with and control debugging sessions through websocket connections.Last updated -9MIT License