Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"mcptelegramserver": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MCP (Model Context Protocol) server for Telegram. Lets AI assistants (Claude, etc.) read and send Telegram messages on your behalf via MCP tools. Runs as a regular Telegram user — not a bot.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in communication
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
An MCP server that securely interfaces with your iMessage database via the Model Context Protocol (MCP), allowing LLMs to query and analyze iMessage conversations. It includes robust phone number validation, attachment processing, contact management, group chat handling, and full support for sending and receiving messages.
MCP server for Kaseya Autotask PSA — 39 tools for companies, tickets, projects, time entries, and more
Email & SMS infrastructure for AI agents — send and receive real email and text messages programmatically
MCP Security Weekly
Get CVE alerts and security updates for MCPTelegramServer and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
MCP (Model Context Protocol) server for Telegram. Lets AI assistants (Claude, etc.) read and send Telegram messages on your behalf via MCP tools. Runs as a regular Telegram user — not a bot.
Go to my.telegram.org → API development tools → create an app.
You'll get api_id and api_hash.
cp .env.example .env
Edit .env:
TELEGRAM_API_ID=your_api_id
TELEGRAM_API_HASH=your_api_hash
TELEGRAM_PHONE=+79001234567
POSTGRES_PASSWORD=strong_password
REDIS_PASSWORD=strong_password
MCP_PASSWORD=strong_password
MCP_ADMIN_PASSWORD=strong_password
docker-compose up -d --build
On first start, TDLib needs a confirmation code sent to your phone. Pass it via environment variable — no interactive input needed:
# First run: TDLib sends code to your phone
docker-compose up app
# Wait for "AuthorizationStateWaitCode" in logs, then Ctrl+C
# Re-run with the code (and 2FA password if enabled)
docker-compose run --rm -e TELEGRAM_AUTH_CODE=12345 -e TELEGRAM_AUTH_PASSWORD=yourpassword app
# Wait for "TDLib: authorized successfully", then Ctrl+C
# Start in background — session is saved, no re-auth needed
docker-compose up -d app
Session is saved in a Docker volume — you won't need to re-authorize on restart.
curl -u mcp:your_mcp_password -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
Telegram (MTProto)
└── TDLib (tdlight-java)
└── TdLibTelegramClient
├── MCP Tools ──────────────── POST /mcp ← AI client (Claude, etc.)
│ get_dialogs
│ search_dialog
│ get_unread_messages
│ get_last_messages
│ send_message
│
└── TelegramUpdateListener
└── Redis Pub/Sub
└── WebSocketBroker
├── PostgreSQL (history)
└── STOMP /topic/messages → Admin UI
All requests: POST /mcp with HTTP Basic Auth.
curl -u mcp:password -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
Returns list of dialogs with unread counts.
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_dialogs",
"arguments": { "limit": 50 }
},
"id": 2
}
Response:
[
{ "chat_id": 123456, "type": "PRIVATE", "title": "Alice", "unread_count": 3 },
{ "chat_id": -1001234, "type": "SUPERGROUP", "title": "Dev Team", "unread_count": 0 }
]
Search dialogs by name.
{
"method": "tools/call",
"params": { "name": "search_dialog", "arguments": { "query": "Alice" } }
}
All unread messages across all dialogs.
{
"method": "tools/call",
"params": { "name": "get_unread_messages", "arguments": {} }
}
Last N messages from a dialog.
{
"method": "tools/call",
"params": {
"name": "get_last_messages",
"arguments": { "dialog_id": 123456, "count": 10 }
}
}
Send a message to a dialog.
{
"method": "tools/call",
"params": {
"name": "send_message",
"arguments": { "dialog_id": 123456, "text": "Hello!" }
}
}
Available at http://localhost:8080/admin (credentials: