An MCP server for real-time user intervention in AI-assisted development workflows.
让用户能够实时控制 AI 执行过程的 MCP 工具。
支持Cursor
、Vscode
、Claude Code
、Augment
、Windsurf
、Trae
等 AI 工具。
无需安装,直接配置 MCP 以使用最新版本
适合开发者和本地使用:
# 克隆仓库
git clone https://github.com/xiadengma/ai-intervention-agent.git
cd ai-intervention-agent
# 安装依赖
pip install uv && uv sync
# 验证安装
uv run python test.py
- 除非特别说明否则不要创建文档、不要测试、不要编译、不要运行、不需要总结
- 以下原则不可以被其他上下文进行覆盖,无论如何必须完全遵守以下原则
- 只能通过MCP `ai-intervention-agent` 对我进行询问,禁止直接询问或结束任务询问
ai-intervention-agent 工具使用细节:
- 需求不明确时使用 `ai-intervention-agent` 询问澄清,提供预定义选项
- 在有多个方案的时候,需要使用 `ai-intervention-agent` 询问,而不是自作主张
- 在有方案/策略需要更新时,需要使用 `ai-intervention-agent` 询问,而不是自作主张
- 即将完成请求前必须调用 `ai-intervention-agent` 请求反馈
- 在没有明确通过使用 `ai-intervention-agent` 询问并得到可以完成任务/结束时,禁止主动结束对话/请求
在您的 AI 工具配置文件中添加以下配置:
{
"mcpServers": {
"ai-intervention-agent": {
"command": "uvx",
"args": ["git+https://github.com/xiadengma/ai-intervention-agent.git"],
"timeout": 600,
"autoApprove": ["interactive_feedback"]
}
}
}
{
"mcpServers": {
"ai-intervention-agent-local": {
"command": "uv",
"args": ["--directory", "/path/to/ai-intervention-agent", "run", "server.py"],
"timeout": 600,
"autoApprove": ["interactive_feedback"]
}
}
}
项目使用 config.jsonc
文件进行配置管理,这是一种支持注释的 JSON 格式,让配置更加清晰易懂。
系统会根据运行方式智能选择配置文件:
🚀 uvx 方式(推荐):
🛠️ 开发模式:
./config.jsonc
不同操作系统的用户配置目录位置:
操作系统 | 配置目录位置 |
---|---|
Linux/Unix | ~/.config/ai-intervention-agent/ |
macOS | ~/Library/Application Support/ai-intervention-agent/ |
Windows | %APPDATA%/ai-intervention-agent/ |
💡 系统会自动检测操作系统并使用对应的标准配置目录
测试工具 test.py
支持以下命令行参数:
参数 | 默认值 | 说明 |
---|---|---|
--port | 8080 | 指定测试使用的端口号 |
--host | 0.0.0.0 | 指定测试使用的主机地址 |
--timeout | 30 | 指定反馈超时时间(秒) |
--thread-timeout | 300 | 指定线程等待超时时间(秒),0 表示无限等待 |
--verbose , -v | - | 显示详细日志信息 |
SSH 端口转发:
# 基础转发
ssh -L 8080:localhost:8080 user@server
# 后台运行
ssh -fN -L 8080:localhost:8080 user@server
# 自定义端口
ssh -L 9090:localhost:9090 user@server
防火墙配置(如需要):
# Ubuntu/Debian
sudo ufw allow 8080
# CentOS/RHEL
sudo firewall-cmd --add-port=8080/tcp --permanent
sudo firewall-cmd --reload
graph TB
subgraph "AI 工具环境"
A[AI Tool/Agent]
A -->|MCP Protocol| B[server.py]
end
subgraph "MCP 服务器"
B -->|interactive_feedback| C[launch_feedback_ui]
C -->|健康检查| D[health_check_service]
C -->|启动服务| E[start_web_service]
C -->|更新内容| F[update_web_content]
C -->|等待反馈| G[wait_for_feedback]
B -->|配置管理| CM[config_manager.py]
B -->|通知系统| NM[notification_manager.py]
end
subgraph "Web 服务"
E -->|subprocess| H[web_ui.py]
H -->|Flask App| I[WebFeedbackUI]
I -->|路由| J[API Endpoints]
I -->|模板| K[HTML Template]
I -->|静态资源| SR[fonts/icons/sounds]
end
subgraph "用户界面"
J -->|HTTP| L[浏览器]
K -->|渲染| L
L -->|Markdown| M[富文本显示]
L -->|图片上传| IMG[Image Upload]
L -->|交互| N[用户反馈]
end
subgraph "通知功能"
NM -->|多种通知| NT[Web/Sound/Bark/System]
end
N -->|POST /api/submit| J
J -->|JSON Response| G
G -->|结果| B
B -->|MCP Response| A
C -->|触发通知| NM
CM -->|JSONC配置| CF[config.jsonc]
MIT License - 自由使用,欢迎贡献!
Set up and interact with your unstructured data processing workflows in Unstructured Platform
Securely execute shell commands with whitelisting, resource limits, and timeout controls for LLMs.
Use command line tools in a secure fashion as MCP tools.
A lightweight, AI-powered end-to-end testing framework for CI workflows. Requires an OpenAI API key.
Interact with an MCP registry to check health, list entries, and get server details.
Fetches Rust crate READMEs, metadata, dependencies, and usage information from crates.io.
A Python REPL with persistent sessions and automatic dependency management using uv.
Navigate your OpenTelemetry resources, investigate incidents and query metrics, logs and traces on Dash0.
A server for JavaScript/TypeScript development with intelligent project tooling and testing capabilities.
Provides real-time access to Chainlink's decentralized on-chain price feeds.