MCP调试工具 标志

MCP调试工具

社区
hwanyong

VSCode extension and CLI tool for MCP-based debugging with DAP protocol support

发布者hwanyong
代码仓库mcp-debug-tools
语言TypeScript
复刻数
8
星标数
24
可用工具
0
传输类型stdio, streamable-http
分类
许可协议GPL-3.0
链接
  • 将工具接入 AI 工作流

    MCP调试工具 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 24 个 Star 和 8 个 Fork。

MCP Debug Tools

The bridge between AI Agents and VS Code Debugger — Let your AI assistant set breakpoints, step through code, and inspect variables in real-time.

VS Code Marketplace npm

Why MCP Debug Tools?

Traditional AI coding assistants can read and write code, but they can't debug it. MCP Debug Tools removes this limitation by giving AI agents direct access to VS Code's debugger through simple CLI commands.

Without MCP Debug ToolsWith MCP Debug Tools
AI guesses at bugs from code readingAI sets breakpoints and inspects live runtime state
"Try adding a console.log here"AI steps through code line-by-line automatically
Manual copy-paste of error messagesAI reads call stacks and variable values as JSON

💡 Direct CLI Control — Works Without MCP Connection

Beyond the standard MCP proxy, you can execute debugging actions via one-off terminal commands — no persistent connection required.

  • Terminal AI Friendly: Shell-based AI agents interact with the debugger directly
  • Zero Connection Overhead: No need to configure or maintain an MCP server connection
  • Easy Parsing: Results in pure JSON (stdout), logs separated to stderr — AI parses instantly
  • Scriptable: Integrate VS Code debugging into automated bash scripts seamlessly
bash
# Discover all available tools
npx @uhd_kr/mcp-debug-tools list

# Execute tools directly
npx @uhd_kr/mcp-debug-tools call add-breakpoint '{"file": "src/app.ts", "line": 15}'
npx @uhd_kr/mcp-debug-tools call step-over

🚀 What's New in v1.0.0

🤖 AI Agent Skill Auto-Injection

The extension now automatically injects skill documents into your workspace when activated, so AI agents can discover and use debugging tools without any manual configuration.

AI PlatformAuto-detected PathStatus
Gemini (Google).gemini/skills/dap-cli-debugging/SKILL.md✅ Supported
Claude Code (Anthropic).claude/skills/dap-cli-debugging/SKILL.md✅ Supported

🔌 Offline CLI Support

Run the CLI directly from the VS Code extension's install path — no internet or npx required.

bash
# macOS / Linux
node ~/.vscode/extensions/uhd.mcp-debug-tools-*/out/cli.js call get-active-session

# Windows (PowerShell)
node "$env:USERPROFILE\.vscode\extensions\uhd.mcp-debug-tools-*\out\cli.js" call get-active-session

📖 Comprehensive Tool Documentation

All 29 debugging tools are now fully documented in the auto-injected skill file, organized by category with parameters and usage examples.

⚠️ Beta Testing

Currently in beta testing. Please report any issues or feedback.

Contact: yoo.hwanyong@gmail.com

🎯 Key Features

Debug Control

  • Breakpoint Management: Add/remove conditional breakpoints, bulk operations
  • Execution Control: Start/stop debug, continue/pause, Step Into/Over/Out
  • Variable Inspection: Check values, evaluate expressions, scope analysis
  • Stack Tracing: Call stack, thread management, exception information

Auto-Connection System

  • Automatic VSCode instance discovery and connection
  • Multiple VSCode windows support
  • Workspace-based configuration management
  • Real-time heartbeat monitoring

📦 Installation

1. VSCode Extension (Required)

Provides debugging capabilities as a server in VSCode.

Method 1: VSCode Marketplace

1. Open VSCode Extensions tab (Ctrl+Shift+X)
2. Search for "MCP Debug Tools"
3. Click Install

Method 2: Direct Link

Method 3: Download Link

2. CLI Tool

Client that connects AI tools with VSCode.

bash
# Run directly with npx (no installation needed)
npx @uhd_kr/mcp-debug-tools

🔧 Configuration

MCP Setup (Cursor/Windsurf)

Add to mcp.json or configuration file:

json
{
  "mcpServers": {
    "dap-proxy": {
      "command": "npx",
      "args": ["-y", "@uhd_kr/mcp-debug-tools@latest"],
      "env": {}
    }
  }
}

CLI Options

bash
# Auto-connect (recommended)
npx @uhd_kr/mcp-debug-tools

# Specify port
npx @uhd_kr/mcp-debug-tools --port=8891

# Disable auto-discovery
npx @uhd_kr/mcp-debug-tools --no-auto

Local Path Fallback (When npx is unavailable)

If npx is unavailable (e.g., offline environment, network restrictions), you can run the CLI directly from the VS Code extension's install directory.

macOS / Linux:

bash
node ~/.vscode/extensions/uhd.mcp-debug-tools-*/out/cli.js <command> [args]

Windows (PowerShell):

powershell
node "$env:USERPROFILE\.vscode\extensions\uhd.mcp-debug-tools-*\out\cli.js" <command> [args]

Windows (CMD):

cmd
node "%USERPROFILE%\.vscode\extensions\uhd.mcp-debug-tools-*\out\cli.js" <command> [args]

Tip: If you installed mcp-debug-tools globally via npm install -g @uhd_kr/mcp-debug-tools, you can simply run mcp-debug-tools <command> directly without npx.

🛠️ Supported Features

MCP Tools (Executable Commands)

Breakpoint Management

  • add-breakpoint - Add breakpoint with conditional support
  • add-breakpoints - Add multiple breakpoints at once
  • remove-breakpoint - Remove specific breakpoint
  • clear-breakpoints - Clear all/specific file breakpoints
  • list-breakpoints - List all breakpoints

Debug Control

  • start-debug - Start debug session
  • stop-debug - Stop debug session
  • continue - Continue execution
  • step-over - Step over line
  • step-into - Step into function
  • step-out - Step out of function
  • pause - Pause execution

State Inspection

  • get-debug-state - Debug session state
  • evaluate-expression - Evaluate expression
  • inspect-variable - Variable details
  • get-variables-scope - All variables in scope
  • get-call-stack - Call stack information
  • get-thread-list - Thread list
  • get-exception-info - Exception information

Configuration Management

  • list-debug-configs - List launch.json configurations
  • select-debug-config - Select debug configuration

Workspace Management

  • select-vscode-instance - Select VSCode instance
  • list-vscode-instances - List active instances
  • get-workspace-info - Workspace information

MCP Resources (Read-only Information)

  • dap-log://current - DAP protocol message log
  • debug://breakpoints - Current breakpoint information
  • debug://active-session - Active debug session info
  • debug://console - Debug console output
  • debug://call-stack - Call stack information
  • debug://variables-scope - Variable scope information

🏗️ Architecture

┌─────────────┐    HTTP    ┌─────────────┐    stdio   ┌─────────────┐
│   VSCode    │ ◄────────► │  CLI Tool   │ ◄────────► │ AI Tool     │
│  Extension  │   (8890)   │             │            │ (Cursor)    │
└─────────────┘            └─────────────┘            └─────────────┘

Auto-Connection Mechanism

  1. Workspace Config: .mcp-debug-tools/config.json - Stores VSCode connection info
  2. Global Registry: ~/.mcp-debug-tools/active-configs.json - Tracks all active instances
  3. Heartbeat: 5-second interval liveness updates
  4. PID Verification: Process status checking

🚀 Getting Started

  1. Install VSCode Extension
  2. Open project in VSCode
  3. Add to AI tool's MCP configuration
  4. Use debugging commands in AI tool

💡 Common Use Cases

1. Finding and Fixing Bugs

Ask your AI assistant to help debug your code:

"There's an error in my calculateTotal function. Can you set breakpoints
at the start of the function and step through to find the issue?"

The AI will:

  • Set breakpoints in the problematic function
  • Start debug session
  • Step through code line by line
  • Inspect variables to identify the bug
  • Suggest fixes based on the debugging data

2. Understanding Complex Code Flow

When exploring unfamiliar codebases:

"I need to understand how the authentication flow works. Can you trace
through the login process step by step?"

The AI will:

  • Identify key authentication functions
  • Set strategic breakpoints
  • Run through the authentication flow
  • Explain each step with actual runtime data
  • Show how data transforms through the process

3. Validating Data Processing

For data transformation pipelines:

"Please verify that my data transformation pipeline correctly processes
the input array and produces the expected output format"

The AI will:

  • Set breakpoints at transformation stages
  • Inspect input data structure
  • Monitor data changes at each step
  • Validate output against requirements
  • Identify any data integrity issues

4. Performance Bottleneck Detection

Finding performance issues:

"My application is running slowly. Can you help identify which functions
are taking the most time during execution?"

The AI will:

  • Set breakpoints at function entry/exit points
  • Monitor execution flow
  • Identify functions called frequently
  • Suggest optimization opportunities
  • Highlight potential bottlenecks

5. Exception Handling Analysis

Debugging runtime errors:

"My app crashes with an unhandled exception. Can you catch it and show
me the exact state when it occurs?"

The AI will:

  • Monitor for exceptions
  • Capture exception details and stack trace
  • Show variable states at crash point
  • Analyze the root cause
  • Suggest error handling improvements

6. Test-Driven Debugging

Debugging failing tests:

"My unit test is failing. Can you debug the test execution and show me
why the assertion fails?"

The AI will:

  • Run tests in debug mode
  • Break at test assertions
  • Compare expected vs actual values
  • Trace back to the source of discrepancy
  • Suggest test or code fixes

🤖 AI Agent Integration Guide

Using MCP Debug Tools with AI Assistants

For AI developers and users who want to leverage MCP Debug Tools in their AI-powered development workflows, we provide a comprehensive rules document that helps AI agents use these debugging tools effectively.

MCP_DEBUG_TOOLS_RULES.md

This document contains essential guidelines and patterns for AI agents to:

  • Understand the proper sequence of debugging operations
  • Handle common debugging scenarios efficiently
  • Recover from errors gracefully
  • Follow best practices for performance and safety

How to Use

  1. For AI Tool Users (Cursor, Windsurf, etc.)

    • Include the rules document in your AI assistant's context when debugging
    • Copy relevant sections from MCP_DEBUG_TOOLS_RULES.md into your prompts
    • Example prompt:
      I need to debug my Node.js application. Please follow the MCP Debug Tools
      rules for proper tool sequencing and error handling.
      [Paste relevant sections from MCP_DEBUG_TOOLS_RULES.md]
  2. For Custom AI Agent Development

    • Use the rules document as a reference for implementing debugging workflows
    • Incorporate the sequential operation patterns into your agent's logic
    • Follow the error recovery strategies for robust debugging automation
  3. Key Sections to Reference

    • Prerequisites Check: Ensure environment is ready before debugging
    • Tool Categories: Understand the 5 main tool categories and their purposes
    • Sequential Operations: Follow the proper order of debugging operations
    • Common Workflows: Pre-built patterns for typical debugging scenarios
    • Error Recovery: Handle failures and recover gracefully

Benefits of Following the Rules

  • ✅ Reduced Errors: Proper tool sequencing prevents common mistakes
  • ✅ Efficient Debugging: Optimized workflows save time and resources
  • ✅ Better AI Assistance: AI can provide more accurate debugging help
  • ✅ Consistent Results: Standardized patterns ensure reliable outcomes

Example AI-Assisted Debugging Session

User: "Help me find why my function returns undefined"

AI (using rules):
1. First, I'll check available VSCode instances (list-vscode-instances)
2. Set a breakpoint at the function start (add-breakpoint)
3. Start debug session (start-debug)
4. When paused, inspect all variables (get-variables-scope)
5. Step through to find where undefined is introduced (step-over)
6. Suggest the fix based on findings

For the complete rules and patterns, see MCP_DEBUG_TOOLS_RULES.md

📊 Current Limitations

  • Real-time sync limited by MCP protocol constraints

🔮 Future Plans

  • Remote debugging
  • Performance profiling tools

🐛 Troubleshooting

CLI Can't Find VSCode

  1. Verify VSCode Extension is active
  2. Check .mcp-debug-tools/config.json exists
  3. Try manual connection with --port option

Multiple VSCode Windows

  • CLI auto-selects based on current directory
  • Use list-vscode-instances to check active instances
  • Use select-vscode-instance to choose specific instance

📄 License

GNU General Public License v3.0 - LICENSE

🤝 Contributing

Issues and Pull Requests welcome!

📚 References


Enjoy debugging with AI! 🚀

安装

TypingMind
{
  "mcpServers": {
    "mcp-debug-tools": {
      "command": "npx",
      "args": [
        "-y",
        "@uhd_kr/mcp-debug-tools",
        "--port=8890"
      ]
    }
  }
}

将 MCP调试工具 MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 MCP调试工具 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 您可以在自己的设备上本地运行 MCP,也可以通过 URL 连接远程 MCP 服务器。

方式 1:使用本地连接器

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 MCP调试工具 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 MCP调试工具 MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "mcp-debug-tools": {
      "command": "npx",
      "args": [
        "-y",
        "@uhd_kr/mcp-debug-tools"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 MCP调试工具 MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 MCP调试工具 MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 MCP调试工具 帮我完成这项任务吗?
MCP调试工具
当然。我已阅读。
以下是我使用 MCP调试工具 得到的结果。

方式 2:添加 MCP 服务器 URL

如果 MCP调试工具 已托管在远程服务器上,或您的团队希望让多个用户共用一个连接器,请选择此方式。

1

打开 MCP 连接器

在 TypingMind 中,前往“插件”,打开“MCP 连接器”,然后选择“添加 URL”。

  1. 在您的浏览器中打开 TypingMind。
  2. 进入“插件”。
  3. 打开“MCP 连接器”。
  4. 点击“添加 URL”。
TypingMind 的“添加自定义 MCP 服务器 URL”表单
2

粘贴服务器 URL

在“服务器 URL”字段中输入 提供商提供的 MCP 服务器 URL。根据服务器要求,添加连接名称、描述、图标、自定义 HTTP 请求头或 OAuth 客户端设置。

  1. 将 提供商提供的 MCP 服务器 URL 粘贴到“服务器 URL”字段中。
  2. 为 MCP调试工具 输入连接名称。
  3. 您可以添加描述和图标,以便更容易识别此连接。
  4. 如果服务器需要身份验证,请添加自定义 HTTP 请求头或 OAuth 客户端信息。
3

创建连接

点击“创建连接”,然后返回插件列表,确认新的 MCP 连接显示为“有效”。

  1. 点击“创建连接”。
  2. 返回 MCP 连接器列表。
  3. 确认 MCP调试工具 连接显示为“有效”。
  4. 如果连接未立即出现,请刷新插件列表。
4

切换模型,无需重新连接

使用您偏好的模型开始聊天,在“插件”中启用 MCP调试工具 工具,并根据需要随时切换到其他模型。该 MCP 连接在 TypingMind 工作区中仍然可用。

  1. 在 TypingMind 中开始新聊天。
  2. 选择您想使用的 AI 模型。
  3. 在“插件”中启用 MCP调试工具 工具。
  4. 需要时,请让模型使用该工具。
  5. 切换到其他 AI 模型,继续使用同一个 MCP 连接。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 MCP调试工具 帮我完成这项任务吗?
MCP调试工具
当然。我已阅读。
以下是我使用 MCP调试工具 得到的结果。

常见问题

MCP调试工具 MCP 服务器有什么用途?

MCP调试工具 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 MCP调试工具 MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 MCP调试工具,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 MCP调试工具 MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 MCP调试工具 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 MCP调试工具 MCP 连接到 TypingMind?

您可以通过本地 MCP 连接器,或添加远程 MCP 服务器 URL,在 TypingMind 中连接 MCP调试工具。当服务器需要访问您设备上的文件、应用或私有资源时,请使用本地连接器;当 MCP 服务器托管在远程时,请使用服务器 URL。

MCP调试工具 MCP 在 TypingMind 中提供哪些工具?

MCP调试工具 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 MCP调试工具 MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 MCP调试工具 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇