Telegram Archive

io.github.GeiserX由 GitHub 帳號 GeiserX 發布v0.4.1更新於 Oct 29, 2026

Search and read your archived Telegram chats and messages

已驗證STDIO僅桌面知識與記憶溝通與協作

概覽

AI 產生的概覽

一個 MCP 伺服器,讓助理搜尋、瀏覽並閱讀自架 Telegram-Archive 執行個體中封存的 Telegram 聊天與訊息。

可以做什麼
  • 列出聊天與資料夾,可依名稱、封存狀態或資料夾篩選
  • 在所有聊天中或單一聊天、論壇主題內搜尋訊息文字
  • 分頁讀取聊天、依指定時區讀取某一天的訊息,或讀取某則訊息前後的上下文
  • 列出論壇主題、置頂訊息以及單一聊天的訊息與媒體統計
  • 將訊息附帶的圖片以模型可檢視的影像回傳
適用情境
適合已自行運行 Telegram-Archive 檢視器、希望助理在已保存的 Telegram 歷史中查找內容的人:檢索過往訊息、摘要某個聊天或某一天、查看某則訊息的上下文。
執行需求
透過 npx 或 Docker 以 stdio 在本機執行。需要一個可連線的 Telegram-Archive 執行個體網址(TELEGRAM_ARCHIVE_URL),以及檢視器登入憑證 TELEGRAM_ARCHIVE_USER 與 TELEGRAM_ARCHIVE_PASS。npm 套件首次啟動時會下載發行版二進位檔,並依隨套件發布的校驗碼驗證。
安裝前請注意
伺服器會以檢視器帳號密碼登入你的封存,因此 TELEGRAM_ARCHIVE_PASS 應以密鑰方式保存,不要明文寫進設定。除 refresh_stats 外所有工具皆為唯讀,該工具會讓檢視器重新計算整個封存的統計,可用 READ_ONLY 隱藏它。封存中的訊息內容與媒體會傳送給模型。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Telegram Archive,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[telegram-archive-mcp]

telegram-archive-mcp

[npm] [CI] [License] [Docker Pulls] [codecov]

An MCP server for any Telegram-Archive instance. LLMs use it to search messages, browse chats and read archived Telegram history.

Features

  • Speaks MCP 2026-07-28 and every earlier revision down to 2024-11-05 on stdio and Streamable HTTP. Clients that still use the initialize handshake work unchanged.
  • Search one chat or every chat at once, read a chat page by page, one calendar day in your timezone, or the conversation around one message.
  • Forum topics, pinned messages, folders and per-chat statistics.
  • The photo attached to a message, returned as an image the model can look at and scaled to 1568 pixels when larger (get_media).
  • Every tool is read-only except refresh_stats; READ_ONLY=1 hides that one too.
  • Signs in to Telegram-Archive through /api/login with TELEGRAM_ARCHIVE_USER and TELEGRAM_ARCHIVE_PASS.
  • HTTP listens on loopback by default, checks Origin, caps request bodies, and requires MCP_AUTH_TOKEN on any other address.
  • Ships as an npm package, a Docker image and multi-arch Go binaries.

Install

Every client below runs the server over stdio. Set the URL, user and password of your Telegram-Archive viewer.

Claude Code

sh
claude mcp add --env TELEGRAM_ARCHIVE_URL=http://localhost:8000 \  --env TELEGRAM_ARCHIVE_USER=admin --env TELEGRAM_ARCHIVE_PASS=your-viewer-password \  --transport stdio telegram-archive -- npx -y telegram-archive-mcp

Claude Desktop (claude_desktop_config.json) and Cursor (~/.cursor/mcp.json)

json
{  "mcpServers": {    "telegram-archive": {      "command": "npx",      "args": ["-y", "telegram-archive-mcp"],      "env": {        "TELEGRAM_ARCHIVE_URL": "http://localhost:8000",        "TELEGRAM_ARCHIVE_USER": "admin",        "TELEGRAM_ARCHIVE_PASS": "your-viewer-password"      }    }  }}

VS Code (.vscode/mcp.json, asks for the password once)

json
{  "inputs": [    { "type": "promptString", "id": "tg-pass", "description": "Telegram-Archive viewer password", "password": true }  ],  "servers": {    "telegram-archive": {      "type": "stdio",      "command": "npx",      "args": ["-y", "telegram-archive-mcp"],      "env": {        "TELEGRAM_ARCHIVE_URL": "http://localhost:8000",        "TELEGRAM_ARCHIVE_USER": "admin",        "TELEGRAM_ARCHIVE_PASS": "${input:tg-pass}"      }    }  }}

Codex (~/.codex/config.toml)

toml
[mcp_servers.telegram-archive]command = "npx"args = ["-y", "telegram-archive-mcp"]env = { TELEGRAM_ARCHIVE_URL = "http://localhost:8000", TELEGRAM_ARCHIVE_USER = "admin", TELEGRAM_ARCHIVE_PASS = "your-viewer-password" }

Docker, for any client above: use docker as the command with these arguments, and a release tag from the releases page, never latest:

sh
docker run -i --rm -e TELEGRAM_ARCHIVE_URL -e TELEGRAM_ARCHIVE_USER -e TELEGRAM_ARCHIVE_PASS drumsergio/telegram-archive-mcp:vX.Y.Z

The npm package downloads the release binary on first start and checks it against the checksums published with the package, so it also works with npm 12, which skips install scripts. A long-running HTTP server (Docker Compose) and local builds are in Getting started.

Tools

ToolWhat it does
list_chatsLists chats, most recent first; filter by search (name), archived or folder_id. Each chat's ref is the chat_id the other tools take.
list_foldersLists your Telegram folders and their ids.
search_all_chatsSearches message text in every chat at once.
search_messagesSearches one chat, optionally one forum topic.
get_messagesReads a chat newest first, by offset or keyset cursor, optionally one forum topic.
get_message_contextReturns one message with the messages before and after it.
get_messages_by_dateReturns every message of one calendar day in a timezone.
get_pinned_messagesReturns a chat's pinned messages.
get_topicsLists a forum group's topics; their ids feed topic_id.
get_chat_statsMessage and media counts and size of one chat.
get_mediaThe photo attached to a message, as an image, or the file's details.
refresh_statsMakes the viewer recalculate archive-wide statistics. Hidden with READ_ONLY=1.

Every tool returns structured content with an output schema, alongside the same JSON as text. Arguments and defaults are on Usage.

Documentation

The full documentation is at geiserx.github.io/telegram-archive-mcp.

  • Getting started: npm, Docker Compose, local build
  • Configuration: environment variables and client configuration
  • Usage: the 4 resources and 12 tools, paging, reading one day at a time
  • Development: testing, contributing, credits
  • Related projects: Telegram Archive, other MCP servers, where this one is listed

License

GPL-3.0-or-later

來源:README.md,提交 2a8f863

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

5
  1. v0.4.1最新Oct 29, 2026
  2. v0.3.1Oct 21, 2026
  3. v0.3.0Oct 16, 2026
  4. v0.1.3Oct 5, 2026
  5. v0.0.2Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分