Debugger MCP

Debugger MCP

Enables AI agents like Claude to control VS Code's debugger, supporting any language with a Debug Adapter Protocol implementation.

Category
访问服务器

README

Debugger MCP

A VS Code extension that exposes an MCP (Model Context Protocol) server, allowing AI agents like Claude Code and Claude Desktop to control VS Code's debugger. Language-agnostic — works with any debug adapter (Node.js, Python, C++, Go, Rust, Java, etc.).

Features

  • 22 MCP tools for full debugger control
  • Works with any debugger that implements the Debug Adapter Protocol
  • Zero-config for Claude Code — auto-updates ~/.claude.json on activation
  • Execution commands block until the debugger stops and return the stop location + local variables in a single response
  • Captures program output (stdout/stderr) for inspection

Architecture

Claude Code / Desktop / any MCP client
       |  (HTTP: Streamable HTTP transport)
       v
VS Code Extension (MCP server on localhost:<port>/mcp)
       |  (vscode.debug.* API)
       v
Debug Adapter Protocol → Any Debugger

The extension hosts the MCP server directly inside the VS Code process — no separate server or sidecar needed. On activation it starts a localhost HTTP server (default port 45557) and automatically writes the connection URL to ~/.claude.json.

Installation

VS Code Marketplace

Install from the VS Code Marketplace, or search for "Debugger MCP" in the Extensions view (Ctrl+Shift+X / Cmd+Shift+X).

Or from the command line:

code --install-extension speakeasy.debugger-mcp

The extension activates automatically on startup — no manual setup required. It starts the MCP server and auto-configures Claude Code.

From source (development)

git clone git@github.com:speakeasy-api/debugger-mcp.git
cd debugger-mcp
npm install
npm run compile

Then press F5 in VS Code to launch the Extension Development Host.

MCP Client Configuration

Claude Code (zero-config)

The extension automatically registers itself in ~/.claude.json on activation. No manual setup needed — just install the extension, reload VS Code, and start using Claude Code.

To verify it's configured, run:

claude mcp list

You should see vscode-debugger listed as an HTTP server.

If you prefer to configure manually, or if auto-config is disabled:

claude mcp add --transport http vscode-debugger http://localhost:45557/mcp

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "vscode-debugger": {
      "type": "http",
      "url": "http://localhost:45557/mcp"
    }
  }
}

VS Code (Copilot / other MCP clients)

Add to .vscode/mcp.json in your workspace:

{
  "servers": {
    "vscode-debugger": {
      "type": "http",
      "url": "http://localhost:45557/mcp"
    }
  }
}

Alternative: stdio transport

A standalone MCP server process is also available for clients that only support stdio transport. See the extension's dist/mcp-server.js — it discovers the running extension via a port file and proxies MCP requests over HTTP.

Settings

Setting Default Description
debuggerMcp.port 45557 Preferred port for the MCP server. Falls back to a random port if taken.
debuggerMcp.autoConfigureClaude true Automatically update ~/.claude.json with the MCP server URL on activation.

Tools

Session Management

Tool Description
debug_start Start a debug session from a launch.json config name or inline configuration
debug_stop Stop a debug session
debug_restart Restart a debug session
debug_list_sessions List active debug sessions
debug_list_configurations List available launch.json configurations

Execution Control

Tool Description
debug_continue Resume execution until next breakpoint or exit. Returns stop location + locals
debug_pause Pause a running program. Returns stop location + locals
debug_step_over Step over (next line). Supports count for batch stepping
debug_step_into Step into function calls. Supports count for batch stepping
debug_step_out Step out of current function. Supports count for batch stepping

Breakpoints

Tool Description
debug_set_breakpoint Set a source breakpoint (supports condition, hit count, logpoint)
debug_set_function_breakpoint Set a function-name breakpoint
debug_remove_breakpoint Remove by ID, file+line, all in file, or all
debug_list_breakpoints List all breakpoints with details
debug_toggle_breakpoint Enable/disable a breakpoint without removing it

State Inspection

Tool Description
debug_get_threads List threads
debug_get_stack_trace Get call stack for a thread
debug_get_scopes Get variable scopes for a stack frame
debug_get_variables Get variables in a scope or expand a structured variable
debug_evaluate Evaluate an expression in the debug context

Status & Output

Tool Description
debug_status Quick "where am I?" — session, stop location, and locals
debug_get_output Get captured program output (stdout/stderr)

Build Scripts

Script Description
npm run compile Type-check and build both bundles
npm run build Production build (minified, no source maps)
npm run watch Watch mode for development
npm run package Production build + package into .vsix
npm run check-types Type-check only (no emit)

How It Works

  1. Extension activates on VS Code startup and starts an HTTP server on localhost:45557
  2. MCP endpoint at /mcp uses the Streamable HTTP transport protocol — each client gets its own session
  3. Auto-config writes the server URL to ~/.claude.json so Claude Code discovers it automatically
  4. Debug commands are forwarded to the VS Code debug API via an in-process DirectClient
  5. DAP message interception captures stopped events, program output, and exit codes in real-time
  6. Execution commands (continue, step) block until the debugger pauses, then automatically gather the stop location and local variables

Security

  • HTTP server binds to 127.0.0.1 only (no network exposure)
  • MCP endpoint uses the standard Streamable HTTP transport protocol
  • Port file (for legacy stdio transport) includes random auth token and PID for stale-file detection

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选