# telegram-api-mcp [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/timoncool/telegram-api-mcp  
**GitHub Stars:** 39  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/telegram-api-mcp

## Description
Ultimate Telegram Bot API MCP server — full v9.6 coverage, meta-mode, rate limiting, circuit breaker. TypeScript.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "telegram-api-mcp": {
    "command": "npx",
    "args": ["-y","telegram-api-mcp"],
    "env": {
      "TELEGRAM_BOT_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `TELEGRAM_BOT_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What telegram-api-mcp does

telegram-api-mcp exposes the Telegram Bot API through MCP. Its method coverage spans bot information, messages, media, chats, members, forums, stickers, polls, payments, gifts, business features, stories, inline queries, games, forwarding, updates, and managed bots. Parameters are checked with Zod before requests are sent to Telegram, and tool annotations identify properties such as read-only, destructive, idempotent, and open-world behavior.

The server also adds support for longer Telegram posts through `send_rich_message` and `send_rich_message_draft`. Rich content can use Markdown, HTML, or blocks and may include headings, tables, lists, links, quotations, and up to 50 media attachments. Telegram's ordinary caption limit still applies to photo and similar caption-based methods.

## How it works

The standard mode exposes the Bot API methods as individual MCP tools. With `TELEGRAM_META_MODE=true`, the interface changes to two tools: `telegram_find` searches methods by keyword or category, while `telegram_call` invokes a selected method with JSON parameters. This reduces the number of tools placed in the model context without removing access to the API.

`telegram_format` provides syntax references for rich messages, captions, media, polls, buttons, checklists, and related structures. These references are also available as MCP resources under `telegram://format/<topic>`.

Requests use global and per-chat token-bucket limits. Transient failures can be retried with backoff, including Telegram 429 responses that provide `retry_after` values. A three-state circuit breaker can open after repeated failures and later attempt recovery. Responses are capped at 100,000 characters.

## Setup and configuration

The server runs from npm with `npx telegram-api-mcp`, or from a local build using `npm install`, `npm run build`, and `node dist/index.js`. Configure an MCP client to launch the command over standard input/output and provide `TELEGRAM_BOT_TOKEN`, obtained from BotFather.

Optional settings include a default chat ID and forum thread ID, meta-mode, global and per-chat rate limits, retry count, circuit-breaker thresholds and cooldown, permitted upload directories, and maximum upload size. `TELEGRAM_ALLOWED_UPLOAD_DIRS` restricts file uploads to selected paths, while upload path checks protect against traversal.

## Tools and capabilities

- Call Telegram methods for messages, media, chats, members, forums, stickers, polls, payments, gifts, business features, stories, inline queries, games, and updates.
- Send formatted long posts with Markdown, HTML, or structured blocks.
- Create draft rich messages that preview for up to 30 seconds before persistence.
- Look up method and parameter formats with `telegram_format`.
- Use `telegram_find` and `telegram_call` in meta-mode.
- Apply validation, rate limiting, retries, circuit breaking, response truncation, and token masking.

## Limitations and notes

Rich messages accept exactly one of Markdown, HTML, or blocks. Their enforced limits include 32,768 text characters, 500 nested blocks, 50 media attachments, 20 table columns, and 16 nesting levels. Media embedded in Markdown or HTML must use HTTP(S) URLs and occupy their own block.

The bot token is required. Telegram's own service limits still apply, including the 1,024-character caption ceiling for caption-based media methods. Upload access can be narrowed with allowed-directory settings, and large responses are truncated at the configured safety limit of 100,000 characters.

_Full upstream README: https://allmcps.com/mcp/telegram-api-mcp/readme_

