communication MCP Server
Telegram MCP server powered by Telethon to let MCP clients read chats, manage groups, and send/modify messages, media, contacts, and settings.
Discovered via unknown and last synced 1w ago.
1. Install the package
uvx telegram-mcp
2. Add to claude_desktop_config.json
{
"mcpServers": {
"telegram-mcp": {
"command": "uvx",
"args": [
"telegram-mcp"
]
}
}
}Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) / %APPDATA%\Claude\claude_desktop_config.json (Windows)
Purpose
List other shims connected to this daemon.
`3`
`5`
Send text/files to a chat. Auto-chunks at 4096 chars.
`~/.claude/channels/telegram`
`604800` (7 days)
Set/clear emoji reaction on a message.
—
Purpose
`$HOME`
auto (see below)
Effect
`30m`
`1`
`$HOME`
`10`
`dynamic`
`4h`
发送图片
置顶消息
发送联系人
获取联系人列表
获取群组成员
加入公开频道
取消置顶
发送位置
搜索联系人
获取管理员列表
获取对话列表
搜索消息
发送表情反应
删除联系人
踢出群组
创建定时任务
获取聊天列表(分页支持)
删除消息
发送语音
获取用户详情
创建超级群组
解除封禁
获取待 AI 润色任务
搜索公开群组/频道
转发消息
发送音频
获取用户在线状态
创建频道
设置群头像
执行润色后发送
离开聊天
回复消息
标记已读
创建投票
添加联系人
邀请进群
发送视频
发送文件
获取我的信息
创建群组
封禁用户
启用/禁用任务
获取消息
拉黑用户
提升管理员
查看所有任务
解除拉黑
降级管理员
删除任务
编辑群名称
定时发送消息
设置群权限
获取邀请链接
下载媒体
获取文件信息
Return metadata about the configured bot
Send a message to the configured Telegram chat
URL
获取聊天详情
Fetch recent pending messages received by the bot
high
—
`3`
auto (see below)
`5s`
`1` (on)
`👌`
`0` (sink on)
`168h` (7d)
— (none)
`1m`
Render every known topic + lock state (DM-only, allowlisted).
auto (see below)
`0` (enabled)
`1` (on)
`168h` (7d)
`10485760` (10 MiB)
`5m`
`20`
Edit a previously-sent message in place.
Default
`12h`
`24h`
`60s`
`60`
`168h` (7d)
`2097152` (2 MiB)
`0` (off)
`60`
`5m`
`12h`
`👀,🤔,✍`
claude default
`90s`
`1h`
`24h`
Transport
stdio (default)
streamable HTTP
SSE (legacy HTTP)
Effect
`110`
ultra` sets the model and thinking-token budget used by future `/spawn` and `/bg` runs from that chat (`ultra` = Claude Fable 5). Persisted across daemon restarts. - **Live status feedback** — while the agent works the daemon keeps a "typing…" bubble alive and rotates a reaction emoji on your message; in forum mode each topic carries a pinned header showing the owning session's state (🟢 idle · 🟡 busy · 🔵 awaiting permission · ⚪ disconnected), workdir, label, and uptime. - **MarkdownV2 output** — opt-in formatted replies, bold/italic/code/spoiler. - **Local-only, single-user** — no webhook, no public ingress, no DB. Long polling behind any NAT. --- ## How it works ``` Claude Code session ─┐ ┌─ Telegram Bot API │ │ (stdio MCP) │ │ (HTTPS long-poll) ▼ │ ┌──────────────┐ IPC (unix sock) ┌─────────┴──────────┐ │ shim │ ◄──────────────► │ daemon │ │ (per CC pid)│ │ (one per host) │ └──────────────┘ │ - bot token │ │ - access gate │ │ - shim router │ └────────────────────┘ ``` - **Shim** — stdio MCP plugin Claude Code launches. Holds no token. Speaks IPC to the daemon. Tied to its parent CC process by `PR_SET_PDEATHSIG`. - **Daemon** — one per host. Owns the bot token, runs the long-poller, holds the allowlist gate, routes inbound messages to the right shim. Auto-spawned by the first shim that needs it, or run permanently under systemd. A single Telegram message can be routed by: 1. **Forum topic** — when forum mode is on, a message inside a topic owned by a shim routes to that shim exclusively (mentions/reply-to inside the topic are ignored — the topic *is* the address). 2. **Reply-to** — Telegram's reply UI threads the message to whichever shim sent the original. 3. **Mention** — `@s2`, `@all`, or `@<label>` if the shim was labeled. 4. **Chat affinity** — last shim that talked in the chat wins (with TTL). 5. **LRU fallback** — most-recently-connected shim. --- ## Quick start ### 1. Build ```bash git clone https://github.com/yashok111/telegram-mcp.git cd telegram-mcp make build # → bin/telegram-mcp ``` Requires **Linux** and **Go 1.26**. macOS/Windows are not supported — the daemon/shim lifecycle depends on `PR_SET_PDEATHSIG` and `/proc/<pid>/comm`. Optional: `make lint` needs `golangci-lint` v2 built with Go 1.26 — `go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest`. ### 2. Create a bot Talk to [@BotFather](https://t.me/BotFather) on Telegram, run `/newbot`, collect the token. ```bash mkdir -p ~/.claude/channels/telegram echo 'TELEGRAM_BOT_TOKEN=123456:AA...' > ~/.claude/channels/telegram/.env chmod 600 ~/.claude/channels/telegram/.env ``` ### 3. Register with Claude Code ```bash claude mcp add telegram -s user -- $(pwd)/bin/telegram-mcp ``` If the marketplace bun plugin is enabled, disable it first to avoid 409s fighting over the same token: ```bash claude plugin disable telegram ``` Restart the Claude Code session. ### 4. Launch Claude Code with dev channels enabled Telegram inbound is delivered as `notifications/claude/channel/*` — an experimental MCP capability that Claude Code only honors when launched with `--dangerously-load-development-channels`. Without the flag the daemon and shim both log successful delivery, but the LLM never sees the message. Add a shell alias and use it whenever you want a Telegram-aware session: ```bash # ~/.zshrc or ~/.bashrc alias claude-tg='claude --dangerously-load-development-channels plugin:telegram@local-yakov' ``` Then launch with `claude-tg` instead of `claude`. The `plugin:telegram@local-yakov` arg is harmless for the MCP-server install path (it loads nothing extra) and is required for `/spawn`-launched sessions where the bot forks a fresh CC that needs the plugin name to match. ### 5. Pair your account On first run the daemon prints a pairing code. DM the bot from your real Telegram account with that code; the daemon adds you to the allowlist in `access.json`. Run `/telegram:access` (skill bundled in the project) for the managed pairing flow. --- ## Forum-topic mode (optional) Instead of every Claude Code session sharing the bot's single DM, point the bot at a **supergroup with topics enabled** and get one topic per session — one tab per project, persistent across `/exit`/restart. ### Setup 1. In Telegram: **New Group** → add the bot → group settings → enable **Topics**. 2. Add the bot as **Administrator** with **Manage Topics** permission. 3. Get the chat id (any inbound from the group is logged in `daemon.log` as `chat_id=-100…`). 4. Add the chat id to `~/.claude/channels/telegram/.env`: ```bash echo 'TELEGRAM_FORUM_CHAT_ID=-1002…' >> ~/.claude/channels/telegram/.env ``` 5. Restart the daemon. Every new `claude-tg` session triggers `createForumTopic` on hello, names it `@s<N> — <workdir-basename>`, and binds the shim. ### Behavior - **Outbound** — every `reply` / `react` / `edit_message` from a bound shim auto-fills `message_thread_id`. Replies land in the shim's topic. - **Inbound inside a topic** — routed to that topic's owning shim exclusively. `@all`, mentions, and reply-to are ignored — the topic itself is the address. - **Inbound in General** (`thread_id=0`) — routed by mention / reply / LRU exactly as before. `@all` still broadcasts. - **Permission prompts** — for shims with a topic, the prompt card lands in the topic next to the tool output that triggered it (not in DM). - **Pinned header** — each topic gets a pinned status message the daemon maintains in place: owning alias, state icon (🟢 idle · 🟡 busy · 🔵 awaiting permission · ⚪ disconnected · 🔴 closed), workdir, label, last activity, and uptime. Toggle with `TELEGRAM_TOPIC_HEADER=0`. ### Persistence and reuse Topics are **kept** when you `/exit`. The shim's lock drops; the topic mapping in `access.json` stays. Next CC session in the same workdir (or with the same `--label`) re-attaches to the existing topic, history intact. Reuse key priority: 1. `label:<L>` if `/label` was set on the shim. 2. `workdir:<path>` when workdir ≠ `$HOME` (random shell sessions from `$HOME` get fresh topics, not a shared bucket). 3. Otherwise a fresh topic. Dead topics are reaped automatically. A topic whose owner disconnected is closed after `TELEGRAM_TOPIC_ORPHAN_AFTER` (default 12h) of idleness; a duplicate topic (a second concurrent session in the same workdir) is closed within the hour once its session leaves; `/topic close` does it on demand. Closed topics are then deleted by a background sweep after `TELEGRAM_TOPIC_PURGE_AFTER` (default 12h) — so a dead topic fully disappears within ~24h. Raise either env var to keep topics around longer (reattaching to a still-open topic preserves its history). ### `/topic` commands
Fetch a `file_id` into `~/.claude/channels/telegram/inbox/`.
Ask a multiple-choice question (2–10 inline buttons) and **block** until the operator taps one; returns the chosen option. Times out after `TELEGRAM_ASK_TIMEOUT`.
Bidirectional Telegram bridge — talk to Claude from your phone. Built into OpenPaw.
Send messages and upload files to Slack channels using the `slack` CLI. Supports direct messages, channel posts, file uploads, and thread replies.
Discover agents across local node and mesh peers at runtime — their roles, handles, and how to communicate with or delegate to them.
Apply data visualization and storytelling principles from Storytelling with Data by Cole Nussbaumer Knaflic. Covers choosing effective visuals (line, bar, table, scatterplot), eliminating clutter (Gestalt principles, data-ink ratio), focusing attention (preattentive attributes, strategic color), thinking like a designer (affordances, alignment, white space), and narrative structure (three-act story, horizontal/vertical logic, Big Idea). Trigger on "data visualization", "chart design", "dashboard design", "data storytelling", "presentation chart", "declutter chart", "bar chart", "line chart", "data narrative", "slide deck data", "chart review", "viz critique", "storytelling with data".
🔬 A curated collection of 23,000+ agent skills for empirical research across 8 social science disciplines. | 精选 23,000+ AI Agent 技能库,覆盖8大社会科学学科的实证研究。CoPaper.AI 20分钟完成一篇可复现的规范实证论文,并支持用户上传 Skills。-- Maintained by CoPaper.AI from Stanford REAP.
🔬 A curated collection of 23,000+ agent skills for empirical research across 8 social science disciplines. | 精选 23,000+ AI Agent 技能库,覆盖8大社会科学学科的实证研究。CoPaper.AI 20分钟完成一篇可复现的规范实证论文,并支持用户上传 Skills。-- Maintained by CoPaper.AI from Stanford REAP.
AgentNetworkProtocol(ANP) is an open source protocol for agent communication. Our vision is to define how agents connect with each other, building an open, secure, and efficient collaboration network for billions of intelligent agents.
Learn how to use the c-slack Claude skill. Complete guide with installation instructions and examples.
Learn how to use the c-telegram Claude skill. Complete guide with installation instructions and examples.
Learn how to use the Letter Writer Claude skill. Complete guide with installation instructions and examples.