tgmcp
Read-only access to Telegram chats. Provides tools to list chats (filtered by name or kind), get chat details (members, linked discussion group), list forum topics, search messages in one or all chats, read chat history page by page, and retrieve a message with surrounding context. Never sends, edits, deletes, forwards, or reacts to messages; does not download photos or files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tgmcpsearch my Telegram chats for what Nora said about the boots"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
tgmcp
Read-only Telegram MCP server: let any model list, search and read your own chats. Secrets encrypted at rest.
Read-only; the list below says what it never does. It works with any MCP client (MCP: the standard way AI apps plug in tools; for example Claude Code or LM Studio), and tgmcp ask answers with a model on your own PC.
Who it is for
Anyone who keeps useful things in Telegram chats (advice, links, group discussions) and wants to ask a model about them. You do not need to program, only to copy commands into a terminal on Windows.
Related MCP server: telegram-user-mcp
Quick start
You need Python 3.14 and Git. The commands are for cmd.exe; in Git Bash write .venv/Scripts/... instead of .venv\Scripts\.... docs/setup.md explains every step.
Get a Telegram API key: open https://my.telegram.org, log in, choose "API development tools", create an application, note
api_idandapi_hash.git clone https://github.com/lum1nxus/telegram-mcp && cd telegram-mcppy -3.14 -m venv .venv && .venv\Scripts\python -m pip install --require-hashes -r requirements.lock && .venv\Scripts\python -m pip install --no-deps -e ..venv\Scripts\tgmcp login(it asks for the API id, the API hash, your phone number, the code Telegram sends (usually inside the Telegram app) and your two-step password if you set one)claude mcp add --scope user telegram -- "C:\full\path\telegram-mcp\.venv\Scripts\tgmcp.exe" serve, with the full path of your cloned folder (cdin cmd.exe prints it). This is for Claude Code; other clients: docs/setup.md.Restart your client (in Claude Code: start a new session).
Then ask your client or model about your chats.
With a local model instead (Ollama installed, model pulled): .venv\Scripts\tgmcp ask "What did Nora say about the boots?" --model gemma4:12b. See docs/local-models.md.
What it can do
Six tools, all read-only. Details, arguments and limits: docs/tools.md.
Tool | What it does |
| lists your chats, filtered by name or kind |
| details of one chat: members, linked discussion group |
| the topics of a forum group |
| searches messages in one chat or in all chats, can also try other word forms and scripts when asked with expand=true |
| reads a chat's history, newest first, page by page |
| one message with the messages around it |
What it never does
Send, edit, delete, forward or react to messages, or mark anything as read.
Join, leave or pin chats.
Download photos or files: a message only says that it has one.
Keep a copy of your chats on disk.
Privacy in one paragraph
Your Telegram login and API hash are stored in one file, encrypted with Windows DPAPI so that only your Windows user on this PC can open it. Nothing from your chats is written to disk; the log holds chat ids, counts and error types, never message text. What a tool returns goes to the model you use: with a cloud client such as Claude Code it goes to that company's servers, with a local model it stays on your PC. Details, limits and the threat model: docs/privacy.md.
Documentation
Page | Read it when |
you install it, connect it to a client, something fails, or you remove it | |
you want a model on your own PC (LM Studio, Ollama) or want to compare models | |
you want to know exactly what each tool takes and returns | |
you want to know what it can see, where things are stored, and what it does not protect against | |
you wonder what may come next | |
you want to change the code | |
you found a security problem |
Status
Version 0.1.0: the six tools (v1) and local models (
tgmcp ask,tgmcp bench) are merged.Not yet verified live: the LM Studio path (chat window and
--backend lmstudio), and a fulltgmcp benchon the candidate models.Pinned versions: Telethon 1.45, mcp 2.3, Python 3.14 for the locked install.
License
MIT, see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Unofficial Telegram MCP server — read, search, reply and react in your own Telegram account.
Hosted Telegram MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server that lets AI agents read personal Telegram chats from an allowlist of folders, with no send/edit/delete capability.14 npmMIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects to Telegram as your real user account and exposes read-only tools to read and search messages, list chats and folders, inspect group info, and download media.16 npmMIT
- AlicenseNot gradedqualityBmaintenanceRead-only MCP server for Telegram that enables reading messages and transcribing voice, audio, and video notes via the Telegram API for use with Codex and Claude Code.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceA read-only Telegram MCP server that only exposes a user-defined allowlist of chats, providing tools to list chats, fetch messages, search, and get context while stripping untrusted text and with no write capabilities.MIT