mcp-debugger-node
This server enables AI agents to debug Node.js programs through the V8 Inspector Protocol, providing full debugger-style control over a Node.js process.
reset— Launch a Node.js process with--inspect-brk, specifying the working directory, command, arguments, and optional environment variables.stop— Terminate the current debug target and clear the session.set_breakpoint— Add a breakpoint at a specific 0-based line number in a script matched by a URL regex.set_pause_on_exceptions— Configure whether the debugger pauses onnone,uncaught, orallexceptions (defaults to uncaught).continue— Resume the debugged process and return immediately (useful when an external trigger is needed to hit a breakpoint).wait_for_pause— Block until the debugged process pauses and return the current location.resume— Resume execution and automatically wait for the next pause.stepover— Step over the current statement and wait for the next pause.stepinto— Step into the next function call and wait for the next pause.getvariables— Retrieve all variables in scope for the currently paused call frame.evaluate— Execute arbitrary JavaScript expressions in the context of the currently paused call frame and return the result.
Provides debugging capabilities for Node.js programs, including setting breakpoints, stepping, evaluating expressions, and inspecting variables via the V8 Inspector Protocol.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-debugger-node debug my Node app, set breakpoint at line 12, then step over"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-debugger-node
MCP server for debugging Node.js programs through the V8 Inspector Protocol.
This server gives an AI agent debugger-style tools: start a Node process under
--inspect-brk, set breakpoints, continue execution, wait for pauses, step,
inspect variables, and evaluate expressions in the current call frame.
This server starts whatever command is provided in thereset target config.
Only use it in trusted local development environments. A target config can run
arbitrary commands with your user permissions.
Run
This package is meant to be started by an MCP client over stdio:
npx -y mcp-debugger-node@betaYou usually do not run that command by hand. Instead, add it to your agent or editor MCP configuration.
The project is still in beta, so @beta is recommended until the first stable
1.0.0 release.
Codex
Add this to ~/.codex/config.toml:
[mcp_servers.node-debugger]
command = "npx"
args = ["-y", "mcp-debugger-node@beta"]Claude Code
Use the Claude Code MCP CLI:
claude mcp add node-debugger -- npx -y mcp-debugger-node@betaFor a project-local config, run that command from the project you want to configure.
GitHub Copilot in VS Code
Create or update .vscode/mcp.json:
{
"servers": {
"node-debugger": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-debugger-node@beta"]
}
}
}Other MCP Clients
Use a stdio server entry with:
{
"command": "npx",
"args": ["-y", "mcp-debugger-node@beta"]
}Related MCP server: MCP Chrome Debugger Protocol
Quick Start
Start a debug session by calling reset with an explicit target:
{
"target": {
"cwd": "/path/to/project",
"command": "node",
"args": ["--inspect-brk=0", "server.js"]
}
}For a CommonJS TypeScript project using ts-node:
{
"target": {
"cwd": "/path/to/project",
"command": "node",
"args": ["--inspect-brk=0", "-r", "ts-node/register", "src/index.ts"]
}
}For an ESM TypeScript project:
{
"target": {
"cwd": "/path/to/project",
"command": "node",
"args": ["--inspect-brk=0", "--loader", "ts-node/esm", "src/index.ts"]
}
}The target must include --inspect-brk=0. The server reads the inspector URL
from the target process stderr and connects to it.
Common Workflow
For simple scripts:
Call
resetwith a target.Call
set_breakpoint.Call
resume.Call
get_variablesorevaluate.Use
step_overorstep_intoas needed.
For event-driven servers:
Call
resetwith a target.Call
set_breakpointin the endpoint or handler.Call
continue.Trigger the event with curl, a browser, a test runner, or another tool.
Call
wait_for_pause.Inspect runtime state with
get_variablesandevaluate.Call
continueagain to let the request finish.
Example endpoint debugging flow:
{
"urlRegex": "server\\.js$",
"lineNumber": 42
}Then:
continue
curl http://localhost:3000/api/users
wait_for_pause
evaluate {"expression":"req.url"}
get_variables
continueTools
reset
Restart the debug session with a fresh Node inspector process.
Input:
{
"target": {
"cwd": "/path/to/project",
"command": "node",
"args": ["--inspect-brk=0", "server.js"],
"env": {
"NODE_ENV": "development"
}
}
}env is optional and is merged with the MCP server environment.
set_breakpoint
Set a breakpoint by matching a script URL with a regex.
Input:
{
"urlRegex": "server\\.js$",
"lineNumber": 10
}lineNumber is zero-based, matching the Chrome DevTools Protocol.
set_pause_on_exceptions
Configure exception pause behavior.
Input:
{
"state": "uncaught"
}Allowed states:
noneuncaughtall
The default is uncaught.
continue
Resume execution and return immediately.
Use this when some external action needs to trigger the breakpoint, such as a curl request or browser interaction.
wait_for_pause
Wait until the debugged process pauses and return the current location.
Useful after continue when another tool is triggering the application.
resume
Resume execution and wait for the next pause.
This is convenient for scripts where the next pause will happen without an external trigger.
step_over
Step over the current statement and wait for the next pause.
step_into
Step into the next function call and wait for the next pause.
get_variables
Get variables for the latest paused call frame scope.
evaluate
Evaluate JavaScript in the latest paused call frame.
Input:
{
"expression": "JSON.stringify(req.body)"
}Exception Reporting
The debugger pauses on uncaught exceptions by default. When an exception pause happens, the pause result includes exception metadata:
{
"reason": "exception",
"lineNumber": 8,
"columnNumber": 3,
"exception": {
"className": "Error",
"description": "Error: file is not a database ..."
}
}This lets agents diagnose startup crashes and runtime failures without reading server logs.
Available Tools
11 toolscontinueContinueA
Resume execution of the debugged Node.js process and return immediately.
Inputs: no named parameters.
evaluateEvaluateB
Evaluate a JavaScript expression in the debugged runtime.
Inputs: expression (required).
getvariablesGet variablesA
Get variables for the latest paused call frame scope.
Inputs: no named parameters.
resetResetB
Restart the debug session with a fresh Node inspector process for the provided target.
Inputs: target (required).
resumeResumeB
Resume execution of the debugged Node.js process and wait for the next pause.
Inputs: no named parameters.
set_breakpointSet breakpointB
Set a breakpoint by matching a script URL with a regex.
Inputs: urlRegex (required), lineNumber (required).
set_pause_on_exceptionsSet pause on exceptionsA
Configure whether the debugger pauses on no exceptions, uncaught exceptions, or all exceptions.
Inputs: state (required).
stepintoStep intoB
Step into the next function call.
Inputs: no named parameters.
stepoverStep overA
Step over the current statement.
Inputs: no named parameters.
stopStopA
Stop the current debug target and clear the debug session.
Inputs: no named parameters.
wait_for_pauseWait for pauseA
Wait until the debugged Node.js process pauses and return the current location.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool has a distinct purpose with clear descriptions; continue and resume are differentiated by return behavior, and all other tools target unique debugger actions.
Tool names mix single-word verbs (continue, stop) with underscore-separated phrases (set_breakpoint, wait_for_pause), and 'getvariables' lacks a separator, creating an inconsistent pattern.
11 tools cover essential debugger operations without being excessive, fitting well within the typical 3-15 range for a focused domain.
Missing critical features like removing or listing breakpoints, retrieving call stacks, and setting variables, which are essential for productive debugging sessions.
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
MCP server for understanding Javascript internals from ECMAScript specification.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for Sentry - error monitoring, issue tracking, and debugging for AI assistants
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceAn MCP server and VS Code extension that enables AI clients to interactively debug code using breakpoints, execution control, and state inspection. It is language-agnostic and works with any debugger that supports VS Code's launch.json configurations.-
- AlicenseNot gradedqualityCmaintenanceMCP server that lets AI coding tools control and observe a running Node.js process through the chrome devtools protocol (CDP), via a lightweight Debug Adapter Protocol (DAP) bridge.24 npm2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for AI-assisted Python debugging using debugpy and Debug Adapter Protocol, enabling AI agents to run tests, set breakpoints, and inspect variables via natural language.8MIT
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP server that enables AI assistants to control Chrome DevTools via CDP for debugging tasks like navigation, screenshots, and JavaScript execution.MIT