Dotiphant
Provides access to a local archive of your Telegram chats, including people, groups, forum topics, and optional channels. The MCP server allows AI assistants to search and read message history, media, and recent activity from the archive, while Dotiphant syncs read-only from Telegram.
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., "@Dotiphant what did Clara and I agree on about the launch date?"
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.
Dotiphant
Your Telegram chats, searchable on your own computer and readable by your AI assistant.
AI assistants can't read your Telegram. Bots only see messages sent after they join, never the history. Cloud CRMs that sync Telegram want your account on their servers. Dotiphant logs in as you, copies your chats into a single file on your own computer, and lets your AI assistant read that file when you ask it to.

What you get
The full history of your chats with people and groups, including forum topics and groups that were upgraded to supergroups. Channels are optional.
A local viewer in your browser with fast full-text search, media, and "copy as Markdown" for any chat or time range.
An MCP server, so Claude Desktop, Claude Code, Codex and Cursor can search and read your archive. ChatGPT, claude.ai and other apps that support remote MCP servers can connect through the optional HTTP mode behind a tunnel you run (see docs/remote-access.md).
Markdown export on the command line, ready to pipe into any AI tool.
Read-only toward Telegram: Dotiphant never sends, edits, deletes or marks anything as read.
Your Telegram session and API keys stay in the system keychain. The archive is a SQLite file in a private folder.
Background refresh every 15 minutes, if you want it.
Related MCP server: telegram-plugin
Quick start
On macOS or Linux, paste this into a terminal:
curl -fsSL https://dotiphant.com/install.sh | shThe script is about 150 lines; read it first. It installs uv if needed (uv brings its own Python), installs the latest Dotiphant release from GitHub, and runs dotiphant open. To update, run it again; it also stops a viewer that still runs the old version.
The installer checks the download against the release's SHA-256 checksums and stops on a mismatch. To check a release yourself, see Verify a download.
Dotiphant ships as GitHub releases, not on PyPI. Other ways, if you already have uv:
Goal | Command |
Install a release |
|
From a local clone |
|
Update |
|
The command is dotiphant; phant is a short alias.
dotiphant open walks you through setup in your browser in about 5 minutes. dotiphant setup does the same in the terminal. Both are safe to run again:
Create your own Telegram API id and hash at my.telegram.org (free, about a minute).
Log in by scanning a QR code with the Telegram app (Settings > Devices > Link Desktop Device). Phone login works too.
Choose what to archive: people and groups by default, the last 365 days or everything.
Run the first sync.
Connect the AI apps it finds on your computer, and turn on background refresh.

Afterwards:
dotiphant open # browse and search in your browser
dotiphant connect claude-desktop # or claude-code, codex, cursorNot comfortable with a terminal? Give docs/install-with-ai.md to Claude Code, Codex or another AI assistant that can run commands, and it will install Dotiphant with you.
Try it without Telegram
dotiphant demoThis opens the viewer on made-up chats, stored apart from your real data. No login needed. It uses port 8764, so it can run next to dotiphant open.
Things to ask your AI assistant
"What did Clara and I agree on about the launch date?"
"Summarize what happened in my groups since yesterday."
"Which messages do I still owe an answer to this week?"
"Find the wallet address someone sent me in the Acme group."
"Draft a reply to Wendell based on our last conversation." (Dotiphant never sends it; you do.)
Commands
Command | What it does |
| Open the viewer at http://127.0.0.1:8765, with setup on first run. |
| The same guided setup in the terminal. Safe to re-run; finished steps are skipped |
| Fetch new messages now, for all chats or the ones named. A named chat also gets edits to its recent messages. Sync also keeps each chat's profile photo. Exits with 3 when some chats could not be read (they are retried next time), 2 when not logged in or the archive belongs to another account |
| Fetch new or changed chat profile photos without a full sync. |
| Login, archive size, last sync, background refresh |
| Check the installation and print fixes |
| Connect an AI app to your archive, or list the apps it can connect |
| List archived chats |
| Full-text search, with |
| Print a chat as Markdown, |
| What happened in the last 24 hours |
| Download photos, files and voice notes of a chat |
| Refresh in the background every N minutes |
| The MCP server (AI apps start this themselves) |
| Remote access for ChatGPT, claude.ai and other remote MCP apps: docs/remote-access.md |
| Add a Telegram Desktop JSON export ( |
| Show which chats AI apps may read. |
| Delete a chat and its media from the archive, and stop syncing it |
| Try the viewer with made-up chats |
| Stop a running viewer and the demo viewer, for example after an update |
| Log in again, or end the session |
CHAT can be a chat id, an @username or part of the title. Run dotiphant COMMAND --help for all options.
dotiphant export "Acme" --since 7d | claude -p "What are the open action items?"Privacy and safety
Everything stays on your computer. Dotiphant has no cloud service and sends no telemetry.
Dotiphant only reads from Telegram, and paces its requests, and waits whenever Telegram asks it to slow down.
The viewer listens on 127.0.0.1 only. The MCP server talks to AI apps over stdio and opens no port.
The optional HTTP MCP server listens on 127.0.0.1 and needs a bearer token or an app you approved with a one-time pairing code. With
--host ADDRESS --allow-remoteit listens on that address instead, and other machines can reach it. Remote access through a tunnel: docs/remote-access.md.Message text handed to an AI is marked as untrusted, and the AI is told never to follow instructions found in messages. This lowers the risk of prompt injection; no tool can rule it out.
When you ask an AI app a question, the messages it reads go to that app's provider, the same as anything else you paste into it.
You choose which chats AI apps may read. Hide single chats, or allow only the chats you pick, with
dotiphant aior the "Visible to AI apps" switch on a chat's page. Hidden chats are never listed, searched or read by AI apps. The viewer and the CLI still show every chat.The stored session gives full access to your Telegram account. Protect your computer like you protect your phone.
Dotiphant never uses your messages to train AI models.
Details, and how to wipe everything: docs/security.md. What data exists and who receives it: docs/privacy.md. Common questions: docs/faq.md.
Not affiliated with Telegram
Dotiphant is an independent, unofficial app that uses the Telegram API. It is not made, endorsed or supported by Telegram. It uses the public Telegram API with your own API credentials, and you are responsible for using it within the Telegram API Terms of Service. Using Telegram data with AI apps is also subject to Telegram's Terms for Content Licensing and AI Scraping. Check both before you connect an AI app.
Use at your own risk
Dotiphant is built with care, on a best-effort basis. Use it at your own risk. It comes without any warranty, and its authors accept no liability for damage or loss, as set out in the MIT license.
License
MIT
Available Tools
6 toolschat_infoChat detailsBRead-only
Details of one chat: kind, members, forum topics, most active participants with usernames, and archive coverage (first and last message).
Inputs: chat (required). Returns: result
get_messagesRead messagesARead-only
Read one chat in chronological order, one line per message ([ref], #id, date UTC, sender, text).
Without since/around_message_id you get the newest limit messages (the right call
for "latest from X" or drafting a reply). around_message_id: the context of a search
hit. before_message_id / after_message_id: the limit messages just before or after
that one, to page through history; after_chat: the chat of the after_message_id
message when the paging note names one. since/until: a time range like "7d" or
"2026-09-01". limit: at most 300.
topic: forum topic id or title. media: only messages with an attachment, to list
shared files: "files" (photos, videos, documents, voice, audio), "any", or one of
photo, video, document, voice, audio, sticker, poll, link.
Inputs: chat (required), limit, media, since, +6 more. Returns: result
list_chatsList chatsARead-only
List archived Telegram chats with chat id, kind, last activity and message count, most recent first. Use it to find a chat id or to see when a chat was last active.
query: part of a chat title or username. kind: private, group, channel or bot. active_since: only chats with messages since then, like "24h", "7d" or "2026-09-01".
Inputs: kind, limit, query, active_since. Returns: result
recent_activityRecent activityARead-only
What happened recently across chats, most recent first: per chat the number of new messages, the latest few, and a flag on chats waiting for the user's reply. Use for "what's new", "what did I miss" and "who am I owing an answer".
since: "24h", "7d", "2026-09-01". chats: limit to these chats. per_chat: messages shown per chat (max 20). kind: only private chats, groups, channels or bots.
Inputs: kind, chats, since, per_chat. Returns: result
refreshRefresh from TelegramAIdempotent
Fetch new messages from Telegram into the archive (all chats, or one chat), then wait up to wait_seconds (max 300) for it to finish. Refreshing one chat also picks up edits to its recent messages. Never sends anything to Telegram.
Inputs: chat, wait_seconds. Returns: result
search_messagesSearch messagesARead-only
Keyword search over all archived messages and file names, newest first, grouped by chat. Returns message ids to open with get_messages(around_message_id=...).
query: 1 to 3 distinctive words; every word must match, as a prefix ("audit" also finds "audits"). If no message has all words, messages with any of them are returned. Use "quoted phrases" and OR for alternatives (launch OR release). Not semantic: search for words the messages would contain, not for the question. chat: chat id, @username or part of a title. sender: part of a sender name or username. since/until: "24h", "7d", "2026-09-01" or an ISO timestamp. media: only messages with an attachment: "files" (photos, videos, documents, voice, audio), "any", or one of photo, video, document, voice, audio, sticker, poll, link.
Inputs: query (required), chat, limit, media, +3 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct read-only role: listing chats, detailing one chat, searching messages, reading a chat, summarizing recent activity, and syncing the archive. There is minor overlap between list_chats, chat_info, and recent_activity, but their descriptions make the boundaries clear.
All names use consistent lowercase snake_case, making the set readable. However, the verb_noun pattern is only followed by list_chats, search_messages, and get_messages, while chat_info, recent_activity, and refresh deviate.
Six tools is well-scoped for a read-only Telegram archive browser, with each tool covering a distinct workflow. No tool feels redundant or missing from the core set.
The surface covers chat discovery, message search, chronological reading with paging, recent activity summaries, chat metadata, and archive refresh. For a read-only archive, there are no obvious dead ends or missing lifecycle operations.
Maintenance
Related MCP Connectors
Your personal Telegram account for AI: read, search and sum up chats. QR login, no API key.
12Your Telegram, WhatsApp, Instagram, mail and calendar in Claude or ChatGPT. Never sends messages.
Your personal data for AI — Telegram, bank, courses, Zoom & more, scoped to you.
Let AI assistants post to your Telegram chats, groups and channels. Not affiliated with Telegram.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read chats, Saved Messages, files and media, search history, and send messages through your personal Telegram account.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to read your own Telegram account via MTProto, including listing chats, searching and reading message history, resolving chats, and downloading attachments, with sending available only when explicitly enabled.MIT
- AlicenseAqualityCmaintenanceEnables AI agents to access and search Telegram conversations, including transcribed voice messages and OCR'd images, and to draft messages that require user approval before sending.152MIT
- AlicenseBqualityBmaintenanceGives AI coding tools read-only access to a Telegram account over MCP, enabling listing and searching of public channels, private channels, groups and chats, offline indexing and comparison of chats, inspection of message and file context, and fast resumable downloads of matched files. Every request is tracked as an inspectable workflow with progress, and the AI can ask the user questions or pause for approval before large downloads.281MIT