IntelliJ IDEA变更列表MCP服务器
一个充当模型上下文协议(MCP)服务器的IntelliJ IDEA插件。它通过HTTP将当前活动更改列表中的文件暴露给MCP客户端。
特性
- 暴露
get_active_changelist工具。 - 返回活动更改列表中已修改文件的相对文件路径。
- 跨多个打开的项目工作(聚合所有打开窗口的更改)。
- HTTP服务器在端口上运行
10101.
安装
从源代码构建
- 克隆此存储库。
- 跑
./gradlew buildPlugin构建插件。
- 输出位置: build/distributions/idea-changelist-mcp-1.1.0.zip
- 在IntelliJ IDEA中:
Settings>Plugins> ⚙️ 齿轮图标>Install Plugin from Disk.... - 选择生成的ZIP文件。
- 重新启动IDEA.
配置
MCP服务器运行在 超文本传输协议 在 http://localhost:10101/mcp.
克劳德桌面(配置)
将以下内容添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"idea-changelist-mcp": {
"url": "http://localhost:10101/mcp"
}
}
}克劳德代码(CLI)
运行以下命令:
claude mcp add --transport http idea-changelist-mcp http://localhost:10101/mcp用法
- 打开IntelliJ IDEA并打开您的项目。
- 通知: MCP Server Started: Listening on port 10101.
- 开始使用您的MCP客户端(克劳德桌面或克劳德代码)。
- 服务器在以下位置监听JSON-RPC 2.0请求
http://localhost:10101/mcp.
API示例(手动测试)
列出工具:
curl -X POST -d '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}' http://localhost:10101/mcp获取活动变更列表:
curl -X POST -d '{"jsonrpc": "2.0", "method": "tools/call", "params": {"name": "get_active_changelist"}, "id": 1}' http://localhost:10101/mcp许可证
麻省理工学院
