Telegram MCP Server
Provides access to a Telegram account, allowing agents to list chats, read and search messages, and send messages to allowlisted chats.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Telegram MCP Serverwhat did the team decide in the design channel yesterday?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Telegram MCP Server
Give any AI agent access to your Telegram account. An MCP (Model Context Protocol) server that lets Claude Code, Claude Desktop, Cursor, Codex, Windsurf, or any MCP-compatible agent read, search, and send Telegram messages on your behalf.
Built on MTProto via teleproto (the maintained GramJS fork), so it works with your real account — every chat, group, and channel you are in — not just a bot.
Why
Bot API bots only see chats you explicitly add them to. This server signs in as you, so an agent can answer "what did the team decide in the design channel yesterday?", triage your unread DMs, or post a build result to the chat you actually use — without you leaving your editor.
Related MCP server: Telegram MCP Server
Quick start
git clone https://github.com/codedpro/telegram-mcp-server
cd telegram-mcp-server
npm install
cp .env.example .envGet
TELEGRAM_API_IDandTELEGRAM_API_HASHfrom https://my.telegram.org → API development tools, and put them in.env.Log in once and copy the printed session string into
.env:npm run loginBuild it:
npm run build
Connect it to Claude Code
claude mcp add telegram -- node /absolute/path/to/telegram-mcp-server/dist/index.jsConnect it to Claude Desktop / Cursor
{
"mcpServers": {
"telegram": {
"command": "node",
"args": ["/absolute/path/to/telegram-mcp-server/dist/index.js"]
}
}
}Tools
Tool | What it does |
| Which account is signed in, and what it is allowed to do |
| Recent dialogs with ids, kind, and unread counts |
| Recent messages from one chat |
| Full-text search in one chat or across all of them |
| Send a message (allowlisted chats only) |
Safety
Writes are off by default. telegram_send_message refuses every chat that is not in TELEGRAM_WRITE_ALLOWLIST, so the default install is read-only. Start narrow:
TELEGRAM_WRITE_ALLOWLIST=me,@my_test_groupTwo things worth knowing before you run this:
The session string is your account. Anyone holding it is logged in as you, with no second factor. It is gitignored here — keep it that way, and revoke it from Telegram → Settings → Devices if it ever leaks.
Automating a personal account is against Telegram's ToS if you spam with it. Personal, low-volume, human-paced use is what userbots have always been used for and is broadly fine; blasting messages will get the account limited or banned. If you only need a bot identity, use the Bot API instead — it is the supported path.
Roadmap
Read/unread state and mark-as-read
Media: download and send files, photos, voice notes
Streaming: push new messages to the agent as they arrive
npx telegram-mcp-serverwith zero-config setupOptional Bot API mode for people who do not want a userbot
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Multi-tenant Telegram gateway for AI agents — HTTP+stdio, 8 tools, MTProto User API
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Unofficial Telegram MCP server — read, search, reply and react in your own Telegram account.
Related MCP Servers
- AlicenseCqualityDmaintenanceConnects AI tools to Telegram via MCP, enabling reading chats, sending messages, managing groups, and more using your own account.545MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Telegram accounts, chats, messages, media, and more via MCP, using Telethon.Apache 2.0
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to control a real Telegram user account via MTProto, allowing message sending, chat reading/searching, and message management through MCP tools.25 npm-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants like Claude to read, search, and send messages through your personal Telegram account via MCP tools.MIT