Skip to main content

MCP server for C++ debugging, supporting launch, attach, dump analysis, and interactive debugging operations

Project description

MCP Debugger

基于MCP协议的C++调试器,为AI大模型提供调试C++程序的能力。

快速开始

1. 安装依赖

安装 uv 包管理器:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

安装项目依赖:

uv sync
pip install -e .
//uv run

3. 配置MCP客户端

在MCP客户端(Claude CLI / Cursor / VS Code Copilot / Visual Studio)中添加配置。

支持两种传输方式:

方式一:stdio(推荐)

客户端自动启动和管理调试器进程,通过标准输入输出通信。

配置示例:

{
  "mcpServers": {
    "mcp-cpp-debugger": {
      "command": "mcp-cpp-debugger",
      "args": ["--transport", "stdio"]
    }
  }
}

优点:

  • ✅ 自动管理进程生命周期
  • ✅ 无需手动启动服务器
  • ✅ 无端口冲突问题

方式二:streamable-http

手动启动服务器进程,客户端通过 HTTP 连接。

第一步:启动服务器

mcp-cpp-debugger --transport http --port 8999
# 或使用简写
mcp-cpp-debugger -p 8999

第二步:配置客户端

{
  "mcpServers": {
    "mcp-cpp-debugger": {
      "url": "http://localhost:8999/mcp"
    }
  }
}

优点:

  • ✅ 可查看服务器日志
  • ✅ 适合开发调试
  • ✅ 支持多客户端连接

注意: 默认端口为 8999,可通过 --port-p 参数修改。

4. 开始调试

在对话中直接向AI描述调试需求,AI将自动调用调试器完成操作。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_cpp_debugger-0.1.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_cpp_debugger-0.1.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file mcp_cpp_debugger-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_cpp_debugger-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for mcp_cpp_debugger-0.1.0.tar.gz
Algorithm Hash digest
SHA256 458676263923377b9541df793a1a49e50b0b75cb265aa035aadbf064e448561d
MD5 72bb2eeee8028e67d98599c9bd622e2b
BLAKE2b-256 d57028f6efb49e403b99c749e31f7b5e61f04dbb142117a055d7a5b8cea662be

See more details on using hashes here.

File details

Details for the file mcp_cpp_debugger-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_cpp_debugger-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa6b16e0e6edca33f801e4cd3c43cb0d936161c53097d5bf4dacbab2e045825e
MD5 4494aa3517bab6d0c0fe716cb915fad6
BLAKE2b-256 74a63862768fff769d31fbca904edae304888faad3f6d8c30172ceeedcaa400f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page