Node.js Debugger

by hyperdrive-eng

215 stars
3.1k downloads
Not rated
GitHub Website

About

Connects Claude Code to Node.js's Inspector Protocol for real-time debugging capabilities, enabling breakpoint setting, variable inspection, and code execution stepping without leaving the conversation interface.

Details

Author
hyperdrive-eng
Repository
workbackai/mcp-nodejs-debugger
GitHub stars
215
Downloads
3,071
Categories
Developer Tools, Design, AI, Frontend

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Node.js Debugger
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 @hyperdrive-eng/mcp-nodejs-debugger

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "node.js debugger": {
            "cwd": "~/.cursor",
            "env": {},
            "args": [
                "@hyperdrive-eng/mcp-nodejs-debugger"
            ],
            "shell": false,
            "command": "npx"
        }
    }
}

Linux

{
    "cwd": "~/.cursor",
    "env": [],
    "args": [
        "@hyperdrive-eng/mcp-nodejs-debugger"
    ],
    "shell": false,
    "command": "npx"
}

Macos

{
    "cwd": "~/.cursor",
    "env": [],
    "args": [
        "@hyperdrive-eng/mcp-nodejs-debugger"
    ],
    "shell": false,
    "command": "npx"
}

Windows

{
    "cwd": "~/.cursor",
    "env": [],
    "args": [
        "/c",
        "npx",
        "@hyperdrive-eng/mcp-nodejs-debugger"
    ],
    "shell": false,
    "command": "cmd"
}

Provides runtime debugging access to Node.js applications for code editors like Cursor or Claude Code.

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://github.com/user-attachments/assets/c193a17e-b0e6-4c51-82aa-7f3f0de17e1a

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

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

Run a Node.js server indebug mode(i.e. with the--inspectflat)

Ask Cursor to debug your Node.js server at runtime

claude mcp add nodejs-debugger npx @hyperdrive-eng/mcp-nodejs-debugger
claude ╭───────────────────────────────────────────────────────╮ │ ✻ Welcome to Claude Code research preview! │ │ │ │ /help for help │ │ │ │ Found 1 MCP server (use /mcp for status) │ ╰───────────────────────────────────────────────────────╯

Run a Node.js server indebug mode(i.e. with the--inspectflat)

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

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

> 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.
claude mcp add nodejs-debugger npx mcp-nodejs-debugger
> /mcp ⎿ MCP Server Status • nodejs-debugger: connected
+ { + "mcpServers": { + "nodejs-debugger": { + "command": "npx", + "args": ["@hyperdrive-eng/mcp-nodejs-debugger"] + } + } + }

Remove from Cursor (~/.cursor/mcp.json):

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

-

Run this simple Node.js app:github.com/mdn/express-locallibrary-tutorial:

Create a book atlocalhost:3000/catalog/book/create

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 }

Claude Code debugs the Node.js server at runtime:

> 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?

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

AI-powered live runtime debugging with Lightrun production context.

Run, debug, and triage tests via natural language across HyperExecute, Automation, SmartUI, and Accessibility on the TestMu AI cloud.

Understand, develop, and debug authorization policies in Oso Cloud.

A comprehensive proxy that combines multiple MCP servers into a single MCP. It provides discovery and management of tools, prompts, resources, and templates across servers, plus a playground for debugging when building MCP servers.

Proxyman MCP allows AI to inspect HTTP traffic, create debugging rules, and control Proxyman - all through natural language conversations.

Debug your remote Node.js and Next.js applications directly from your AI IDE like Cursor.

Live browser debugging for AI assistants — DOM, console, network via MCP.

Drives an Android emulator or a real device over adb: screenshots, UI hierarchy with true device-pixel coordinates, tap and type, app lifecycle, logcat, and Gradle builds and tests.

Interact with Android devices using the Android Debug Bridge (ADB).

Policy-gated MCP tools that let coding agents build, flash, stimulate and observe real embedded hardware (OpenOCD, pyOCD, STM32CubeProgrammer, serial, CAN).

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.