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-mcp-user

v1.0.1

Published

Telegram MCP server — read, send, search, react, scan groups for action items

Downloads

51

Readme

@ivanbermejo/telegram-mcp

CI npm License

Telegram MCP server for Claude and other AI assistants. Connects via your personal Telegram account (not a bot) using the official MTProto user API.

4 tools, full user-API access — read messages, send files, search, react, pin, scan groups for action items.


Tools

| Tool | Actions | |---|---| | tg_me | Get your account info | | tg_message | get send edit delete forward search pin react | | tg_chat | list read scan summary | | tg_media | send |


Setup

1. Get Telegram API credentials

Go to my.telegram.org/apps, log in, and create an app. Copy the App api_id and App api_hash.

These are your personal developer credentials — different from a bot token.

2. Authenticate (one-time per machine)

TG_APP_ID=your_app_id TG_API_HASH=your_api_hash npx @ivanbermejo/telegram-mcp auth

Follow the prompts: enter your phone number and the verification code Telegram sends you.

The command saves your session locally and prints the config snippet to paste into Claude.

3. Verify the connection

TG_APP_ID=your_app_id TG_API_HASH=your_api_hash npx @ivanbermejo/telegram-mcp test

You should see: ✓ Connected as Your Name (@username)

4. Configure Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "telegram": {
      "command": "npx",
      "args": ["-y", "@ivanbermejo/telegram-mcp"],
      "env": {
        "TG_APP_ID": "your_app_id",
        "TG_API_HASH": "your_api_hash",
        "TG_SESSION": "paste_session_string_here"
      }
    }
  }
}

Restart Claude Desktop. The Telegram tools will appear.


Optional environment variables

| Variable | Description | |---|---| | TG_SESSION | Session string (from auth command). If omitted, reads from ~/.telegram-mcp/session.json | | TG_SCAN_GROUPS | Comma-separated group names for tg_chat scan (e.g. "groupA,groupB") | | TG_CLIENT_MAP | JSON mapping of group keywords to display names (e.g. {"groupA":"Client A"}) | | TG_ALLOWED_DIRS | Colon-separated directories allowed for tg_media send (default: home directory) |


Usage examples

"Who am I on Telegram?"
"Show my unread chats"
"Send 'hello' to @username"
"Search for 'invoice' in the acme group"
"Summarize the last 24 hours in the dev group"
"React with 👍 to message 123 in @channel"
"Pin message 456 in @groupname"
"Scan my groups for action items from the last 12 hours"

Security

  • This connects using your personal Telegram account — treat the session string like a password
  • To revoke access at any time: Telegram → Settings → Devices → terminate this session
  • File sending is restricted to your home directory by default (TG_ALLOWED_DIRS to extend)
  • No credentials are hardcoded — everything comes from environment variables

License

MIT