{"id":28628969,"url":"https://github.com/workbackai/mcp-nodejs-debugger","last_synced_at":"2025-06-12T11:03:18.451Z","repository":{"id":283316110,"uuid":"950900117","full_name":"workbackai/mcp-nodejs-debugger","owner":"workbackai","description":"🐞 MCP Node.js debugger","archived":false,"fork":false,"pushed_at":"2025-03-23T20:19:01.000Z","size":69,"stargazers_count":242,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T20:01:43.979Z","etag":null,"topics":["debugger","mcp","mcp-server","nodejs"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/@hyperdrive-eng/mcp-nodejs-debugger","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/workbackai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-18T21:18:01.000Z","updated_at":"2025-06-10T12:01:25.000Z","dependencies_parsed_at":"2025-04-12T06:14:41.313Z","dependency_job_id":"c6728c2a-6e29-4235-8302-683556bc1023","html_url":"https://github.com/workbackai/mcp-nodejs-debugger","commit_stats":null,"previous_names":["hyperdrive-eng/mcp-debugger","workbackai/mcp-nodejs-debugger"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/workbackai/mcp-nodejs-debugger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workbackai%2Fmcp-nodejs-debugger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workbackai%2Fmcp-nodejs-debugger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workbackai%2Fmcp-nodejs-debugger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workbackai%2Fmcp-nodejs-debugger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workbackai","download_url":"https://codeload.github.com/workbackai/mcp-nodejs-debugger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workbackai%2Fmcp-nodejs-debugger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259453469,"owners_count":22860083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugger","mcp","mcp-server","nodejs"],"created_at":"2025-06-12T11:01:52.780Z","updated_at":"2025-06-12T11:03:18.430Z","avatar_url":"https://github.com/workbackai.png","language":"JavaScript","funding_links":[],"categories":["📚 Projects (1974 total)","JavaScript","Developer Tools","Task and Project Management","MCP Utilities \u0026 Tools"],"sub_categories":["MCP Servers","How to Submit","Testing \u0026 Debugging"],"readme":"# MCP Node.js Debugger\n\nAn 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).\n\n## Demo\n\n### Cursor\n\nhttps://github.com/user-attachments/assets/c193a17e-b0e6-4c51-82aa-7f3f0de17e1a\n\n### Claude Code\n\nhttps://github.com/user-attachments/assets/adb7321b-3a6a-459b-a5c9-df365710d4d8\n\n## Quick start\n\n### Cursor\n\n1. Add to Cursor (`~/.cursor/mcp.json`)\n\n    ![image](https://github.com/user-attachments/assets/132092ab-52d9-4790-84bb-9e9702603390)\n\n    ```diff\n    + {\n    +   \"mcpServers\": {\n    +   \"nodejs-debugger\": {\n    +      \"command\": \"npx\",\n    +       \"args\": [\"@hyperdrive-eng/mcp-nodejs-debugger\"]\n    +     }\n    +   }\n    + }\n    ```\n\n1. Run a Node.js server in [debug mode](https://nodejs.org/en/learn/getting-started/debugging) (i.e. with the `--inspect` flat)\n\n    ```sh\n    node --inspect {file.js}\n    ```\n    \n1. Ask Cursor to debug your Node.js server at runtime\n\n    ![image](https://github.com/user-attachments/assets/fa85982b-33ce-41df-ac90-58ce6a73c433)\n\n### Claude Code\n\n1. Add to Claude Code\n\n    ```sh\n    claude mcp add nodejs-debugger npx @hyperdrive-eng/mcp-nodejs-debugger\n    ```\n\n1. Start Claude Code\n\n    ```sh\n    claude\n    ╭───────────────────────────────────────────────────────╮\n    │ ✻ Welcome to Claude Code research preview!            │\n    │                                                       │\n    │   /help for help                                      │\n    │                                                       │\n    │   Found 1 MCP server (use /mcp for status)            │\n    ╰───────────────────────────────────────────────────────╯\n    ```\n\n2. Run a Node.js server in [debug mode](https://nodejs.org/en/learn/getting-started/debugging) (i.e. with the `--inspect` flat)\n\n    ```sh\n    # In another terminal\n    node --inspect {file.js}\n    ```\n\n3. Ask Claude Code to debug your Node.js server at runtime\n\n    ```sh\n    \u003e I'm getting a runtime error in Node.js \n\n      {YOUR_RUNTIME_ERROR}\n      \n      Please help me debug this error at runtime using the nodejs-debugger mcp.\n    ```\n    \n## Usage\n\n### Claude Code\n\n1. Add to Claude Code\n\n    ```sh\n    claude mcp add nodejs-debugger npx mcp-nodejs-debugger\n    ```\n\n1. Verify connection\n\n    ```sh\n    \u003e /mcp\n      ⎿  MCP Server Status\n\n         • nodejs-debugger: connected\n    ```\n\n1. Remove from Claude Code\n\n    ```sh\n    claude remove nodejs-debugger\n    ```\n\n### Cursor\n\n1. Add to Cursor (`~/.cursor/mcp.json`)\n\n    ```diff\n    + {\n    +   \"mcpServers\": {\n    +   \"nodejs-debugger\": {\n    +      \"command\": \"npx\",\n    +       \"args\": [\"@hyperdrive-eng/mcp-nodejs-debugger\"]\n    +     }\n    +   }\n    + }\n    ```\n\n1. Verify connection:\n\n    ![image](https://github.com/user-attachments/assets/132092ab-52d9-4790-84bb-9e9702603390)\n\n1. Remove from Cursor (`~/.cursor/mcp.json`):\n\n    ```diff\n    - {\n    -   \"mcpServers\": {\n    -   \"nodejs-debugger\": {\n    -      \"command\": \"npx\",\n    -       \"args\": [\"@hyperdrive-eng/mcp-nodejs-debugger\"]\n    -     }\n    -   }\n    - }\n    ```\n\n## Example\n\n### Cursor\n\n1. Run this simple Node.js app: [github.com/mdn/express-locallibrary-tutorial](https://github.com/mdn/express-locallibrary-tutorial):\n\n    ```sh\n    node --inspect ./bin/www\n    ```\n\n1. Ask Cursor to set a breakpoint\n\n    ![image](https://github.com/user-attachments/assets/fa85982b-33ce-41df-ac90-58ce6a73c433)\n\n    ![image](https://github.com/user-attachments/assets/d24b3423-b7c3-4268-ab86-732371aa047c)\n\n2. Create a book at [`localhost:3000/catalog/book/create`](http://localhost:3000/catalog/book/create)\n\n    ![image](https://github.com/user-attachments/assets/165cb026-7767-417d-a52e-2423e5e5728e)\n\n1. Watch Cursor capture runtime state\n\n    ![image](https://github.com/user-attachments/assets/a7204504-7441-4592-9758-0397086ba724)\n\n### Claude Code\n\n1. Here is a buggy Node.js server:\n\n    ```\n    node --inspect index.js\n    \n    Debugger listening on ws://127.0.0.1:9229/2862f5a2-8618-4516-8429-1248b397e9b4\n    \n    #######################\n    ## THE RUNTIME ERROR ##\n    #######################\n    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/\n        at _handleConnectionErrors (/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/node_modules/mongoose/lib/connection.js:1110:11)\n        at NativeConnection.openUri (/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/node_modules/mongoose/lib/connection.js:1041:11)\n        at async main (/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app.js:35:3) {\n      reason: TopologyDescription {\n        type: 'ReplicaSetNoPrimary',\n        servers: Map(3) {\n          'ac-8e6hgk7-shard-00-01.cojoign.mongodb.net:27017' =\u003e [ServerDescription],\n          'ac-8e6hgk7-shard-00-02.cojoign.mongodb.net:27017' =\u003e [ServerDescription],\n          'ac-8e6hgk7-shard-00-00.cojoign.mongodb.net:27017' =\u003e [ServerDescription]\n        },\n        stale: false,\n        compatible: true,\n        heartbeatFrequencyMS: 10000,\n        localThresholdMS: 15,\n        setName: 'atlas-5syy8t-shard-0',\n        maxElectionId: null,\n        maxSetVersion: null,\n        commonWireVersion: 0,\n        logicalSessionTimeoutMinutes: null\n      },\n      code: undefined\n    }\n    ```\n\n1. Claude Code debugs the Node.js server at runtime:\n\n    ```sh    \n    \u003e I'm getting a runtime error connecting to mongoose. Please help me debug by checking the value of \n      the mongodb configs at runtime using the nodejs-debugger mcp.\n\n      ⏺ I'll help you debug the mongoose connection issue using the Node.js debugger. Let's first understand where the\n      MongoDB connection is configured.\n    \n      ⏺ Search(pattern: \"**/*.js\")…\n        ⎿  Found 100 files\n  \n      ⏺ Let's set a breakpoint at the mongoose connection point and continue:\n  \n      ⏺ nodejs-debugger:set_breakpoint (MCP)(file:                                                                         …\n            \"/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app.js\",\n             line: 35)\n        ⎿  Breakpoint set successfully. ID:\n           2:34:0:file:///Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app\\.js\n      \n      ⏺ Let's list all our breakpoints:\n      \n      ⏺ nodejs-debugger:list_breakpoints (MCP)\n        ⎿  [\n             {\n               \"file\": \"/Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app.js\",\n               \"line\": 35,\n               \"id\": \"2:34:0:file:///Users/arthur/Documents/thirdparties/mdn/express-locallibrary-tutorial/app\\\\.js\"\n             }\n           ]\n      \n      ⏺ Let's try to execute a specific piece of code to check the connection variables:\n  \n      ⏺ nodejs-debugger:nodejs_inspect (MCP)(js_code: \"// Get the mongoose module and inspect connection\\nconst mongoose = …\n                                            require('mongoose');\\nconsole.log('Current mongoose version:',\n                                            mongoose.version);\\nconsole.log('Current mongoose connection state:',\n                                            mongoose.connection.readyState);\\n// Log connection string safely (without\n                                            password)\\nconst connectionString = process.env.MONGODB_URI || \\n\n                                            \\\"mongodb+srv://cooluser:coolpassword@cluster0.cojoign.mongodb.net/local_library?retryWr\n                                            ites=true\u0026w=majority\u0026appName=Cluster0\\\";\\nconsole.log('Connection string\n                                            (masked):', connectionString.replace(/(?\u003c=mongodb\\\\+srv:\\\\/\\\\/\\\\w+:)(.+?)(?=@)/,\n                                             '*****'));\")\n      \n        ⎿  Console output:\n           [log] Current mongoose version: 8.9.5\n           [log] Current mongoose connection state: 0\n           [log] Connection string (masked): mongodb+srv://cooluser:coolpassword@cluster0.cojoign.mongodb.net/local_library?retryWri\n           tes=true\u0026w=majority\u0026appName=Cluster0\n\n      ⏺ The runtime error you're seeing in your application is related to MongoDB\n        Atlas connection issues. Based on your error message, the problem is:\n      \n        1. You're using placeholder credentials (\"cooluser:coolpassword\")\n      \n        To fix this, you have two options:\n      \n        1. Use a local MongoDB instance by changing line 29-30 in app.js to:\n        const dev_db_url = \"mongodb://127.0.0.1:27017/local_library\";\n        2. Or correctly set up MongoDB Atlas:\n          - Log into Atlas at https://cloud.mongodb.com\n          - Go to Network Access and add your current IP to whitelist\n          - Create proper database credentials\n          - Update the connection string with real credentials\n      \n        Which option would you like to proceed with?\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkbackai%2Fmcp-nodejs-debugger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkbackai%2Fmcp-nodejs-debugger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkbackai%2Fmcp-nodejs-debugger/lists"}