Telegram MCP
Provides tools for posting text, a photo with caption, or an album to a configured Telegram channel; editing existing publications; and reading channel information, permissions, subscriber count, and collected subscriber history.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Telegram MCP
An independent MCP server for posting in a Telegram channel, editing a specific publication and reading the subscriber count. It accepts text, one photo with a caption or an album. The bot connection is scoped to the configured channel. Telegram credentials are supplied by the operator.
Run locally
Requires Node.js 20 or later. Run npm ci, then npm test. Create a bot in
BotFather, add it as an administrator of the channel and grant publishing
rights. Grant editing rights if the bot needs to edit messages.
Use the numeric channel ID when possible so that changing a public handle does
not change which channel the connection addresses.
Set TELEGRAM_BOT_TOKEN, TELEGRAM_CHANNEL and TELEGRAM_STATE_DIR. The last
variable points to a persistent directory writable only by the service account.
Run node server.mjs --stdio from an MCP client or npm start for Streamable HTTP
at /mcp. Example configuration for a local stdio client:
{
"mcpServers": {
"telegram": {
"command": "node",
"args": ["/path/to/telegram-mcp/server.mjs", "--stdio"],
"env": {
"TELEGRAM_CHANNEL": "-1001234567890",
"TELEGRAM_STATE_DIR": "/path/to/telegram-state"
}
}
}
}Supply the bot token from the client's secret store or its process environment.
For remote HTTP, put the service behind HTTPS, configure MCP_TOKEN and use
MCP_PUBLIC_HOST for the expected Host header. Set MCP_HOST and MCP_PORT
for listening. Use one persistent state directory per connection. Share it
between instances only where the filesystem supports atomic exclusive file
creation and rename. Keep the directory across restarts.
Related MCP server: Telegram Relay Rich Markdown MCP
Use the tools
channel_infogives the channel, posting and editing permissions and the subscriber count if Telegram provides it.subscriber_historyreturns the collected daily subscriber samples in the requested date range. Requesting a fresh sample stores today’s count.publish_textandpublish_photosreturn channel and message identifiers and links. Photos may be Telegram file IDs or base64 originals. An authorized BiNetwork artifact is an additional input when the operator setsBN_ARTIFACT_TRANSFER_URLto the exact trusted artifact-transfer endpoint.edit_publicationchanges the text, caption or photo of an addressed post.publication_statusreads the last receipt for an operation. It does not read the current channel history.
Use a new operation identifier for a new action. Reuse the same identifier and
arguments to recover an earlier action. When Telegram may have accepted the
request and the response was lost, the receipt is unknown. Check the
channel before deciding on a new operation. Explicit Telegram failures include
the provider reason and any retry delay. Removing the state directory also
removes the ability to recover previous operations.
Subscriber history contains only counts sampled through this connection. Historical reach and arbitrary channel history remain outside what a regular Bot API connection offers. The server does not modify any existing Telegram webhook.
For a first read-only check, list tools in the client and call publication_status with a fresh operation ID. It returns not_observed without contacting Telegram. With your bot configured, channel_info checks the channel and bot permissions. Sending a post is a separate tool call.
If you use a browser-based HTTP client, serve it from the same origin as the MCP endpoint. For remote use the expected origin is https:// followed by MCP_PUBLIC_HOST. Native MCP clients can omit the Origin header.
npm test opens both an independent HTTP client and a separate stdio process. Tests cover a photo album, editing, simultaneous retries and an operation with a lost reply. Telegram calls use a local test double. The protocol is documented in the MCP transport specification. Channel capabilities and limits follow the official Telegram Bot API.
License
MIT. This server can be used, modified and distributed independently of BiNetwork, including commercially. Dependencies retain their original licenses.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Schedule posts, read analytics and manage Telegram channels in TGStudio from any MCP client.
Run a Telegram channel from your AI agent. Posts go out through your own bot, not your account.
Publish and schedule Telegram channel posts from your AI assistant.
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to publish, edit, search, and manage messages in Telegram channels via a set of MCP tools.8MIT
- AlicenseNot gradedqualityCmaintenanceEnables sending rich markdown messages to a fixed Telegram channel via MCP.MIT
- AlicenseNot gradedqualityDmaintenanceEnables publishing posts to a Telegram channel via an MCP tool, designed for scheduled content delivery and integration with Claude.ISC
- AlicenseNot gradedqualityCmaintenanceEnables managing Telegram channels from MCP-capable AI assistants, including drafting and scheduling posts, publishing content, and retrieving channel analytics.MIT