Skip to content
Back to search

mcp-nodejs-debugger

๐Ÿž MCP Node.js debugger

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/workbackai--mcp-nodejs-debugger/badge.svg)](/listings/workbackai--mcp-nodejs-debugger)

HTML

<a href="/listings/workbackai--mcp-nodejs-debugger"><img src="/api/listings/workbackai--mcp-nodejs-debugger/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Cursor

1. Add to Cursor (`~/.cursor/mcp.json`)

```diff + { + "mcpServers": { + "nodejs-debugger": { + "command": "npx", + "args": ["@hyperdrive-eng/mcp-nodejs-debugger"] + } + } + } ```

1. Run a Node.js server in [debug mode](https://nodejs.org/en/learn/getting-started/debugging) (i.e. with the `--inspect` flat)

```sh node --inspect {file.js} ```

1. Ask Cursor to debug your Node.js server at runtime

Claude Code

1. Add to Claude Code

```sh claude mcp add nodejs-debugger npx @hyperdrive-eng/mcp-nodejs-debugger ```

1. Start Claude Code

```sh claude โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โœป Welcome to Claude Code research preview! โ”‚ โ”‚ โ”‚ โ”‚ /help for help โ”‚ โ”‚ โ”‚ โ”‚ Found 1 MCP server (use /mcp for status) โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ```

2. Run a Node.js server in [debug mode](https://nodejs.org/en/learn/getting-started/debugging) (i.e. with the `--inspect` flat)

```sh # In another terminal node --inspect {file.js} ```

3. Ask Claude Code to debug your Node.js server at runtime

```sh > I'm getting a runtime error in Node.js

{YOUR_RUNTIME_ERROR}

Please help me debug this error at runtime using the nodejs-debugger mcp. ```

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md ยท README ยท 265 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # MCP Node.js Debugger
  2. An MCP server that gives Cursor or Claude Code access to Node.js at runtime to help you debug: [`@hyperdrive-eng/mcp-nodejs-debugger`](https://www.npmjs.com/package/@hyperdrive-eng/mcp-nodejs-debugger).
  3. ## Demo
  4. ### Cursor
  5. https://github.com/user-attachments/assets/c193a17e-b0e6-4c51-82aa-7f3f0de17e1a
  6. ### Claude Code
  7. https://github.com/user-attachments/assets/adb7321b-3a6a-459b-a5c9-df365710d4d8
  8. ## Quick start
  9. ### Cursor
  10. 1. Add to Cursor (`~/.cursor/mcp.json`)
  11. ![image](https://github.com/user-attachments/assets/132092ab-52d9-4790-84bb-9e9702603390)
  12. ```diff
  13. + {
  14. + "mcpServers": {
  15. + "nodejs-debugger": {
  16. + "command": "npx",
  17. + "args": ["@hyperdrive-eng/mcp-nodejs-debugger"]
  18. + }
  19. + }
  20. + }
  21. ```
  22. 1. Run a Node.js server in [debug mode](https://nodejs.org/en/learn/getting-started/debugging) (i.e. with the `--inspect` flat)
  23. ```sh
  24. node --inspect {file.js}
  25. ```
  26. 1. Ask Cursor to debug your Node.js server at runtime
  27. ![image](https://github.com/user-attachments/assets/fa85982b-33ce-41df-ac90-58ce6a73c433)
  28. ### Claude Code
  29. 1. Add to Claude Code
  30. ```sh
  31. claude mcp add nodejs-debugger npx @hyperdrive-eng/mcp-nodejs-debugger
  32. ```
  33. 1. Start Claude Code
  34. ```sh
  35. claude
  36. โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
  37. โ”‚ โœป Welcome to Claude Code research preview! โ”‚
  38. โ”‚ โ”‚
  39. โ”‚ /help for help โ”‚
  40. โ”‚ โ”‚
  41. โ”‚ Found 1 MCP server (use /mcp for status) โ”‚
  42. โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
  43. ```
  44. 2. Run a Node.js server in [debug mode](https://nodejs.org/en/learn/getting-started/debugging) (i.e. with the `--inspect` flat)
  45. ```sh
  46. # In another terminal
  47. node --inspect {file.js}
  48. ```
  49. 3. Ask Claude Code to debug your Node.js server at runtime
  50. ```sh
  51. > I'm getting a runtime error in Node.js
  52. {YOUR_RUNTIME_ERROR}
  53. Please help me debug this error at runtime using the nodejs-debugger mcp.
  54. ```
  55. ## Usage
  56. ### Claude Code
  57. 1. Add to Claude Code
  58. ```sh
  59. claude mcp add nodejs-debugger npx mcp-nodejs-debugger
  60. ```
  61. 1. Verify connection
  62. ```sh
  63. > /mcp
  64. โŽฟ MCP Server Status
  65. โ€ข nodejs-debugger: connected
  66. ```
  67. 1. Remove from Claude Code
  68. ```sh
  69. claude remove nodejs-debugger
  70. ```
  71. ### Cursor
  72. 1. Add to Cursor (`~/.cursor/mcp.json`)
  73. ```diff
  74. + {
  75. + "mcpServers": {
  76. + "nodejs-debugger": {
  77. + "command": "npx",
  78. + "args": ["@hyperdrive-eng/mcp-nodejs-debugger"]
  79. + }
  80. + }
  81. + }
  82. ```
  83. 1. Verify connection:
  84. ![image](https://github.com/user-attachments/assets/132092ab-52d9-4790-84bb-9e9702603390)
  85. 1. Remove from Cursor (`~/.cursor/mcp.json`):
  86. ```diff
  87. - {
  88. - "mcpServers": {
  89. - "nodejs-debugger": {
  90. - "command": "npx",
  91. - "args": ["@hyperdrive-eng/mcp-nodejs-debugger"]
  92. - }
  93. - }
  94. - }
  95. ```
  96. ## Example
  97. ### Cursor
  98. 1. Run this simple Node.js app: [github.com/mdn/express-locallibrary-tutorial](https://github.com/mdn/express-locallibrary-tutorial):
  99. ```sh
  100. node --inspect ./bin/www
  101. ```
  102. 1. Ask Cursor to set a breakpoint
  103. ![image](https://github.com/user-attachments/assets/fa85982b-33ce-41df-ac90-58ce6a73c433)
  104. ![image](https://github.com/user-attachments/assets/d24b3423-b7c3-4268-ab86-732371aa047c)
  105. 2. Create a book at [`localhost:3000/catalog/book/create`](http://localhost:3000/catalog/book/create)
  106. ![image](https://github.com/user-attachments/assets/165cb026-7767-417d-a52e-2423e5e5728e)
  107. 1. Watch Cursor capture runtime state
  108. ![image](https://github.com/user-attachments/assets/a7204504-7441-4592-9758-0397086ba724)
  109. ### Claude Code
  110. 1. Here is a buggy Node.js server:
  111. ```
  112. node --inspect index.js
  113. Debugger listening on ws://127.0.0.1:9229/2862f5a2-8618-4516-8429-1248b397e9b4
  114. #######################
  115. ## THE RUNTIME ERROR ##
  116. #######################
  117. MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://www.mongodb.com/docs/atlas/security-whitelist/
  118. at _handleConnectionErrors (/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/node_modules/mongoose/lib/connection.js:1110:11)
  119. at NativeConnection.openUri (/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/node_modules/mongoose/lib/connection.js:1041:11)
  120. at async main (/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app.js:35:3) {
  121. reason: TopologyDescription {
  122. type: 'ReplicaSetNoPrimary',
  123. servers: Map(3) {
  124. 'ac-8e6hgk7-shard-00-01.cojoign.mongodb.net:27017' => [ServerDescription],
  125. 'ac-8e6hgk7-shard-00-02.cojoign.mongodb.net:27017' => [ServerDescription],
  126. 'ac-8e6hgk7-shard-00-00.cojoign.mongodb.net:27017' => [ServerDescription]
  127. },
  128. stale: false,
  129. compatible: true,
  130. heartbeatFrequencyMS: 10000,
  131. localThresholdMS: 15,
  132. setName: 'atlas-5syy8t-shard-0',
  133. maxElectionId: null,
  134. maxSetVersion: null,
  135. commonWireVersion: 0,
  136. logicalSessionTimeoutMinutes: null
  137. },
  138. code: undefined
  139. }
  140. ```
  141. 1. Claude Code debugs the Node.js server at runtime:
  142. ```sh
  143. > I'm getting a runtime error connecting to mongoose. Please help me debug by checking the value of
  144. the mongodb configs at runtime using the nodejs-debugger mcp.
  145. โบ I'll help you debug the mongoose connection issue using the Node.js debugger. Let's first understand where the
  146. MongoDB connection is configured.
  147. โบ Search(pattern: "**/*.js")โ€ฆ
  148. โŽฟ ย Found 100 files
  149. โบ Let's set a breakpoint at the mongoose connection point and continue:
  150. โบ nodejs-debugger:set_breakpoint (MCP)(file: โ€ฆ
  151. "/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app.js",
  152. line: 35)
  153. ย ย โŽฟ ย Breakpoint set successfully. ID:
  154. 2:34:0:file:///Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app\.js
  155. โบ Let's list all our breakpoints:
  156. โบ nodejs-debugger:list_breakpoints (MCP)
  157. ย ย โŽฟ ย [
  158. {
  159. "file": "/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app.js",
  160. "line": 35,
  161. "id": "2:34:0:file:///Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app\\.js"
  162. }
  163. ]
  164. โบ Let's try to execute a specific piece of code to check the connection variables:
  165. โบ nodejs-debugger:nodejs_inspect (MCP)(js_code: "// Get the mongoose module and inspect connection\nconst mongoose = โ€ฆ
  166. require('mongoose');\nconsole.log('Current mongoose version:',
  167. mongoose.version);\nconsole.log('Current mongoose connection state:',
  168. mongoose.connection.readyState);\n// Log connection string safely (without
  169. password)\nconst connectionString = process.env.MONGODB_URI || \n
  170. \"mongodb+srv://cooluser:coolpassword@cluster0.cojoign.mongodb.net/local_library?retryWr
  171. ites=true&w=majority&appName=Cluster0\";\nconsole.log('Connection string
  172. (masked):', connectionString.replace(/(?<=mongodb\\+srv:\\/\\/\\w+:)(.+?)(?=@)/,
  173. '*****'));")
  174. ย ย โŽฟ ย Console output:
  175. [log] Current mongoose version: 8.9.5
  176. [log] Current mongoose connection state: 0
  177. [log] Connection string (masked): mongodb+srv://cooluser:coolpassword@cluster0.cojoign.mongodb.net/local_library?retryWri
  178. tes=true&w=majority&appName=Cluster0
  179. โบ The runtime error you're seeing in your application is related to MongoDB
  180. Atlas connection issues. Based on your error message, the problem is:
  181. 1. You're using placeholder credentials ("cooluser:coolpassword")
  182. To fix this, you have two options:
  183. 1. Use a local MongoDB instance by changing line 29-30 in app.js to:
  184. const dev_db_url = "mongodb://127.0.0.1:27017/local_library";
  185. 2. Or correctly set up MongoDB Atlas:
  186. - Log into Atlas at https://cloud.mongodb.com
  187. - Go to Network Access and add your current IP to whitelist
  188. - Create proper database credentials
  189. - Update the connection string with real credentials
  190. Which option would you like to proceed with?
  191. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If itโ€™s helped, pass it on.