npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-hitl-wrapper

v1.0.0

Published

Universal MCP proxy with Human-in-the-Loop approval flow via Telegram

Readme

mcp-hitl-wrapper

CI npm Docker License: MIT

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-wrapper

npm

npm install -g mcp-hitl-wrapper
mcp-hitl serve --config config.json

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 collisions
  • Audit 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 data

Documentation

  • 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     # tsc

License

MIT