# Telegram Bridge

> Telegram Bridge is an open-source MCP server for communication. Stdio MCP bridge to the Telegram Bot API with a fail-closed chat allowlist and scrubbing. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** macOS, Windows, Linux, Telegram, CLI, Self-hosted
- **Repository:** https://github.com/antonio-castellon/mcp-telegram-bridge
- **MCP Registry name:** io.github.antonio-castellon/mcp-telegram-bridge
- **Categories:** [communication](https://ai-powered.com/categories/communication), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

This is a small local bridge that lets an agent in Cursor, Claude Desktop or Windsurf send and read Telegram messages through a bot, while the process itself enforces safety limits. It is not a hosted bot service and does not open a port or listen for webhooks; it polls Telegram with getUpdates.

Since version 0.2.0 an empty allowlist denies every chat, so you must set ALLOWED_CHAT_IDS or deliberately opt in to open mode with ALLOW_ALL_CHATS. Outbound text, button labels and callback toasts are scrubbed for the configured secret values and token-shaped strings, and logs are rewritten so a bot token in a URL does not leak. Inbound updates are size-capped and rate limited, bot messages are omitted, and everything inbound is marked untrusted, with optional heuristic safety labels that the README says are not a prompt-injection filter.

The same operations can be used as a Python library. It needs Python 3.11 or later and a bot token from BotFather.

## Features

- **Fail-closed allowlist:** Chats are refused unless listed, or open mode is explicitly enabled.
- **Outbound scrubbing:** Secrets and token-shaped strings are removed from outgoing messages.
- **Inline buttons:** Messages can carry buttons, with tools to edit markup and answer callbacks.
- **Bounded polling:** Updates are size-capped, rate limited and deduplicated.
- **Untrusted data marking:** Inbound content is labelled untrusted for the model.
- **Library mode:** TelegramBridge can be used from Python without the MCP package.

## Good for

- Let a local agent notify you on Telegram
- Receive approvals via inline buttons from an allowed chat
- Run an agent-driven bot in a restricted group
- Keep bot tokens out of logs and messages

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add mcp-telegram-bridge -- uvx mcp-telegram-bridge
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mcp-telegram-bridge -- uvx mcp-telegram-bridge
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.mcp-telegram-bridge]
command = "uvx"
args = ["mcp-telegram-bridge"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user mcp-telegram-bridge uvx -- mcp-telegram-bridge

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-telegram-bridge": {
      "command": "uvx",
      "args": [
        "mcp-telegram-bridge"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 2 of 6 tools change data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `telegram_get_me` (name suggests: reads): Bot identity. Not rate limited.
- `telegram_get_chat` (name suggests: reads): Chat metadata for an allowed chat.
- `telegram_send_message` (name suggests: changes): Sends scrubbed text with optional parse mode and buttons.
- `telegram_edit_reply_markup` (name suggests: changes): Replace or clear inline buttons.
- `telegram_answer_callback`: Acknowledge a callback query.
- `telegram_get_updates` (name suggests: reads): One bounded poll of incoming updates.

## FAQ

### Is Telegram Bridge hosted?

No, it runs locally as a stdio process you launch.

### What happens with no allowlist?

Since 0.2.0 an empty ALLOWED_CHAT_IDS denies every chat.

### Does Telegram Bridge listen for webhooks?

No, it only polls getUpdates and opens no port.

### Can I use Telegram Bridge without MCP?

Yes, as a Python library.

### Is Telegram Bridge free?

Yes. Telegram Bridge is open source, so you can use and self-host it for free.

### How do I add Telegram Bridge to Claude Code?

Run this command in your terminal: claude mcp add mcp-telegram-bridge -- uvx mcp-telegram-bridge

### What are the best alternatives to Telegram Bridge?

The closest alternatives to Telegram Bridge are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/telegram-bridge
