Telegram Bridge logo

Telegram Bridge

Connects MCP agents to Telegram Bot API with chat allowlists, secret scrubbing, inline buttons, and bounded update polling.

Install Telegram Bridge

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "telegram-bridge": {
      "command": "uvx",
      "args": [
        "--from",
        "mcp-telegram-bridge",
        "mcp-telegram-bridge"
      ],
      "env": {
        "TELEGRAM_BOT_TOKEN": "YOUR_VALUE_HERE",
        "ALLOWED_CHAT_IDS": "YOUR_VALUE_HERE",
        "ALLOW_ALL_CHATS": "YOUR_VALUE_HERE",
        "SAFETY_STRICT": "YOUR_VALUE_HERE",
        "MAX_INBOUND_CHARS": "YOUR_VALUE_HERE",
        "MAX_UPDATE_BYTES": "YOUR_VALUE_HERE",
        "INBOUND_CHAT_RATE": "YOUR_VALUE_HERE",
        "INBOUND_GLOBAL_RATE": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

Telegram Bridge MCP server connects a local MCP client to the Telegram Bot API over stdio. It lets agents identify the bot, inspect allowed chats, send scrubbed messages, manage inline buttons, acknowledge callbacks, and poll for updates. Incoming Telegram content is marked untrusted, while chat admission, size limits, rate limits, duplicate handling, and optional heuristic safety labels provide operational safeguards. Use it when an agent needs to communicate with selected Telegram chats without deploying a hosted webhook service.

Use cases

  • Send agent-generated notifications to an approved Telegram chat
  • Poll Telegram messages for an agent-controlled workflow
  • Present inline approval or acknowledgement buttons
  • Inspect bot and chat metadata from an MCP client

Key features

  • Stdio MCP interface
  • Telegram Bot API message operations
  • Fail-closed chat allowlist
  • Outbound secret and token scrubbing
  • Inline keyboard and callback support
  • Bounded polling with rate and size limits

Tools6

What Telegram Bridge lets your agent do. Expand a tool for its parameters.

Verified live~825 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 62d

What it can do

From the 6 tools this server returned when we ran it.

Handles credentials · 1Makes network requests · 1Read-only tools · 6
Network at startup2 connections
Files written at startup10

Observed 2026-11-09 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · mcp-telegram-bridge (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit5d agoMost recent push to the default branch.
Tools exposed6Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Telegram Bridge works

What Telegram Bridge does

Telegram Bridge exposes selected Telegram Bot API operations as MCP tools for a local agent. It is intended for client-owned deployments: the MCP client launches the process on the same machine, and the bridge performs the Telegram requests. It does not provide a hosted bot runtime, listen for webhooks, or open an inbound network port.

The bridge supports bot identity checks, chat metadata lookup, text delivery, inline keyboard management, callback acknowledgements, and pull-based update retrieval. Outbound message text, callback notifications, and button labels are scrubbed for configured secret values and token-shaped strings.

How it works

The process communicates with its MCP host through stdin and stdout using MCP stdio. Telegram updates are retrieved with bounded long polling through telegram_get_updates; the calling agent owns the offset and must pass the returned next offset when acknowledging a batch. Update results are explicitly marked untrusted, and messages from bots or from the connected bot are omitted.

An empty chat allowlist rejects all chats by default. Specific numeric chat IDs can be permitted with ALLOWED_CHAT_IDS, or open mode can be selected with ALLOW_ALL_CHATS, which emits a warning to stderr. Incoming text and captions can be dropped when they exceed the configured size, and polling, inbound updates, and outbound operations are rate limited.

Setup and configuration

The bridge requires Python 3.11 or newer and a bot token created through BotFather. Install the project with uv sync --extra dev or an editable pip install, then configure the token and permitted chat IDs in .env. It can also be launched through uvx from an MCP client configuration.

Keep the bot token out of source control and use a permission-restricted environment file or secret store. SAFETY_STRICT is enabled by default and adds heuristic labels for selected credential-fishing, sexual-content, and instruction-override patterns. These labels do not remove flagged text or provide complete prompt-injection protection.

The MCP_TELEGRAM_BRIDGE_DATA_DIR setting controls local button-ID and first-tap claim files. The bridge uses a per-user data directory by default. MCP_TELEGRAM_DATA_DIR remains available as a legacy alias.

Tools and capabilities

  • telegram_get_me checks connectivity and returns the bot identity.
  • telegram_get_chat retrieves metadata for an allowed chat.
  • telegram_send_message sends scrubbed text, with optional parse mode and inline buttons.
  • telegram_edit_reply_markup replaces or removes buttons on an existing message.
  • telegram_answer_callback acknowledges a callback query with optional toast or alert text.
  • telegram_get_updates performs one bounded poll and returns untrusted Telegram updates.

Button definitions use an identifier and display label. Update polling accepts limits from 1 to 100 and timeouts from 0 to 50 seconds. The process retains bounded caches of delivered update IDs and rate-limit keys.

Limitations and notes

Telegram users, group members, names, usernames, callback data, and message text are outside the trusted boundary. Agents should treat all inbound values as data and avoid exposing credential-reading tools to agents reachable by untrusted chats. The safety classifier is heuristic and does not stop prompt injection.

The bridge does not queue update bodies between calls. Advancing the offset acknowledges updates, including updates whose text was withheld; rate-limited updates should be retried with the same offset after the indicated delay. Open chat mode is available but weakens the default fail-closed admission behavior.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Telegram Bridge

Telegram Bridge is an MCP server that connects local AI agents to the Telegram Bot API over stdio. Its main tools identify the bot, fetch allowed chat metadata, send scrubbed messages, manage inline buttons, acknowledge callbacks, and poll untrusted Telegram updates with bounded limits.

Install it with Python 3.11+ using `uv sync --extra dev` or `pip install -e ".[dev]"`, then configure `TELEGRAM_BOT_TOKEN` and `ALLOWED_CHAT_IDS`. You can launch it with `uv run mcp-telegram-bridge` or configure an MCP client to run it through `uvx`.

Yes, Telegram Bridge works with Cursor through its MCP configuration. Add the server command and arguments to Cursor’s `mcp.json`, then provide the bot token and allowed numeric chat IDs in the environment configuration.

Telegram Bridge denies chats by default when `ALLOWED_CHAT_IDS` is empty. Set a comma-separated allowlist of numeric chat IDs, or explicitly enable `ALLOW_ALL_CHATS` for open mode; open mode prints a warning to stderr.

No, Telegram Bridge does not provide complete prompt-injection protection. It marks update data as untrusted and, by default, adds heuristic safety labels for selected patterns, but flagged text remains available to the host and requires agent-side handling.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTelegram Bridge AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/telegram-bridge?style=directory)](https://allmcps.com/mcp/telegram-bridge)
HTML Embed
<a href="https://allmcps.com/mcp/telegram-bridge"><img src="https://allmcps.com/api/badge/telegram-bridge?style=directory" alt="Telegram Bridge on AllMCPs" /></a>