
Node.js调试器
STDIO为AI代理提供Node.js调试功能的MCP服务器
为AI代理提供Node.js调试功能的MCP服务器
An MCP server that provides Node.js debugging capabilities with process management for AI agents.
Build the server:
npm install npm run build
For Project-Specific Use: The .mcp.json
file is already configured in this project
For 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.js
For Global Use: Copy the .mcp.json
to your projects or add to global config
Once configured, you'll have access to these tools in Claude Code:
start_node_process
- Launch Node.js scripts with debuggingkill_process
- Terminate processes by PIDlist_processes
- Show all managed processesattach_debugger
- Connect to debug portset_breakpoint
- Set breakpoints with optional conditions
file://
URLs for reliable breakpoint hitsfile:///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 contextdebug://session
- Current debug session statedebug://processes
- List of managed processesStart 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 1
Set 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"
--inspect-brk
flag to pause at first linefile://
URLs for consistent breakpoint hitsTest with the included example app:
node --inspect=9229 example-app.js
Then use the MCP tools to debug it!
npm run inspector