windbg mcp服务器
用于Wingey调试集成的MCP服务器。使AI助手能够通过DbgEng分析崩溃转储和调试实时进程。
需求
- Windows 10/11
- Windows调试工具 (Windows SDK)
- 锈1.85+(2024年版)
构建
# Standard build (stdio transport only)
cargo build --release
# With HTTP transport support
cargo build --release --features http用法
stdio(默认)
# Add to Claude Code
claude mcp add windbg /path/to/windbg-mcp-server.exe
# Permissive mode (enables memory writes, execution control)
claude mcp add-json windbg '{"command":"/path/to/windbg-mcp-server.exe","args":["--permissive"]}'HTTP(需要 http 特征)
# Stateful — sessions persist across requests
windbg-mcp-server --http --port 8080
# Stateless — each request is independent, direct JSON responses
windbg-mcp-server --http --stateless --port 8080
# Both modes support --permissive
windbg-mcp-server --http --port 8080 --permissive工具
| 工具 | 说明 |
|---|---|
open_dump | 开放式紧急倾卸区(.dmp) |
attach_process | 附加到实时进程 |
connect_remote | 连接到远程Wingey服务器 |
detach | 从会话中分离 |
list_sessions | 列出活动会话 |
execute | 运行Winchester命令 |
analyze | 快跑 !analyze -v |
get_stack_trace | 获取调用堆栈 |
list_threads | 列出线程 |
switch_thread | 切换线程上下文 |
list_modules | 列出已加载的模块 |
read_memory | 读取内存 |
search_memory | 在内存中搜索字节模式 |
write_memory | 写入内存\* |
resolve_symbol | 将符号解析为地址,反之亦然 |
get_type_info | 获取类型布局信息 |
disassemble | 反汇编代码 |
get_registers | 获取CPU寄存器 |
set_breakpoint | 设置断点\* |
remove_breakpoint | 删除断点\* |
go | 继续执行\* |
step | 单步执行\* |
break_execution | 闯入调试器\* |
load_script | 加载JavaScript调试脚本 |
unload_script | 卸载脚本 |
run_script | 加载、执行和卸载脚本 |
invoke_script | 从加载的脚本调用函数 |
eval | 计算JavaScript表达式(dx) |
list_scripts | 列出加载的脚本 |
\*需要 --permissive 旗帜
提示
预构建的调试工作流程,指导助手完成多步骤分析:
| 提示 | 描述 |
|---|---|
crash_triage | 打开一个垃圾场,快跑!分析、检查线程和模块,总结根本原因 |
thread_analysis | 枚举线程,检查死锁,分析锁争用 |
memory_investigation | 检查堆状态,搜索损坏模式,分析可疑地址 |
远程调试
要连接到远程Wingey会话,请执行以下操作:
- 在Winchester中启动调试服务器:
.server tcp:port=5005- 使用
connect_remote使用连接字符串:
tcp:server=hostname,port=5005安全
默认情况下,危险操作被禁用。使用 --permissive 以使他们能够。
| 操作 | 默认 | 允许 |
|---|---|---|
| 内存写入 | 已禁用 | 已启用 |
| 注册写入 | 已禁用 | 已启用 |
| 执行控制 | 已禁用 | 已启用 |
| 实时附加 | 已启用 | 已启用 |
| 命令执行 | 启用(部分被阻止) | 启用(全部) |
许可证
麻省理工学院
