telegram-mcp-server
The Telegram MCP Server allows AI assistants to interact with Telegram accounts through the user client API. Key features include channel listing and message retrieval. It requires Node.js and Telegram API credentials to function.
What are the prerequisites for running the Telegram MCP Server?
You need Node.js version 18 or later, an active Telegram account with 2FA enabled, and Telegram API credentials (api_id and api_hash).
How do I configure the Telegram MCP Server?
Configure the server using environment variables in a .env
file with your Telegram API credentials and phone number.
How do I handle login prompts when starting the server?
Ensure the data/session.json
file exists and is valid. You may need to run npm start
manually to refresh the session.
What should I do if channels seem outdated or missing?
Delete ./data/dialog_cache.json
and restart the server to force a full refresh of the chat cache.
Where can I find more information about the underlying library?
Refer to the LIBRARY.md
file in the repository for details on using the telegram-client.js
library directly.