Dynamic Telegram Bot API MCP logo

Dynamic Telegram Bot API MCP

A dynamic, self-refreshing MCP gateway for the complete Telegram Bot API

Install Dynamic Telegram Bot API MCP

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

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "dynamic-telegram-bot-api-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dynamic-telegram-bot-api-mcp"
      ]
    }
  }
}

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

Automated check passed— started and listed 5 tools correctly ().

Overview

Tools5

What Dynamic Telegram Bot API MCP lets your agent do. Expand a tool for its parameters.

Verified live~437 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.

2/96 checks healthy over the last 32d

What it can do

From the 5 tools this server returned when we ran it; 5 declare their own safety hints.

Runs commands · 1Makes network requests · 2Read-only tools · 4
Network at startup4 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age103 days
Maintainers1

Observed 2026-11-02 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 · dynamic-telegram-bot-api-mcp (npm)

Adoption & maintenance

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

npm downloads1kPackage downloads in the last 30 days.
Last commit3d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed5Callable tools this server registers over MCP.

From the project README

Dynamic Telegram Bot API MCP Server

Dynamic Telegram Bot API MCP Server

Refresh Telegram Bot API schema GitHub release npm version MCP Registry MIT license

A production-oriented Model Context Protocol server that exposes the complete Telegram Bot API through five stable tools. It parses Telegram's official documentation into a normalized local catalog, so new Bot API methods and objects become available after a schema refresh without source-code changes.

The checked-in catalog targets the Telegram Bot API version recorded in data/telegram-bot-api.json and contains every method and type published in the official documentation.

MCP tools

ToolPurpose
telegram_search_methodsFuzzy-search names, descriptions, categories, and parameter names
telegram_get_methodRetrieve a method's parameters, required flags, descriptions, return type, and examples
telegram_get_typeRetrieve an object's fields, union variants, descriptions, and enums
telegram_call_methodValidate and execute any cataloged Bot API method
telegram_refresh_schemaFetch and atomically install the latest official schema

There is deliberately no generated tool per Bot API method. The catalog and generic call tool are the API surface.

Requirements and installation

  • Node.js 20.18.1 or later
  • A bot token from @BotFather for API calls (catalog tools work without one)

Install from npm

Run the published npm package directly with npx—no repository checkout or build is required:

Create a .env in each project or repository with that project's bot token:

dotenv
TELEGRAM_BOT_TOKEN=YOUR_PROJECT_BOT_TOKEN
TELEGRAM_METHOD_ALLOWLIST=get*,sendMessage,sendPhoto

Configure the MCP server once, without a shared token or hard-coded working directory:

config.json
{
  "mcpServers": {
    "telegram": {
      "command": "npx",
      "args": ["-y", "dynamic-telegram-bot-api-mcp"]
    }
  }
}

For Codex, the equivalent ~/.codex/config.toml entry is:

toml
[mcp_servers.telegram]
command = "npx"
args = ["-y", "dynamic-telegram-bot-api-mcp"]

Alternatively, install it globally with npm install -g dynamic-telegram-bot-api-mcp and use "command": "telegram-bot-api-mcp" in the configuration above, omitting args.

Registry name: io.github.patricktobias86/dynamic-telegram-bot-api-mcp.

Install from GitHub

Clone and build the GitHub repository:

bash
git clone https://github.com/PrimeUpYourLife/dynamic-telegram-bot-api-mcp.git
cd dynamic-telegram-bot-api-mcp
npm ci
npm run build

Then configure an MCP client to start the built stdio server. Use an absolute repository path:

config.json
{
  "mcpServers": {
    "telegram": {
      "command": "node",
      "args": ["/absolute/path/dynamic-telegram-bot-api-mcp/dist/index.js"]
    }
  }
}

Before each telegram_call_method request, the server asks clients that support MCP roots for their current workspace root and loads <workspace-root>/.env. A project-local token overrides a shared process token, so one persistent MCP server can safely switch between repositories without restarting. Configuration and clients are cached only while the relevant connection settings remain unchanged; edits to .env are picked up on the next call.

The workspace must expose exactly one local directory root. Multiple roots return PROJECT_ROOT_AMBIGUOUS instead of guessing which bot to use. If the client does not support MCP roots or returns no roots, the server falls back to its startup environment and current working directory for backward compatibility.

For local development from the GitHub checkout, run npm run dev. Never commit a token.

Tool examples

Search:

config.json
{ "search": "send photo", "limit": 10 }

Inspect a method or object:

config.json
{ "method": "sendPhoto" }
config.json
{ "type": "InlineKeyboardMarkup" }

Call any method:

config.json
{
  "method": "sendMessage",
  "parameters": {
    "chat_id": 123456789,
    "text": "Hello"
  }
}

Method lookup is case-insensitive. Parameter names follow Telegram's official snake_case contract.

File uploads

File IDs and HTTP URLs pass through unchanged. A local path may be supplied for an InputFile-capable field:

config.json
{
  "method": "sendPhoto",
  "parameters": {
    "chat_id": 123456789,
    "photo": "./uploads/photo.jpg"
  }
}

For an explicit local upload descriptor or in-memory binary payload:

config.json
{ "path": "./uploads/photo.jpg", "filename": "photo.jpg", "contentType": "image/jpeg" }
config.json
{ "base64": "iVBORw0KGgo...", "filename": "photo.png", "contentType": "image/png" }

Descriptors also work inside nested media objects. For fields documented with attach://, local paths are replaced with attachment references and the request is sent as multipart/form-data. Upload bytes are normalized to an ArrayBuffer-backed copy before constructing each multipart file. Paths are resolved through realpath, restricted to configured roots, required to be regular files, and size-limited.

Configuration

Environment variableDefaultMeaning
TELEGRAM_BOT_TOKENunsetBot token; the active MCP workspace root's .env overrides the startup environment
TELEGRAM_API_BASE_URLhttps://api.telegram.orgAPI origin, including for a local Bot API server
TELEGRAM_METHOD_ALLOWLIST*Comma-separated exact names or * glob patterns
TELEGRAM_REQUEST_TIMEOUT_MS30000Per-attempt timeout
TELEGRAM_REQUEST_RETRIES2Retries for transport failures, HTTP 429, and 5xx responses
TELEGRAM_RATE_LIMIT_PER_SECOND25Process-local token refill rate
TELEGRAM_RATE_LIMIT_BURST30Process-local burst capacity
TELEGRAM_SCHEMA_MAX_AGE_HOURS24Startup refresh threshold; startup configuration only
TELEGRAM_SCHEMA_PATHbundled data/telegram-bot-api.jsonAlternate catalog location; startup configuration only
TELEGRAM_LOCAL_FILE_ROOTSactive workspace rootPlatform-delimited upload root allowlist
TELEGRAM_MAX_UPLOAD_BYTES52428800Per-file memory and local upload limit
TELEGRAM_ALLOW_UNKNOWN_PARAMETERSfalseForward-compatibility escape hatch during a stale-schema incident
LOG_LEVELinfodebug, info, warn, or error; startup configuration only

Validation and error behavior

The gateway validates method existence, unknown and required parameters, primitive types, arrays, nested Telegram objects, union variants, and cataloged enum values before sending a request. Telegram's prose contains some conditional rules that cannot be represented mechanically; Telegram remains authoritative for those constraints.

Tool failures are marked as MCP errors and return structured content:

config.json
{
  "ok": false,
  "error": "VALIDATION_ERROR",
  "description": "text: required parameter is missing",
  "parameters": {
    "issues": [{ "path": "text", "message": "required parameter is missing" }]
  }
}

Telegram error codes, descriptions, and response parameters such as retry_after and migrate_to_chat_id are preserved. HTTP error bodies and stack traces are not exposed.

Security model

  • The bot token is read only from the startup environment or the active MCP workspace root's .env. It is never included in tool output or audit fields, and defensive redaction is applied to Telegram descriptions.
  • The server refuses ambiguous multi-root workspaces and non-local roots instead of risking selection of the wrong bot.
  • Audit records are JSON lines on stderr and contain method name, parameter names, timing, retry count, and status—not parameter values.
  • Destructive method families (for example delete*, ban*, revoke*, refund*, and stop*) require confirm: true.
  • TELEGRAM_METHOD_ALLOWLIST can limit methods available to the call tool. Prefer a narrow production allowlist.
  • Local files are confined to TELEGRAM_LOCAL_FILE_ROOTS; symlink escapes and non-regular files are rejected.
  • Rate limiting is process-local. Use an external distributed limiter when running multiple replicas.

Retries can duplicate non-idempotent operations if the network fails after Telegram accepts a request. Set TELEGRAM_REQUEST_RETRIES=0 for workloads where that risk outweighs availability.

Schema updates

At startup, the server refreshes catalogs older than 24 hours. If an existing catalog is available and Telegram cannot be reached or the documentation shape fails integrity checks, startup continues with the last valid catalog. A first startup without any valid catalog fails closed.

Refresh manually with the MCP tool or:

Reviews

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

Frequently Asked Questions about Dynamic Telegram Bot API MCP

dynamic-telegram-bot-api-mcp is an MCP server that provides a dynamic, self-refreshing gateway to the complete Telegram Bot API. It exposes Telegram Bot API functionality through the Model Context Protocol, giving developers an MCP-based integration point for working with Telegram bot capabilities while keeping the gateway refreshed over time.

It provides access to the complete Telegram Bot API through a dynamic MCP gateway.

It uses a self-refreshing design to keep its Telegram Bot API gateway dynamically updated.

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 PreviewDynamic Telegram Bot API MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/dynamic-telegram-bot-api-mcp?style=directory)](https://allmcps.com/mcp/dynamic-telegram-bot-api-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/dynamic-telegram-bot-api-mcp"><img src="https://allmcps.com/api/badge/dynamic-telegram-bot-api-mcp?style=directory" alt="Dynamic Telegram Bot API MCP on AllMCPs" /></a>