by chaindead
Manages Telegram dialogs, messages, drafts, and read statuses via the Model Context Protocol, enabling AI assistants to query and interact with Telegram accounts.
The server acts as a bridge between the Telegram API and AI assistants, exposing tools that let assistants list dialogs, fetch messages, mark chats as read, and send drafts.
telegram-mcp auth --app-id <API_ID> --api-hash <API_HASH> --phone <PHONE>
(add --password
for 2FA or --new
to reset session).telegram-mcp
command and provide TG_APP_ID
and TG_API_HASH
as environment variables.tg_me
, tg_dialogs
, tg_read
, tg_dialog
, and tg_send
to interact with Telegram.tg_me
).tg_dialogs
).tg_read
).tg_dialog
).tg_send
).auth
command with the new number; the server will create a new session.brew upgrade chaindead/tap/telegram-mcp
; for NPX simply reinstall.The server is a bridge between the Telegram API and the AI assistants and is based on the Model Context Protocol.
[!IMPORTANT] Ensure that you have read and understood the Telegram API Terms of Service before using this server. Any misuse of the Telegram API may result in the suspension of your account.
The Model Context Protocol (MCP) is a system that lets AI apps, like Claude Desktop or Cursor, connect to external tools and data sources. It gives a clear and safe way for AI assistants to work with local services and APIs while keeping the user in control.
tool: tg_me
)tool: tg_dialogs
)tool: tg_read
)tool: tg_dialog
)tool: tg_send
)Here are some example prompts you can use with AI assistants:
You can install a binary release on macOS/Linux using brew:
# Install
brew install chaindead/tap/telegram-mcp
# Update
brew upgrade chaindead/tap/telegram-mcp
You can run the latest version directly using npx (supports macOS, Linux, and Windows):
npx -y @chaindead/telegram-mcp
When using NPX, modify the standard commands and configuration as follows:
npx -y @chaindead/telegram-mcp auth ...
{
"mcpServers": {
"telegram": {
"command": "npx",
"args": ["-y", "@chaindead/telegram-mcp"],
"env": {
"TG_APP_ID": "<your-api-id>",
"TG_API_HASH": "<your-api-hash>"
}
}
}
}
For complete setup instructions, see Authorization and Client Configuration.
Note: The commands below install to
/usr/local/bin
. To install elsewhere, replace/usr/local/bin
with your preferred directory in your PATH.
First, download the archive for your architecture:
# For Intel Mac (x86_64)
curl -L -o telegram-mcp.tar.gz https://github.com/chaindead/telegram-mcp/releases/latest/download/telegram-mcp_Darwin_x86_64.tar.gz
# For Apple Silicon (M1/M2)
curl -L -o telegram-mcp.tar.gz https://github.com/chaindead/telegram-mcp/releases/latest/download/telegram-mcp_Darwin_arm64.tar.gz
Then install the binary:
# Extract the binary
sudo tar xzf telegram-mcp.tar.gz -C /usr/local/bin
# Make it executable
sudo chmod +x /usr/local/bin/telegram-mcp
# Clean up
rm telegram-mcp.tar.gz
Note: The commands below install to
/usr/local/bin
. To install elsewhere, replace/usr/local/bin
with your preferred directory in your PATH.
First, download the archive for your architecture:
# For x86_64 (64-bit)
curl -L -o telegram-mcp.tar.gz https://github.com/chaindead/telegram-mcp/releases/latest/download/telegram-mcp_Linux_x86_64.tar.gz
# For ARM64
curl -L -o telegram-mcp.tar.gz https://github.com/chaindead/telegram-mcp/releases/latest/download/telegram-mcp_Linux_arm64.tar.gz
Then install the binary:
# Extract the binary
sudo tar xzf telegram-mcp.tar.gz -C /usr/local/bin
# Make it executable
sudo chmod +x /usr/local/bin/telegram-mcp
# Clean up
rm telegram-mcp.tar.gz
.zip
filetelegram-mcp.exe
to a directory in your PATHRequirements:
go install github.com/chaindead/telegram-mcp@latest
Before you can use the server, you need to connect to the Telegram API.
Get the API ID and hash from Telegram API
Run the following command:
Note: If you have 2FA enabled: add --password <2fa_password>
Note: If you want to override existing session: add --new
telegram-mcp auth --app-id <your-api-id> --api-hash <your-api-hash> --phone <your-phone-number>
📩 Enter the code you received from Telegram to connect to the API.
Done! Please give this project a ⭐️ to support its development.
Example of Configuring Claude Desktop to recognize the Telegram MCP server.
Open the Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Note: You can also find claude_desktop_config.json inside the settings of Claude Desktop app
Add the server configuration
for Claude desktop:
{
"mcpServers": {
"telegram": {
"command": "telegram-mcp",
"env": {
"TG_APP_ID": "<your-app-id>",
"TG_API_HASH": "<your-api-hash>",
"PATH": "<path_to_telegram-mcp_binary_dir>",
"HOME": "<path_to_your_home_directory"
}
}
}
}
for Cursor:
{
"mcpServers": {
"telegram-mcp": {
"command": "telegram-mcp",
"env": {
"TG_APP_ID": "<your-app-id>",
"TG_API_HASH": "<your-api-hash>"
}
}
}
}
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "telegram": { "command": "npx", "args": [ "-y", "@chaindead/telegram-mcp" ], "env": { "TG_APP_ID": "<YOUR_API_ID>", "TG_API_HASH": "<YOUR_API_HASH>" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by lharries
Enables searching, reading, and sending personal WhatsApp messages and media through a Model Context Protocol (MCP) server, storing all data locally in SQLite and exposing controlled tools for LLMs like Claude.
by iFurySt
Provides authenticated access to XiaoHongShu (RedNote) notes, supporting keyword search, note retrieval by URL, and cookie persistence via a Model Context Protocol server.
by korotovsky
Provides a powerful Model Context Protocol interface for Slack workspaces, enabling message retrieval, search, and optional posting via Stdio or SSE transports without requiring bot permissions.
by ZubeidHendricks
Provides a standardized interface for interacting with YouTube content, enabling video retrieval, transcript access, channel and playlist management, and advanced analytics through the Model Context Protocol.
by InditexTech
Provides Microsoft Teams integration via the Model Context Protocol, enabling reading, creating, replying to messages and mentioning members.
by chigwell
Provides a full‑featured Telegram integration for MCP‑compatible clients, enabling programmatic access to chats, messages, contacts, profile management, and group administration.
by EnesCinr
Interact with Twitter to post tweets and search tweets programmatically via an MCP server.
by carterlasalle
Securely interfaces with the macOS Messages database via MCP, enabling LLMs to query, analyze, filter, and send iMessage or SMS communications with built‑in phone number validation, attachment handling, and group chat support.
by v-3
Enables large language models to interact with Discord channels, allowing them to send and read messages through Discord's API while keeping user control and security.