Show HN: Let Claude Code control Node.js debugger
9 points
9 months ago
| 0 comments
| github.com
| HN
Debugging is hard for LLMs, because they primarily depend on source code, and they don't have access to runtime state.

I spent countless hours debugging code, and the only way I found LLMs useful for that, is to ask them to add log lines. That's annoying, because it pollutes my code and adds unnecessary diffs.

So we made an MCP server that solve this problem. It gives MCP clients (like Claude Code) access to a NodeJS inspector, so they can:

  1. set breakpoints

  2. step in, step out, continue

  3. fetch the current execution location

  4. read console output

  5. run JS using eval
To try:

1. run a Node JS server in debug mode

    ```
    node --inspect <file.js>
    ```

    or

    ```
    NODE_OPTIONS="--inspect" npm run <command>
    ```
2. add the MCP to Claude Code

    ```
    claude mcp add nodejs-debugger npx @hyperdrive-eng/mcp-nodejs-debugger
    ```
3. ask Claude Code to set breakpoints and read runtime state.

    ````
    > I'm getting a runtime error in NodeJS. Please help me debug this error at runtime using the nodejs-debugger mcp.
    ```
Would appreciate feedback, however big or small!

Github: https://github.com/hyperdrive-eng/mcp-nodejs-debugger

No one has commented on this post.