Логотип 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
Посилання
  • Підключайте інструменти до робочих процесів із ШІ

    MCP调试工具 надає можливості MCP, які можуть використовувати сумісні клієнтські ШІ-застосунки та агенти.

  • Доступні інструменти: 0

    Перегляньте нижче дії, які можна викликати, з назвами й описами, якщо сервер їх надає.

  • Готова конфігурація для копіювання

    Скористайтеся прикладами конфігурації, щоб налаштувати цей сервер у вибраному клієнті MCP.

  • Показники інтересу до відкритого коду

    Зірки: 24, форки: 8 — у пов’язаному репозиторії.

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调试工具 з різними моделями ШІ

TypingMind підключає інструменти MCP на рівні робочого простору, тож після підключення MCP调试工具 ви можете використовувати їх із різними моделями ШІ в TypingMind, а не налаштовувати окремо для кожної моделі. Ви можете запустити MCP локально на своєму пристрої або підключитися до віддаленого сервера MCP за URL.

Варіант 1: використовуйте локальний конектор

Виберіть цей варіант, якщо серверу MCP потрібен доступ до локальних файлів, програм або приватних ресурсів на вашому комп’ютері.

1

Відкрийте налаштування MCP

У TypingMind перейдіть до розділу «Налаштування», відкрийте «Розширені налаштування», потім «Протокол контексту моделі» й виберіть «Параметри конектора».

  1. Відкрийте TypingMind у браузері.
  2. Натисніть значок налаштувань.
  3. Перейдіть до розділу «Розширені налаштування».
  4. Відкрийте розділ «Протокол контексту моделі».
  5. Натисніть «Параметри конектора» й виберіть «Цей пристрій».
Екран налаштування конектора MCP у TypingMind з вибраним варіантом «Цей пристрій»
2

Виконайте команду конектора

Виберіть «Цей пристрій», скопіюйте команду з TypingMind і виконайте її в терміналі. Не зупиняйте процес, поки користуєтеся MCP.

  1. Скопіюйте команду налаштування, показану в TypingMind.
  2. Відкрийте «Термінал» у macOS або Windows Terminal у Windows.
  3. Вставте й виконайте команду.
  4. Підтвердьте встановлення пакета, якщо термінал запитає дозволу продовжити.
  5. Не закривайте вікно термінала й не зупиняйте процес, поки користуєтеся інструментами MCP.
3

Додайте MCP调试工具 як сервер

Коли статус конектора зміниться на «Готово», натисніть «Змінити сервери» та вставте конфігурацію сервера MCP.

  1. Зачекайте, доки статус конектора зміниться на «Готово».
  2. Натисніть «Змінити сервери».
  3. Вставте конфігурацію сервера MCP MCP调试工具.
  4. Збережіть список серверів.
  5. Оновіть дані, щоб переконатися, що конектор досі готовий до роботи.
Налаштування MCP у TypingMind з активним сервером і кнопкою «Змінити сервери»
{
  "mcpServers": {
    "mcp-debug-tools": {
      "command": "npx",
      "args": [
        "-y",
        "@uhd_kr/mcp-debug-tools"
      ]
    }
  }
}
4

Використовуйте підключення з різними моделями

Збережіть список серверів, відкрийте «Плагіни», увімкніть інструменти MCP для MCP调试工具, а потім виберіть будь-яку підтримувану модель ШІ в TypingMind і використовуйте інструменти в чаті або призначте їх агенту ШІ.

  1. Відкрийте сторінку «Плагіни» в TypingMind.
  2. Увімкніть інструменти MCP для MCP调试工具.
  3. Почніть чат і виберіть модель ШІ, яку хочете використовувати.
  4. Використовуйте інструменти MCP у чаті або призначте їх агенту ШІ.
  5. За потреби перемикайтеся на іншу модель ШІ без повторного підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через MCP调试工具?
MCP调试工具
Звісно. Я це прочитав.
Ось що я знайшов за допомогою MCP调试工具.

Варіант 2: додайте URL сервера MCP

Виберіть цей варіант, якщо MCP调试工具 уже розміщено віддалено або вашій команді потрібен один спільний конектор для кількох користувачів.

1

Відкрийте конектори MCP

У TypingMind перейдіть до розділу «Плагіни», відкрийте «Конектори MCP» і виберіть «Додати URL».

  1. Відкрийте TypingMind у браузері.
  2. Перейдіть до розділу «Плагіни».
  3. Відкрийте конектори MCP.
  4. Натисніть «Додати URL».
Форма «Додати URL власного сервера MCP» у TypingMind
2

Вставте URL сервера

Введіть URL сервера MCP від постачальника у поле «URL сервера». Додайте назву підключення, опис, значок, власні HTTP-заголовки або налаштування клієнта OAuth, якщо сервер їх потребує.

  1. Вставте URL сервера MCP від постачальника у поле «URL сервера».
  2. Введіть назву підключення для MCP调试工具.
  3. Додайте опис і значок, щоб було легше впізнати підключення.
  4. Додайте власні HTTP-заголовки або дані клієнта OAuth, якщо сервер потребує автентифікації.
3

Створіть підключення

Натисніть «Створити підключення», потім поверніться до списку плагінів і переконайтеся, що нове підключення MCP активне.

  1. Натисніть «Створити підключення».
  2. Поверніться до списку конекторів MCP.
  3. Переконайтеся, що підключення MCP调试工具 відображається як активне.
  4. Оновіть список плагінів, якщо підключення не з’явилося одразу.
4

Перемикайте моделі без повторного підключення

Почніть чат із бажаною моделлю, увімкніть інструменти MCP调试工具 у розділі «Плагіни» й за потреби перемикайтеся на іншу модель. Підключення MCP залишається доступним у робочому просторі TypingMind.

  1. Почніть новий чат у TypingMind.
  2. Виберіть модель ШІ, яку хочете використовувати.
  3. Увімкніть інструменти MCP调试工具 у розділі «Плагіни».
  4. За потреби попросіть модель скористатися інструментом.
  5. Перемкніться на іншу модель ШІ й використовуйте те саме підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через MCP调试工具?
MCP调试工具
Звісно. Я це прочитав.
Ось що я знайшов за допомогою MCP调试工具.

Поширені запитання

Для чого використовується сервер MCP MCP调试工具?

MCP调试工具 — це сервер MCP, який дає змогу сумісним клієнтам ШІ підключатися до зовнішніх інструментів і контексту. У TypingMind ви можете додати цей сервер MCP один раз і зробити його інструменти доступними у своєму робочому просторі ШІ.

Чи можу я використовувати MCP MCP调试工具 з кількома моделями ШІ в TypingMind?

Так. TypingMind підключає інструменти MCP на рівні робочого простору, тому ви можете використовувати MCP调试工具 з різними моделями ШІ, як-от Claude, ChatGPT, Gemini або іншими моделями, які ви налаштували в TypingMind, без окремого налаштування сервера MCP для кожної моделі.

Навіщо використовувати MCP MCP调试工具 із TypingMind?

TypingMind — один із найкращих інтерфейсів для чату з великими мовними моделями, адже він об’єднує різні моделі ШІ, промпти, плагіни, агентів ШІ, ключі API та інструменти MCP в одному робочому просторі. Підключивши MCP调试工具, ви зможете використовувати його інструменти MCP з вибраними моделями та впорядковано працювати з чатами в TypingMind.

Як підключити MCP MCP调试工具 до TypingMind?

MCP调试工具 можна підключити в TypingMind через локальний конектор MCP або додавши URL віддаленого сервера MCP. Використовуйте локальний конектор, коли серверу потрібен доступ до файлів, застосунків або приватних ресурсів на вашому пристрої, а URL сервера — коли сервер MCP розміщено віддалено.

Які інструменти надає MCP MCP调试工具 у TypingMind?

MCP调试工具 надає можливості MCP, які можна ввімкнути на сторінці «Плагіни» в TypingMind і використовувати в чаті або призначати агентам ШІ.

Чи потрібно передавати свої ключі API в TypingMind, щоб використовувати MCP MCP调试工具?

Ні. TypingMind орієнтований насамперед на локальну роботу й дає змогу зберігати контроль над постачальниками моделей, ключами API, промптами та конфігурацією MCP. Якщо MCP调试工具 потребує автентифікації, під час створення підключення додайте потрібні заголовки, налаштування OAuth або локальну конфігурацію для цього сервера MCP.

Схожі сервери MCP

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇