Human in the Loop MCPA VS Code extension that implements an MCP (Model Context Protocol) server for human-in-the-loop interactions. It allows any MCP-compatible AI agent to request user input, confirmations, or selections directly within VS Code. What is Human in the Loop?Human in the Loop (HITL) is a pattern where AI agents can pause their execution to request human input, verification, or decision-making. This is essential for:
Features
InstallationFrom VS Code Marketplace
From Source
Quick Start1. Configure Your AI AgentAdd the MCP server to your project's
2. Use the Sidebar Panel
Keyboard Shortcuts
Available MCP ToolsYour AI agent can use these tools to interact with users:
|
| Setting | Type | Default | Description |
|---|---|---|---|
humanInTheLoop.timeout |
number | 120 | Response timeout in seconds (0-600). 0 = infinite timeout |
humanInTheLoop.autoSubmitOnTimeout |
boolean | false | Auto-submit current input when timer expires |
humanInTheLoop.soundEnabled |
boolean | true | Play sound on new requests |
humanInTheLoop.soundVolume |
number | 0.5 | Sound volume (0.0 - 1.0) |
humanInTheLoop.soundType |
string | "default" | Notification sound type |
humanInTheLoop.enableLogging |
boolean | false | Enable detailed logging (Output > Human in the Loop MCP) |
humanInTheLoop.bindAddress |
string | "0.0.0.0" | Server bind address (see WSL/Remote section below) |
Sound Types
default- Standard notification (short)chime- Soft chime (short)ping- Quick ping (short)bell- Bell with harmonics (medium)notification- Two-tone ascending (medium)alert- Attention-grabbing beeps (long)melody- Musical phrase C-E-G-C (long)
Architecture
┌─────────────────┐ ┌──────────────────┐
│ AI Agent │────▶│ MCP Server │
│ (Any MCP Client)│◀────│ (HTTP/JSON-RPC) │
└─────────────────┘ └────────┬─────────┘
│
▼
┌──────────────────┐
│ VS Code │
│ Extension │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Sidebar Panel │
│ (User Interface)│
└──────────────────┘
Session Isolation
Each VS Code window:
- Runs its own HTTP server on a unique port
- Has its own sidebar panel
- Handles requests independently
This enables working on multiple projects simultaneously without conflicts.
Compatibility
This extension works with any AI agent or tool that supports the Model Context Protocol (MCP), including:
- VS Code extensions with MCP support
- CLI tools implementing MCP client
- Custom AI agents using MCP SDK
- Any HTTP client that can send JSON-RPC requests
Commands
| Command | Description |
|---|---|
Human in the Loop: Show Connection Instructions |
Display setup instructions and current server URL |
Human in the Loop: Restart MCP Server |
Restart the local MCP server |
Privacy & Security
This extension:
- ✅ Runs entirely locally on your machine
- ✅ Does not collect any telemetry or analytics
- ✅ Does not send data to external servers
- ✅ All communication is between VS Code and your local AI agent
- ✅ By default binds to
0.0.0.0for WSL/Remote compatibility (configurable to127.0.0.1)
WSL & Remote Development
This extension fully supports VS Code Remote Development:
- WSL (Windows Subsystem for Linux)
- Remote - SSH
- Dev Containers
- GitHub Codespaces
How it works
When working in a remote environment, the extension runs in the workspace context (remote machine). VS Code automatically forwards the MCP server port to your local machine.
Bind Address Setting
| Value | Description |
|---|---|
0.0.0.0 |
Listen on all interfaces (default, required for WSL/Remote) |
127.0.0.1 |
Listen only on localhost (more restrictive, local-only access) |
If you're only working locally and want stricter network isolation, you can change humanInTheLoop.bindAddress to 127.0.0.1.
Requirements
- VS Code 1.100.0 or higher
- Node.js 20+ (for development; VS Code includes its own runtime)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Release Process
This project uses GitHub Actions for automated releases:
- Update version in
package.json - Create and push a version tag:
git tag v1.0.1 && git push --tags - GitHub Actions will automatically:
- Build the extension
- Create a GitHub Release with the VSIX
- Publish to VS Code Marketplace (if
VSCE_PATsecret is configured) - Publish to Open VSX Registry (if
OVSX_PATsecret is configured)
License
MIT License - see LICENSE for details.
Changelog
See CHANGELOG.md for version history.
Made with ❤️ for the AI community