Skip to main content
MCP server CX Codex

Better-TG-CLI (Telegram) — Claude Code MCP server: install

Better-TG-CLI (Telegram) is a Claude Code MCP server for reading and searching chats, sending messages, and pressing bot buttons. Every write waits for approval.

MIT ★ 11 updated 2026-11-15

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env TG_PROFILE=<TG_PROFILE> --transport stdio better-tg-cli-telegram -- npx -y better-tg-cli
Open on GitHub

What Better-TG-CLI (Telegram) does

Better-TG-CLI connects an agent to its own Telegram account through the telegram CLI and the telegram mcp server. It can inspect chats, search messages, interact with bots, and press their buttons. Sending, editing, or deleting a message requires approval of the exact action text.

The package also exposes a CLI with roughly 60 commands and formats output for agent use. Write activity is recorded in ~/.config/tg/audit.jsonl. This is an unofficial client, so Telegram may limit or freeze accounts, with higher risk from bulk messaging, mass joins, or invites. npm installation requires Node 20+; a standalone binary is another option.

What it helps with

  • read Telegram chats through an agent
  • search messages by chat and filters
  • send a message after text approval
  • press buttons in Telegram bot menus

Example prompts for the agent

  • Read the latest messages from @alice and summarize them.
  • Find Telegram messages about release v2.4 within the requested date range.
  • Prepare this message for the chat, show the exact text, and wait for my approval before sending.

How to install Better-TG-CLI (Telegram)

Platform CLI

claude mcp add --env TG_PROFILE=<TG_PROFILE> --transport stdio better-tg-cli-telegram -- npx -y better-tg-cli

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Better-TG-CLI (Telegram)

How do I install Better-TG-CLI (Telegram) in Claude Code?

Run claude mcp add better-tg-cli -- npx -y better-tg-cli. This adds the MCP server through npm.

What does Better-TG-CLI (Telegram) do?

It gives an agent access to chat reading and search on its own Telegram account, message sending, and bot buttons. Each write asks for approval.

What does Better-TG-CLI (Telegram) need to work?

It needs a personal Telegram account and Node 20+ when installed through npm. A standalone binary can be used instead of Node.

Similar MCP servers

All MCP servers for Telegram bots →

Project sponsors

Companies that keep this analytics open