VSCode Debugger MCP server

Integrates with VS Code's debugging capabilities to enable interactive code debugging and expression evaluation.
Back to servers
Provider
Jason McGhee
Release date
Jan 17, 2025
Language
TypeScript
Stats
348 stars

Claude Debugs For You is an MCP (Model Context Protocol) Server and VS Code extension that enables AI models like Claude to interactively debug your code. It works across programming languages and integrates with VSCode's debugging capabilities to help analyze and fix issues in your code.

Installation

Extension Installation

  1. Download the extension from the VS Code Marketplace or GitHub releases
  2. Install the extension:
    • If using a .vsix file directly, go to the Extensions view in VS Code, click the three dots, and select "Install from VSIX..."
  3. After installation, you'll see a new status menu item "Claude Debugs For You" showing if it's running properly (check) or failed to start (x)

Configure MCP Client

For Claude Desktop (stdio)

  1. Open VS Code command palette and search for "Copy MCP Debug Server stdio path to clipboard"
  2. Update your claude_desktop_config.json with the copied path:
{
  "mcpServers": {
    "debug": {
      "command": "node",
      "args": [
        "/path/to/mcp-debug.js"
      ]
    }
  }
}
  1. Restart Claude Desktop if it was already running

For SSE Clients (e.g., Cursor)

  1. Get the MCP server SSE address by using VS Code command "Copy MCP Debug Server sse address to clipboard"
  2. The default address is typically http://localhost:4711/sse
  3. Add this address to your client's configuration
  4. You may need to refresh or restart your client

Usage

Basic Setup

  1. Ensure your project has a .vscode/launch.json file configured for debugging
  2. Start your MCP client (Claude Desktop, Continue, Cursor, etc.)

Debugging with Claude

  1. Open your project in VS Code
  2. Set breakpoints in your code
  3. Start a debugging session using VS Code's debugging tools
  4. Ask Claude to help debug your code by providing context about the issue

Example with Continue

To set up with Continue:

  1. Update your Continue configuration:
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "node",
          "args": [
            "/path/to/mcp-debug.js"
          ]
        }
      }
    ]
  }
}
  1. Choose a model capable of using tools
  2. When the list of tools appears, select "debug" and set it to "Automatic"

Running an Example

  1. Open the examples/python folder in VS Code
  2. Enter the following prompt to your AI assistant:
i am building `longest_substring_with_k_distinct` and for some reason it's not working quite right. can you debug it step by step using breakpoints and evaluating expressions to figure out where it goes wrong? make sure to use the debug tool to get access and debug! don't make any guesses as to the problem up front. DEBUG!

Advanced Configuration

Managing Multiple VS Code Windows

When you start multiple VS Code windows, you'll see a pop-up allowing you to gracefully hand-off "Claude Debugs For You" between windows.

Manual Server Control

You can disable autostart in settings. In this case, you'll need to:

  1. Click the status menu
  2. Select "Start Server" to manually start the debugging server

Troubleshooting

  • If seeing MCP errors in Continue, try disabling and re-enabling the Continue plugin
  • Check the status indicator in the VS Code status bar to verify the server is running
  • Ensure your launch.json is properly configured for debugging
  • Restart your MCP client after making configuration changes

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later