- Getting Started
- [ Usage](# -usage)
- Available Tools
- [ Troubleshooting](# -troubleshooting)
- Contributing
- License
Getting Started
Prerequisites
- Python 3.10 or higher
- `uv` Install via the official uv guide.
Installation
mcp-telegram CLI tool:Usage
[!IMPORTANT] Please ensure you have read and understood Telegram's ToS before using this tool. Misuse of this tool may result in account restrictions.
mcp-telegram command-line tool is your entry point.Login
- API ID & API Hash: Obtain these from my.telegram.org/apps.
- Phone Number: Your Telegram-registered phone number (international format, e.g.,
+1234567890).
- Verification Code: Sent to your Telegram account upon first login.
- 2FA Password: If you have Two-Factor Authentication enabled.
[!WARNING] Keep your API credentials private and never share them publicly
[!NOTE] Usemcp-telegram logoutto logout from current session ormcp-telegram clear-sessionto remove all stored session data.
Connect to the MCP server
[!Note] Configuration paths vary by OS and client. For example:
[!IMPORTANT] If your client cannot executemcp-telegramdespite it being accessible in the terminal, try using the full path to the executable. You can find this by runningwhich mcp-telegram(macOS/Linux) orwhere mcp-telegram(Windows) in your terminal. Replace thecommandvalue in the configuration with the full path.
Available Tools
Messaging Tools
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
Search & Navigation
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
Draft Management
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
Media Handling
[object Object] | [object Object] |
[object Object] | [object Object] |
[!Note] For detailed parameter information and example use cases, runmcp-telegram toolsin your terminal.
Troubleshooting
Database Locked Errors
mcp-telegram instances using the same session file can cause database is locked errors due to Telethon's SQLite session storage. Ensure only one instance uses a session file at a time.- macOS / Linux:
pkill -f "mcp-telegram"
- Windows:
taskkill /F /IM mcp-telegram.exe /T(Check Task Manager for the exact process name)
Contributing
License
- Getting Started
- [ Usage](# -usage)
- Available Tools
- [ Troubleshooting](# -troubleshooting)
- Contributing
- License
Getting Started
Prerequisites
- Python 3.10 or higher
- `uv` Install via the official uv guide.
Installation
mcp-telegram CLI tool:Usage
[!IMPORTANT] Please ensure you have read and understood Telegram's ToS before using this tool. Misuse of this tool may result in account restrictions.
mcp-telegram command-line tool is your entry point.Login
- API ID & API Hash: Obtain these from my.telegram.org/apps.
- Phone Number: Your Telegram-registered phone number (international format, e.g.,
+1234567890).
- Verification Code: Sent to your Telegram account upon first login.
- 2FA Password: If you have Two-Factor Authentication enabled.
[!WARNING] Keep your API credentials private and never share them publicly
[!NOTE] Usemcp-telegram logoutto logout from current session ormcp-telegram clear-sessionto remove all stored session data.
Connect to the MCP server
[!Note] Configuration paths vary by OS and client. For example:
[!IMPORTANT] If your client cannot executemcp-telegramdespite it being accessible in the terminal, try using the full path to the executable. You can find this by runningwhich mcp-telegram(macOS/Linux) orwhere mcp-telegram(Windows) in your terminal. Replace thecommandvalue in the configuration with the full path.
Available Tools
Messaging Tools
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
Search & Navigation
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
Draft Management
[object Object] | [object Object] |
[object Object] | [object Object] |
[object Object] | [object Object] |
Media Handling
[object Object] | [object Object] |
[object Object] | [object Object] |
[!Note] For detailed parameter information and example use cases, runmcp-telegram toolsin your terminal.
Troubleshooting
Database Locked Errors
mcp-telegram instances using the same session file can cause database is locked errors due to Telethon's SQLite session storage. Ensure only one instance uses a session file at a time.- macOS / Linux:
pkill -f "mcp-telegram"
- Windows:
taskkill /F /IM mcp-telegram.exe /T(Check Task Manager for the exact process name)