mcp-hitl-wrapper
Enables human-in-the-loop approval of intercepted tool calls: the wrapper sends an approval request to a dedicated Telegram bot chat (showing agent, upstream MCP, tool and parameters) with inline Approve/Reject buttons, blocks the tool call until the user responds, and auto-rejects on timeout.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-hitl-wrapper
Human-in-the-loop approval for AI agent tool calls.
AI agents with MCP access can post messages, create tickets, delete resources — all autonomously. This proxy sits between your agent and upstream MCP servers, intercepting dangerous tool calls and requiring your explicit approval via Telegram before execution.
┌─────────────┐ ┌───────────────────┐ ┌─────────────────┐
│ Agent │────>│ mcp-hitl-wrapper │────>│ MCP: Slack │
│ (Claude, │ │ │────>│ MCP: GitHub │
│ Cursor) │<────│ proxy + approve │────>│ MCP: Jira │
└─────────────┘ └────────┬──────────┘ └─────────────────┘
│
┌────────v──────────┐
│ Telegram Bot │
│ [✅] [❌] │
└───────────────────┘Agent calls a tool → wrapper checks access rules → if HITL required, you get a Telegram message with Approve/Reject buttons → result forwarded to agent or error on reject/timeout. Everything is logged.
Quick start
Claude Desktop / Cursor
Add to your MCP client config (claude_desktop_config.json or Cursor settings):
{
"mcpServers": {
"safe": {
"command": "npx",
"args": ["-y", "mcp-hitl-wrapper", "serve", "--config", "./config.json"],
"env": {
"TG_BOT_TOKEN": "your-bot-token",
"TG_CHAT_ID": "your-chat-id",
"SLACK_BOT_TOKEN": "xoxb-..."
}
}
}
}This launches the wrapper and passes environment variables to it. The wrapper reads its own config.json where ${ENV_VAR} references are substituted from these values. All variables used in config.json must be listed here.
Create config.json — see config example below.
Docker
docker pull ghcr.io/underwear/mcp-hitl-wrapper:latest
docker run -v ./config.json:/app/config/config.json:ro \
-e TG_BOT_TOKEN=... -e TG_CHAT_ID=... \
ghcr.io/underwear/mcp-hitl-wrappernpm
npm install -g mcp-hitl-wrapper
mcp-hitl serve --config config.jsonRelated MCP server: enterprise-agent-lab
Config at a glance
{
"destinations": {
"tg": {
"driver": "telegram",
"botToken": "${TG_BOT_TOKEN}",
"chatId": "${TG_CHAT_ID}"
}
},
"mcps": {
"slack": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-slack"],
"env": { "SLACK_BOT_TOKEN": "${SLACK_BOT_TOKEN}" },
"tools": { "block": ["users_deletePhoto"] }
}
},
"hitl": {
"defaultDestination": "tg",
"tools": {
"slack": {
"chat_postMessage": {},
"chat_delete": { "timeout": "1m" }
}
}
}
}${ENV_VAR} values are substituted from environment at load time. Full reference: docs/configuration.md
Features
Universal proxy — wrap any MCP server: stdio, SSE, Streamable HTTP
Telegram approval — approve/reject with one tap, auto-reject on timeout (requires a dedicated bot)
Access control — allow-all, whitelist, or blocklist per upstream MCP
Tool namespacing — automatic
{mcp}__{tool}prefix prevents collisionsAudit trail — SQLite log of every call with decision, latency, user
Discovery — detect new tools from upstream MCPs, auto-block in whitelist mode
CLI toolkit — validate, discover, diff, audit query/export
Docker ready — multi-stage image on ghcr.io, compose included
What approval looks like
When a HITL-configured tool is called:
🔔 HITL Approval Request
Agent: claude-code
MCP: slack → chat_postMessage
Parameters:
{"channel": "#general", "text": "Hello team!"}
⏱ Auto-reject in 3:00
[✅ Approve] [❌ Reject]Approve → tool executes, result goes back to agent. Reject or timeout → agent gets an error, nothing happens.
CLI
mcp-hitl serve --config config.json # start proxy
mcp-hitl validate config.json # validate config
mcp-hitl discover --config config.json # list upstream tools
mcp-hitl diff --config config.json # tool access status
mcp-hitl audit list --last 20 # query audit log
mcp-hitl audit export --format csv # export audit dataDocumentation
Configuration — full config reference, transports, access control, HITL rules
CLI Reference — all commands and options
Docker — ghcr.io, local build, docker-compose
Development
npm install && npm run build
npm test # vitest
npm run lint # eslint
npm run typecheck # tscLicense
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Permission checks, human approval cards, and signed audit trails for AI agent tool calls.
Authorize AI agent tool calls before they run: policy-as-code, human approval, signed receipts.
Security gateway for AI agents: policy, approval, and audited execution, no secrets shared.
Zero-trust gateway for AI agents: score tool calls, verify agent cards, enforce policy, audit.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceGates agent tool execution with human approval, audit trails, and replay-resistant permits, enabling safe use of tools in agent loops.MIT
- FlicenseNot gradedqualityDmaintenanceEnables controlled AI-agent access to enterprise-shaped tools with a deny-by-default gated write path, human approval, dry-run execution, and append-only audit logging.1-
- AlicenseNot gradedqualityCmaintenanceEnables autonomous AI agents to operate safely by intercepting risky tool calls, evaluating them against policy, and suspending them for human approval via Slack, Telegram, or a web dashboard.2Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to call backend tools under per-agent policy, deciding which tools each agent can see, what arguments it may pass, how often it may call, and which writes wait for human approval. It also redacts secrets and PII from tool results, fences untrusted output against injection, and records every call in a hash-chained audit log.MIT