AI Agent 与 JetBrains IDE 的桥接工具:获取光标代码上下文、诊断运行报错、执行脚本、推送 Diff 修改供开发者审批。
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
AI Agent 与 JetBrains IDE 的桥接工具。让 AI 助手获取光标代码上下文、诊断运行报错、执行脚本、推送 Diff 修改供开发者审批。
| 功能 | 说明 |
|---|---|
| 代码上下文 | 获取光标位置、选中内容、附近代码(editor.get_context) |
| 诊断报错 | 编辑器静态错误 + Run 窗口报错信息(diagnostics.get_all) |
| 脚本运行 | 在 IDE 中运行脚本,捕获完整输出(run.start) |
| Diff 审批 | 推送代码修改,开发者确认后生效(diff.apply) |
| 终端交互 | 发送命令到 IDE 终端(Terminal API) |
| 文件操作 | 打开/列出/保存关闭文件(file.list_open / file.open) |
DWAI-1.0.0.zip编译产物在 build/distributions/DWAI-1.0.0.zip
DWAI 通过 MCP 协议与 AI Agent 通信。AI Agent 需要将 DWAI 注册为 MCP 服务器才能发现和使用工具。
在配置文件 ~/.hermes/config.yaml 中添加:
或通过命令行注册:
在 claude_desktop_config.json 中添加:
在 Cursor 设置中启用 MCP 服务器,地址填:
配置完成后,AI Agent 即可通过 MCP 调用 DWAI 的所有工具:
返回应包含 10 个工具:editor.get_context、diagnostics.get_all、run.start、diff.apply 等。
插件安装后自动在 127.0.0.1:8765 启动 HTTP + MCP 服务。
AI Agent 可直接通过 MCP JSON-RPC 协议调用:
可用工具列表:
| 工具 | 参数 | 说明 |
|---|---|---|
editor.get_context | radius (默认 20) | 获取光标位置 + 选中 + 附近代码 + 项目信息 |
diagnostics.get_all | — | 编辑器静态错误 + 运行报错摘要 |
diagnostics.get_full_output | — | Run 窗口完整输出 |
editor.insert | text | 在光标处插入代码 |
run.start | file_path | 在 IDE 中运行脚本(非阻塞) |
diff.apply | files:[{path, modified, description, skip_review}] | 推送代码修改供审批 |
diff.get_pending | — | 查询待审批的 diff |
file.list_open | — | 列出 IDE 中打开的文件 |
file.open | file_path, line | 在 IDE 中打开文件 |
file.save_close | paths (可选) | 保存并关闭文件 |
diff.apply 推送修改
提示: 测试文件、调试脚本等非核心修改可设置 skip_review: true 跳过审批。
| 变量 | 默认值 | 说明 |
|---|---|---|
DWAI_PORT | 8765 | HTTP 服务端口 |
MIT
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/dwai-ide-bridge)<a href="https://allmcps.com/mcp/dwai-ide-bridge"><img src="https://allmcps.com/api/badge/dwai-ide-bridge?style=directory" alt="DWAI IDE Bridge on AllMCPs" /></a>