AI Intervention Agent
When using AI CLIs/IDEs, agents can drift from your intent. This project gives you a simple way to intervene at key moments, review context in a Web UI, and send your latest instructions via interactive_feedback so the agent can continue on track.
Works with Cursor, VS Code, Claude Code, Augment, Windsurf, Trae, and more.
Quick start
Option 1: Using uvx (Recommended)
Configure your AI tool to launch the MCP server directly via uvx (this automatically installs and runs the latest version):
{
"mcpServers": {
"ai-intervention-agent": {
"command": "uvx",
"args": ["ai-intervention-agent"],
"timeout": 600,
"autoApprove": ["interactive_feedback"]
}
}
}Option 2: Using pip
First, install the package manually (please remember to manually
pip install --upgrade ai-intervention-agentperiodically to get updates):
pip install ai-intervention-agentConfigure your AI tool to launch the installed MCP server:
{
"mcpServers": {
"ai-intervention-agent": {
"command": "ai-intervention-agent",
"args": [],
"timeout": 600,
"autoApprove": ["interactive_feedback"]
}
}
}interactive_feedback is a long-running tool. Some clients have a hard request timeout, so the Web UI provides a countdown + auto re-submit option to keep sessions alive.
Default:
feedback.frontend_countdown=240secondsRange:
0(disabled) or[10, 3600]seconds. The default 240 stays under the common 300s session hard timeout; raise it intentionally when your client allows longer turns.
(Optional) Customize your config:
On first run,
config.tomlwill be created under your OS user config directory (see docs/configuration.md).Example:
[web_ui]
port = 8080
[feedback]
frontend_countdown = 240
backend_max_wait = 600- Only ask me through the MCP `ai-intervention-agent` tool; do not ask directly in chat or ask for end-of-task confirmation in chat.
- If a tool call fails, keep asking again through `ai-intervention-agent` instead of making assumptions, until the tool call succeeds.
ai-intervention-agent usage details:
- If requirements are unclear, use `ai-intervention-agent` to ask for clarification with predefined options.
- If there are multiple approaches, use `ai-intervention-agent` to ask instead of deciding unilaterally.
- If a plan/strategy needs to change, use `ai-intervention-agent` to ask instead of deciding unilaterally.
- Before finishing a request, always ask for feedback via `ai-intervention-agent`.
- Do not end the conversation/request unless the user explicitly allows it via `ai-intervention-agent`.Related MCP server: ai-intervention-agent
Screenshots
Key features
Real-time intervention: the agent pauses and waits for your input via
interactive_feedbackWeb UI: Markdown, code highlighting, and math rendering
Multi-task: tab switching with independent countdown timers
Auto re-submit: keep sessions alive by auto-submitting at timeout
Notifications: web / sound / system / Bark (loopback URLs auto-suppressed; LAN-IP suggestion surfaced in settings)
SSH / LAN friendly: works behind port forwarding; mDNS publishes a
<host>.localURL when the local network supports itServer self-info resource (
aiia://server/info): live runtime / fastmcp version / middleware chain / task-queue snapshot for cross-tool diagnosticsMCP-spec compliant (2025-11-25 protocol): tool annotations, server identity, and self-contained icons let ChatGPT Desktop / Claude Desktop / Cursor render the server natively without nagging "destructive operation" confirmations
Production-grade middleware:
ErrorHandling+RateLimiting(10 req/s, burst 20) +Timing+Loggingchain, with structuredtask.created/task.completedevents forwarded to the MCP client viactx.info
How it works
Your AI client calls the MCP tool
interactive_feedback.The MCP server ensures the Web UI process is running, then creates a task via HTTP (
POST /api/tasks).The browser (or VS Code Webview) renders the task using a dual-channel transport: SSE (
GET /api/events, withLast-Event-IDresume) for real-time updates, and HTTP polling as a safety net when SSE drops.When you submit feedback, the Web UI completes the task in the task queue.
The MCP server waits via SSE + a low-frequency HTTP poll (
GET /api/tasks/{task_id}), then returns your feedback (text + images) back to the AI client.Optionally, the MCP server triggers notifications (Bark / system / sound / web hints) based on your config. Bark URLs that resolve to loopback addresses are automatically suppressed and the Web UI surfaces a LAN-IP suggestion in the settings panel.
VS Code extension (optional)
Item | Value |
Purpose | Embed the interaction panel into VS Code’s sidebar to avoid switching to a browser. |
Install (Open VSX) | |
Download VSIX (GitHub Release) | |
Setting |
|
Other settings |
|
Configuration
Item | Value |
Docs (English) | |
Docs (简体中文) | |
Default template |
|
OS | User config directory |
Linux |
|
macOS |
|
Windows |
|
Architecture
flowchart TD
subgraph CLIENTS["AI clients"]
AI_CLIENT["AI CLI / IDE<br/>(Cursor, VS Code, Claude Code, ...)"]
end
subgraph MCP_PROC["MCP server process (Python)"]
MCP_SRV["ai-intervention-agent<br/>(server.py / FastMCP)"]
MCP_TOOL["MCP tool<br/>interactive_feedback"]
SVC_MGR["Service manager<br/>(ServiceManager)"]
CFG_MGR_MCP["Config manager<br/>(config_manager.py)"]
NOTIF_MGR["Notification manager<br/>(notification_manager.py)"]
NOTIF_PROVIDERS["Providers<br/>(notification_providers.py)"]
MCP_SRV --> MCP_TOOL
MCP_SRV --> CFG_MGR_MCP
MCP_SRV --> NOTIF_MGR
NOTIF_MGR --> NOTIF_PROVIDERS
end
subgraph WEB_PROC["Web UI process (Python / Flask)"]
WEB_SRV["Web UI service<br/>(web_ui.py / Flask)"]
WEB_CFG_MGR["Config manager<br/>(config_manager.py)"]
HTTP_API["HTTP API<br/>(/api/*)"]
TASK_Q["Task queue<br/>(task_queue.py)"]
WEB_FRONTEND["Browser frontend<br/>(static/js/app.js + multi_task.js)"]
WEB_SRV --> HTTP_API
WEB_SRV --> TASK_Q
WEB_SRV --> WEB_CFG_MGR
WEB_FRONTEND <-->|"SSE /api/events + poll /api/tasks"| HTTP_API
WEB_FRONTEND -->|submit feedback| HTTP_API
end
subgraph VSCODE_PROC["VS Code extension (Node)"]
VSCODE_EXT["Extension host<br/>(packages/vscode/extension.ts)"]
VSCODE_WEBVIEW["Webview frontend<br/>(webview.ts + webview-ui.js<br/>+ webview-notify-core.js + webview-settings-ui.js<br/>+ tri-state-panel.js)"]
VSCODE_EXT --> VSCODE_WEBVIEW
VSCODE_WEBVIEW <-->|"SSE /api/events + poll /api/tasks"| HTTP_API
VSCODE_WEBVIEW -->|submit feedback| HTTP_API
end
subgraph USER_UI["User interfaces"]
BROWSER["Browser<br/>(desktop/mobile)"]
VSCODE["VS Code<br/>(sidebar panel)"]
USER["User"]
end
CFG_FILE["config.toml<br/>(user config directory)"]
AI_CLIENT -->|MCP call| MCP_TOOL
MCP_TOOL -->|start/check Web UI| SVC_MGR
SVC_MGR -->|spawn/monitor| WEB_SRV
USER -->|input / click| WEB_FRONTEND
USER -->|input / click| VSCODE_WEBVIEW
BROWSER -->|load UI| WEB_FRONTEND
VSCODE -->|render UI| VSCODE_WEBVIEW
MCP_TOOL -->|"HTTP POST /api/tasks"| HTTP_API
MCP_TOOL -->|"HTTP GET /api/tasks/{task_id}"| HTTP_API
WEB_CFG_MGR <-->|read/write + watcher| CFG_FILE
CFG_MGR_MCP <-->|read/write + watcher| CFG_FILE
MCP_TOOL -->|trigger notifications| NOTIF_MGR
NOTIF_PROVIDERS -->|system / sound / Bark / web hints| USERThe diagram intentionally shows top-level processes and the most visible modules. Internal helpers — e.g.
state_machine.py(per-task lifecycle),web_ui_mdns.py(LAN service discovery via mDNS),web_ui_security.py(CSRF / origin / token gates),task_queue_singleton.py(single-process queue access),server_feedback.py(theinteractive_feedbackMCP tool body),enhanced_logging.py,protocol.py, etc. — live in the same two processes and are documented per-module underdocs/api/(English) anddocs/api.zh-CN/(中文).
Documentation
Docs index (by audience):
docs/README.md·docs/README.zh-CN.mdScripts index (CI gates / generators / QA):
scripts/README.mdRelease notes:
CHANGELOG.md· VS Code marketplace listing:packages/vscode/CHANGELOG.mdContributing:
CONTRIBUTING.md·CODE_OF_CONDUCT.mdAPI docs index:
docs/api/index.mdAPI docs (简体中文):
docs/api.zh-CN/index.mdMCP tool reference:
docs/mcp_tools.mdMCP 工具说明:
docs/mcp_tools.zh-CN.mdTroubleshooting / FAQ:
docs/troubleshooting.md·docs/troubleshooting.zh-CN.mdi18n contributor guide:
docs/i18n.md
Related projects
Acknowledgements
This project's heritage traces back to Fábio Ferreira (2024) and Pau Oliva (2025), whose original noopstudios/interactive-feedback-mcp and poliva/interactive-feedback-mcp seeded the MCP interactive_feedback tool surface. Their copyright notices are preserved in LICENSE per the MIT license terms. The v1.5.x line is a substantial rewrite — Web UI, VS Code extension, i18n, notification stack, CI/CD pipeline — owned and maintained by @xiadengma (PyPI / Open VSX / VS Code Marketplace publisher).
License
MIT License
Available Tools
1 toolinteractive_feedbackInteractive Feedback (人机协作反馈)A
Ask the human user for interactive feedback through the Web UI.
Use this tool whenever you need a human decision, clarification, confirmation, plan approval, design review, or final sign-off before continuing — especially when the next step has multiple valid approaches, irreversible side effects, or significant trade-offs.
Behavior:
Renders the resolved message (Markdown) and an optional list of options in a Web UI; the user submits text + selected options + optional images.
The call blocks until the user submits, the auto-resubmit countdown expires, or the configured backend timeout is reached.
On success, returns a list of MCP content blocks (text + image) that include the user reply, selected options, and an optional prompt suffix.
On parameter validation failure, raises
ToolErrorso the agent can retry with corrected arguments. On service / task failure, returns a configurable resubmit prompt instructing the agent to call this tool again, instead of silently dropping the request. After 3 failures in a row it returns the cause instead: stop calling and tell the user.
Cross-tool compatibility:
summary/promptare accepted as aliases formessageso the samemcp.jsonconfig can target other feedback MCP variants without retraining the agent.optionsis an alias forpredefined_options.project_directory,submit_button_text,timeout,timeout_seconds,feedback_type,priority,language,tags,user_id,task_idare accepted but ignored. They prevent the first-call validation failures observed when an agent reuses arguments shaped for a different feedback MCP server.
Inputs: tags, prompt, loop_id, message, +18 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so no selection ambiguity is possible. Its purpose (soliciting human feedback via a Web UI) is stated explicitly and cannot be confused with anything else on the server.
The lone tool uses a clear snake_case verb_noun name (`interactive_feedback`) consistent with common MCP conventions. With a single tool there is no opportunity for convention mixing.
The server's scope is deliberately narrow — one blocking human-in-the-loop request — so a single tool is defensible rather than thin. A slightly richer surface (e.g. a non-blocking/poll variant) would justify a higher score, but nothing here is redundant.
The ask-feedback lifecycle (render message/options, block, return reply, retry on failure, then surface cause after 3 failures) is well covered, including tolerance for alias parameters from sibling servers. Minor gaps exist: no way to query pending/previous feedback or to check status without issuing a new request.
Maintenance
Related MCP Connectors
Human-in-the-loop review and approval for AI agents. Audit trail, approval policies, native MCP.
Human-in-the-loop for AI agents over MCP: durable approvals with a hosted review page & audit trail
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
Live data grids for AI agents. Push structured data; humans review, agents read back via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceHuman-in-the-Loop authorization gateway for AI Agents. Securely pause MCP workflows and route high-risk actions to human approvers via Slack or Email.52 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables real-time user intervention for MCP agents via a Web UI and interactive_feedback tool, allowing users to review context and send instructions when agents drift from intent.MIT

Datashift MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceEnables AI agents to submit tasks for human or AI review and receive decisions via MCP tools, adding human review checkpoints to workflows.MIT- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with any website through MCP, providing structured knowledge graph contexts, generated actions, and readiness scoring.MIT