Token导航 LogoToken导航TokenDH.com
Nodejs Debugger logo
开发工具未说明官方级别未说明来源级核验

Nodejs Debugger

MCP Server

MCP Node.js调试器是一个运行时调试工具,允许通过Cursor或Claude Code访问Node.js运行时的调试功能,帮助开发者实时调试Node.js应用程序。

工具数

13

提示词数

0

GitHub Stars

300

资源数

0
JavaScriptClaude开发工具ClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

workbackai

提供方

workbackai

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

MCP Node.js调试器

一个MCP服务器,允许Cursor或Claude Code在运行时访问Node.js,以帮助您调试: .

演示

光标

https://github.com/user-attachments/assets/c193a17e-b0e6-4c51-82aa-7f3f0de17e1a

克劳德代码

https://github.com/user-attachments/assets/adb7321b-3a6a-459b-a5c9-df365710d4d8

快速启动

光标

  1. 添加到光标(~/.cursor/mcp.json)

image

   + {
   +   "mcpServers": {
   +   "nodejs-debugger": {
   +      "command": "npx",
   +       "args": ["@hyperdrive-eng/mcp-nodejs-debugger"]
   +     }
   +   }
   + }
  1. 在中运行Node.js服务器 调试模式 (即与 --inspect 平坦)
   node --inspect {file.js}
  1. 让Cursor在运行时调试你的Node.js服务器

image

克劳德代码

  1. 添加到克劳德代码
   claude mcp add nodejs-debugger npx @hyperdrive-eng/mcp-nodejs-debugger
  1. 启动克劳德代码
   claude
   ╭───────────────────────────────────────────────────────╮
   │ ✻ Welcome to Claude Code research preview!            │
   │                                                       │
   │   /help for help                                      │
   │                                                       │
   │   Found 1 MCP server (use /mcp for status)            │
   ╰───────────────────────────────────────────────────────╯
  1. 在中运行Node.js服务器 调试模式 (即与 --inspect 平坦)
   # In another terminal
   node --inspect {file.js}
  1. 让Claude Code在运行时调试你的Node.js服务器
   > 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.

用法

克劳德代码

  1. 添加到克劳德代码
   claude mcp add nodejs-debugger npx mcp-nodejs-debugger
  1. 验证连接
   > /mcp
     ⎿  MCP Server Status

        • nodejs-debugger: connected
  1. 从克劳德代码中删除
   claude remove nodejs-debugger

光标

  1. 添加到光标(~/.cursor/mcp.json)
   + {
   +   "mcpServers": {
   +   "nodejs-debugger": {
   +      "command": "npx",
   +       "args": ["@hyperdrive-eng/mcp-nodejs-debugger"]
   +     }
   +   }
   + }
  1. 验证连接:

image

  1. 从光标中删除(~/.cursor/mcp.json):
   - {
   -   "mcpServers": {
   -   "nodejs-debugger": {
   -      "command": "npx",
   -       "args": ["@hyperdrive-eng/mcp-nodejs-debugger"]
   -     }
   -   }
   - }

示例

光标

  1. 运行这个简单的Node.js应用程序: :
   node --inspect ./bin/www
  1. 要求Cursor设置断点

image

image

  1. 创建一本书 localhost:3000/catalog/book/create

image

  1. 观察光标捕获运行时状态

image

克劳德代码

  1. 这是一个有缺陷的Node.js服务器:
   node --inspect index.js

   Debugger listening on ws://127.0.0.1:9229/2862f5a2-8618-4516-8429-1248b397e9b4

   #######################
   ## THE RUNTIME ERROR ##
   #######################
   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/
       at _handleConnectionErrors (/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/node_modules/mongoose/lib/connection.js:1110:11)
       at NativeConnection.openUri (/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/node_modules/mongoose/lib/connection.js:1041:11)
       at async main (/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app.js:35:3) {
     reason: TopologyDescription {
       type: 'ReplicaSetNoPrimary',
       servers: Map(3) {
         'ac-8e6hgk7-shard-00-01.cojoign.mongodb.net:27017' => [ServerDescription],
         'ac-8e6hgk7-shard-00-02.cojoign.mongodb.net:27017' => [ServerDescription],
         'ac-8e6hgk7-shard-00-00.cojoign.mongodb.net:27017' => [ServerDescription]
       },
       stale: false,
       compatible: true,
       heartbeatFrequencyMS: 10000,
       localThresholdMS: 15,
       setName: 'atlas-5syy8t-shard-0',
       maxElectionId: null,
       maxSetVersion: null,
       commonWireVersion: 0,
       logicalSessionTimeoutMinutes: null
     },
     code: undefined
   }
  1. Claude Code在运行时调试Node.js服务器:
   > I'm getting a runtime error connecting to mongoose. Please help me debug by checking the value of 
     the mongodb configs at runtime using the nodejs-debugger mcp.

     ⏺ I'll help you debug the mongoose connection issue using the Node.js debugger. Let's first understand where the
     MongoDB connection is configured.

     ⏺ Search(pattern: "**/*.js")…
       ⎿  Found 100 files

     ⏺ Let's set a breakpoint at the mongoose connection point and continue:

     ⏺ nodejs-debugger:set_breakpoint (MCP)(file:                                                                         …
           "/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app.js",
            line: 35)
       ⎿  Breakpoint set successfully. ID:
          2:34:0:file:///Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app\.js
     
     ⏺ Let's list all our breakpoints:
     
     ⏺ nodejs-debugger:list_breakpoints (MCP)
       ⎿  [
            {
              "file": "/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app.js",
              "line": 35,
              "id": "2:34:0:file:///Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app\\.js"
            }
          ]
     
     ⏺ Let's try to execute a specific piece of code to check the connection variables:

     ⏺ nodejs-debugger:nodejs_inspect (MCP)(js_code: "// Get the mongoose module and inspect connection\nconst mongoose = …
                                           require('mongoose');\nconsole.log('Current mongoose version:',
                                           mongoose.version);\nconsole.log('Current mongoose connection state:',
                                           mongoose.connection.readyState);\n// Log connection string safely (without
                                           password)\nconst connectionString = process.env.MONGODB_URI || \n
                                           \"mongodb+srv://cooluser:coolpassword@cluster0.cojoign.mongodb.net/local_library?retryWr
                                           ites=true&w=majority&appName=Cluster0\";\nconsole.log('Connection string
                                           (masked):', connectionString.replace(/(?<=mongodb\\+srv:\\/\\/\\w+:)(.+?)(?=@)/,
                                            '*****'));")
     
       ⎿  Console output:
          [log] Current mongoose version: 8.9.5
          [log] Current mongoose connection state: 0
          [log] Connection string (masked): mongodb+srv://cooluser:coolpassword@cluster0.cojoign.mongodb.net/local_library?retryWri
          tes=true&w=majority&appName=Cluster0

     ⏺ The runtime error you're seeing in your application is related to MongoDB
       Atlas connection issues. Based on your error message, the problem is:
     
       1. You're using placeholder credentials ("cooluser:coolpassword")
     
       To fix this, you have two options:
     
       1. Use a local MongoDB instance by changing line 29-30 in app.js to:
       const dev_db_url = "mongodb://127.0.0.1:27017/local_library";
       2. Or correctly set up MongoDB Atlas:
         - Log into Atlas at https://cloud.mongodb.com
         - Go to Network Access and add your current IP to whitelist
         - Create proper database credentials
         - Update the connection string with real credentials
     
       Which option would you like to proceed with?

目录标签

目录标签

JavaScriptClaude开发工具Node.js调试本地部署可托管运行时调试MCP服务器代码调试

支持客户端

ClaudeCursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

部署方式(deploymentType,部署类型)

local-only

工具数量(toolCount,工具数)

13

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明nonelocal-only

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP