Telegram MCP Server
by kdoronin
This server allows AI agents and other MCP clients to interact with the Telegram API through the Model Context Protocol (MCP). It provides a bridge between Telegram and AI applications.
Last updated: N/A
What is Telegram MCP Server?
The Telegram MCP Server is a Node.js application that enables interaction with the Telegram API using the Model Context Protocol (MCP). It acts as a server that MCP clients (like AI agents) can connect to and use to send and receive messages, manage dialogs, and execute other Telegram API methods.
How to use Telegram MCP Server?
To use the server, you need to clone the repository, install dependencies, configure the .env
file with your Telegram API ID and Hash, and then run the server using one of the provided methods (npm script, direct node execution, executable file, or global installation). MCP clients can then be configured to connect to the server using the specified command.
Key features of Telegram MCP Server
Provides a MCP interface to Telegram API
Supports multiple sessions
Offers tools for managing dialogs and sending messages
Allows execution of arbitrary Telegram API methods
Saves sessions to files for persistent authorization
Use cases of Telegram MCP Server
Integrating Telegram with AI assistants
Automating Telegram tasks
Building Telegram bots with MCP
Connecting Telegram to other applications via MCP
Enabling AI agents to communicate through Telegram
FAQ from Telegram MCP Server
What are the requirements for running the server?
What are the requirements for running the server?
Node.js 14+, npm, and Telegram API ID and API Hash.
How do I get API ID and API Hash?
How do I get API ID and API Hash?
Go to my.telegram.org, log in, navigate to API development tools, and create a new application.
How do I configure the server for Cursor or Claude Desktop?
How do I configure the server for Cursor or Claude Desktop?
Open the respective application's settings, go to MCP Servers/Tools, add a new server, and configure the name, type (command), and command (e.g., node /full/path/to/project/mcp-server.js
).
What tools are available?
What tools are available?
getDialogs
, getMessages
, sendMessage
, and executeMethod
.
Where are sessions stored?
Where are sessions stored?
Sessions are stored in the sessions/
directory as JSON files named after the phone number.