Skip to main content

AI Intervention Agent: MCP server enabling real-time user intervention in AI-assisted development workflows.

Project description

AI Intervention Agent

AI Intervention Agent

Real-time user intervention for MCP agents.

Tests PyPI Python versions OpenSSF Scorecard License

English | 简体中文

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

Quickest: ask your AI to install it for you

If your IDE/CLI has an AI agent (Cursor, Claude Code, VS Code, Windsurf, Trae, Augment, ...), paste the prompt below in chat and let it write the config for you.

Click to copy the install prompt
Please configure my IDE / AI tool to use the `ai-intervention-agent` MCP server:

1. Locate the correct MCP config file for my current IDE
   (e.g. `.cursor/mcp.json` or `~/.cursor/mcp.json` for Cursor,
    `~/.claude.json` for Claude Code,
    `.vscode/mcp.json` for VS Code).
2. Add this entry under `mcpServers`:
   - command: `uvx`
   - args: `["ai-intervention-agent"]`
   - timeout: 600
   - autoApprove: `["interactive_feedback"]`
3. Append the project's recommended prompt rules
   (the "Prompt snippet (copy/paste)" block in this README)
   to my agent rules / system prompt, so the agent always asks me
   through `interactive_feedback` instead of ending tasks silently.
4. Verify by listing MCP servers and confirming `ai-intervention-agent` is loaded.

Option 1: Using uvx (Recommended)

Install in Cursor Install in VS Code

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

  1. First, install the package manually (please remember to manually pip install --upgrade ai-intervention-agent periodically to get updates):
pip install ai-intervention-agent
  1. Configure your AI tool to launch the installed MCP server:
{
  "mcpServers": {
    "ai-intervention-agent": {
      "command": "ai-intervention-agent",
      "args": [],
      "timeout": 600,
      "autoApprove": ["interactive_feedback"]
    }
  }
}

[!NOTE] 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=240 seconds
  • Range: 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.
  1. (Optional) Customize your config:
  • On first run, config.toml will 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
Prompt snippet (copy/paste)
- 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`.

Screenshots

Desktop - feedback page (multi-task tabs, code highlighting, predefined options) Mobile - feedback page

Feedback page · auto switches between dark/light · multi-task tabs with independent countdowns

More screenshots (empty state + settings)

Desktop - empty state Mobile - empty state

Empty state · waiting for the next interactive request

Desktop - settings (notifications, Bark, feedback) Mobile - settings

Settings · notifications · Bark · sound · feedback countdown · auto switches between dark/light

Key features

  • Real-time intervention: the agent pauses and waits for your input via interactive_feedback
  • Web 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>.local URL when the local network supports it

Architecture diagram, "how it works" flow, production middleware chain, server self-info resource, and MCP-spec compliance details live under docs/api/index.md and docs/mcp_tools.md.

VS Code extension (optional)

Open VSX version Open VSX downloads Open VSX rating

Item Value
Purpose Embed the interaction panel into VS Code’s sidebar to avoid switching to a browser.
Install (Open VSX) Open VSX
Download VSIX (GitHub Release) GitHub Releases
Setting ai-intervention-agent.serverUrl (should match your Web UI URL, e.g. http://localhost:8080; you can change web_ui.port in config.toml.default)
Other settings ai-intervention-agent.logLevel (Output → AI Intervention Agent). macOS native notifications are enabled by default and can be toggled in the sidebar's Notification Settings panel. See packages/vscode/README.md for the full settings list and the AppleScript executor security model.

Configuration

Item Value
Docs (English) docs/configuration.md
Docs (简体中文) docs/configuration.zh-CN.md
Default template config.toml.default (on first run it will be copied to config.toml)
OS User config directory
Linux ~/.config/ai-intervention-agent/
macOS ~/Library/Application Support/ai-intervention-agent/
Windows %APPDATA%/ai-intervention-agent/

Documentation

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_intervention_agent-1.6.4.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_intervention_agent-1.6.4-py3-none-any.whl (2.9 MB view details)

Uploaded Python 3

File details

Details for the file ai_intervention_agent-1.6.4.tar.gz.

File metadata

  • Download URL: ai_intervention_agent-1.6.4.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ai_intervention_agent-1.6.4.tar.gz
Algorithm Hash digest
SHA256 90b2860d8c642447affd0992030dfd21c7d9518923afd88eb25687fbbc625d0d
MD5 dd7def550344b27cb7a383ac7146d964
BLAKE2b-256 e3fe463b08485b7767cac55ea80a412c71fd55c862bfde771ee70e43641f069d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_intervention_agent-1.6.4.tar.gz:

Publisher: release.yml on XIADENGMA/ai-intervention-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ai_intervention_agent-1.6.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_intervention_agent-1.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 feb3d51fe174d85a8f569b37b8ede0be8902143c5aee4897179aa229ae61f95a
MD5 8fd222e0057da3c69a3e7ca158a31a46
BLAKE2b-256 da9158c58a71a4da26101d1577102be082693b6756a2438d23bad5608d171185

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_intervention_agent-1.6.4-py3-none-any.whl:

Publisher: release.yml on XIADENGMA/ai-intervention-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page