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

telegram-team-mcp

v0.2.5

Published

MCP server for AI agents to participate in Telegram group chats

Readme

telegram-team-mcp

MCP server for AI agents to participate in Telegram group chats.

Two ways to use:

  1. MCP mode — add to your existing agent, it gets Telegram tools
  2. Daemon mode — fully automatic, watches mentions and invokes your agent CLI

Quick Start

1. Create bot + get chat ID

  1. @BotFather/newbot → save token
  2. /setprivacy → select bot → Disable
  3. Create group, add bot
  4. Add @userinfobot to get chat ID (-100...)

2a. MCP mode (add to existing agent)

Your agent keeps all its settings. You just add Telegram tools.

claude mcp add telegram \
  -e TELEGRAM_BOT_TOKEN=7000000000:AAxxxx \
  -e TELEGRAM_CHAT_ID=-100123456789 \
  -- npx -y telegram-team-mcp

Then tell your agent: "Monitor Telegram using wait_for_mentions, respond via send_message."

2b. Daemon mode (fully automatic)

Runs in a terminal tab. Watches for @mentions, invokes your agent CLI per mention. Doesn't touch your agent's model/prompt/permissions — only passes the MCP config and the mention.

TELEGRAM_BOT_TOKEN=7000000000:AAxxxx \
TELEGRAM_CHAT_ID=-100123456789 \
npx telegram-team-mcp --daemon

With custom command:

TELEGRAM_BOT_TOKEN=... \
TELEGRAM_CHAT_ID=... \
AGENT_COMMAND=claude_proxy_dan \
AGENT_EXTRA_ARGS="--dangerously-skip-permissions" \
npx telegram-team-mcp --daemon

The daemon runs: claude_proxy_dan -p "<mention context>" --mcp-config <auto> --dangerously-skip-permissions

Everything else (model, CLAUDE.md, system prompt) comes from your environment.

With Codex:

AGENT_CLI=codex npx telegram-team-mcp --daemon

Runs: codex exec "<mention context>" --full-auto --ephemeral

Environment Variables

| Variable | Required | Description | |---|---|---| | TELEGRAM_BOT_TOKEN | Yes | Bot token from @BotFather | | TELEGRAM_CHAT_ID | Yes | Chat ID(s), comma-separated | | DB_PATH | No | SQLite dir (default: ~/.telegram-team-mcp/) |

Daemon-only:

| Variable | Default | Description | |---|---|---| | AGENT_COMMAND | claude | CLI binary to invoke | | AGENT_EXTRA_ARGS | — | Extra args (space-separated), e.g. --dangerously-skip-permissions | | AGENT_CLI | auto | claude, codex, or custom | | ANNOUNCE_ON_START | false | Send "bot online" message |

MCP Tools

| Tool | Description | |---|---| | wait_for_mentions | Block until @mention arrives (or timeout). For auto-monitoring loops. | | send_message | Send message / reply to the group | | get_new_messages | Messages since a given ID | | get_recent_messages | Last N messages | | search_messages | Full-text search (FTS5) | | get_mentions | Unprocessed @mentions (non-blocking) | | mark_mentions_read | Mark mentions as handled | | get_thread | Reply chain for a message | | get_chat_info | Chat info + stats |

Telegram Commands (daemon mode)

Mention the bot with a command:

| Command | Description | |---|---| | @bot /status | Uptime, message count | | @bot /stats | Chat statistics | | @bot /search <query> | Search history | | @bot /clear | Clear pending mentions | | @bot /compact | AI summary of last 50 msgs | | @bot /help | List commands |

Multi-agent Setup

You + friend, each with a bot:

Machine 1: TELEGRAM_BOT_TOKEN=<your_token> ... npx telegram-team-mcp --daemon
Machine 2: TELEGRAM_BOT_TOKEN=<friend_token> ... npx telegram-team-mcp --daemon

Both watch the same group. Each responds only to its own @mentions.

Notes

  • Disable privacy mode via @BotFather → re-add bot to group
  • Bots can't read pre-existing messages — history builds over time
  • Rate limits: 20 msg/min per group
  • One process per bot token (Telegram allows one polling connection)

Development

npm install && npm run dev -- --daemon

License

MIT