Telegram Search
🔍 导出并模糊搜索 Telegram 聊天记录 | Export and fuzzy search your Telegram chat history
What is Telegram Search?
Telegram Search is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 🔍 导出并模糊搜索 telegram 聊天记录 | export and fuzzy search your telegram chat history
🔍 导出并模糊搜索 Telegram 聊天记录 | Export and fuzzy search your Telegram chat history
This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- 🔍 导出并模糊搜索 Telegram 聊天记录 | Export and fuzzy search your Teleg
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx telegram-searchConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Telegram Search
Telegram Search is a self-hosted platform that exports your Telegram chat history and makes it searchable with both full-text and vector-embedding (semantic) search, image semantic search, and RAG-powered Q&A using your conversation context as a knowledge base. It connects to Telegram via the official API (using your TELEGRAM_API_ID and TELEGRAM_API_HASH from my.telegram.org), syncs messages and media to a PostgreSQL database with pgvector, and stores media files in MinIO. Teams and individuals who need to search years of Telegram conversations, recover information from old chats, or build a personal knowledge base from messaging history will find it a powerful open-source alternative to Telegram's limited built-in search.
Prerequisites
- Docker and Docker Compose installed
- A Telegram account and API credentials (TELEGRAM_API_ID and TELEGRAM_API_HASH from my.telegram.org/apps)
- Sufficient disk space for message and media storage (depends on chat volume)
- An MCP-compatible client if using AI assistant integration
- Optional: a MinIO instance for media backup storage
Obtain Telegram API credentials
Log in to my.telegram.org/apps with your Telegram account phone number, create a new application, and note the API ID and API Hash — these are required for the service to authenticate with Telegram.
# Visit: https://my.telegram.org/apps
# Create app and copy:
# TELEGRAM_API_ID=your-api-id
# TELEGRAM_API_HASH=your-api-hashCreate the project directory and download config files
Create a directory for telegram-search, then download the Docker Compose file and the environment template from the repository.
mkdir telegram-search && cd telegram-search
curl -O https://raw.githubusercontent.com/groupultra/telegram-search/main/docker-compose.yml
curl -O https://raw.githubusercontent.com/groupultra/telegram-search/main/.env.example
cp .env.example .envConfigure environment variables
Edit the .env file and set your Telegram API credentials, database type, and optional MinIO settings. For production use PostgreSQL with pgvector; for quick evaluation pglite works locally.
# .env configuration
TELEGRAM_API_ID=your_api_id
TELEGRAM_API_HASH=your_api_hash
DATABASE_TYPE=postgres
DATABASE_URL=postgresql://user:pass@postgres:5432/telegram_search
MINIO_URL=http://minio:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_BUCKET=telegram-media
PORT=3333Start the services with Docker Compose
Launch all services (web app, backend, PostgreSQL with pgvector, MinIO) using Docker Compose. The first startup downloads images and initializes the database.
docker compose -f docker-compose.yml up -dAuthorize and start syncing your chats
Open the web UI at localhost:3333, log in with your Telegram account (you will receive a verification code via Telegram), select which chats to sync, and start the initial message export.
open http://localhost:3333Configure AI embedding for semantic search
In the web UI go to Settings > API and configure your embedding model provider (e.g., OpenAI API key for text-embedding-3-small, or a local embedding server). AI settings are per-account in the application.
Telegram Search Examples
Client configuration
MCP client configuration pointing at the telegram-search server.
{
"mcpServers": {
"telegram-search": {
"command": "npx",
"args": ["telegram-search"]
}
}
}Prompts to try
Sample prompts for searching Telegram history via the MCP server.
- "Search my Telegram chats for messages about the Q3 budget meeting"
- "Find all images related to the product launch in the team channel"
- "What did we decide about the API migration in the engineering group chat?"
- "Show me all messages from last month in the #devops channel mentioning Kubernetes"
- "Answer this question using my Telegram history: when did we first discuss moving to Postgres?"Troubleshooting Telegram Search
Telegram authorization fails or verification code is not received
Ensure TELEGRAM_API_ID and TELEGRAM_API_HASH are exactly correct from my.telegram.org/apps. The verification code is sent via Telegram message (not SMS by default). If you use a proxy, set the PROXY_URL env var in .env (socks5 format supported).
pgvector extension not found — database errors on startup
The docker-compose.yml should use `ankane/pgvector` or `pgvector/pgvector` as the PostgreSQL image, not the standard postgres image. Update your compose file to use an image that includes the pgvector extension pre-installed.
Semantic search returns no results even after messages are synced
Semantic search requires embeddings to be generated. Go to Settings > API in the web UI and ensure your embedding provider credentials are saved. Then trigger a re-index of your messages from the admin panel.
Frequently Asked Questions about Telegram Search
What is Telegram Search?
Telegram Search is a Model Context Protocol (MCP) server that 🔍 导出并模糊搜索 telegram 聊天记录 | export and fuzzy search your telegram chat history It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Telegram Search?
Follow the installation instructions on the Telegram Search GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Telegram Search?
Telegram Search works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Telegram Search free to use?
Yes, Telegram Search is open source and available under the AGPL-3.0 license. You can use it freely in both personal and commercial projects.
Telegram Search Alternatives — Similar Search & Data Extraction Servers
Looking for alternatives to Telegram Search? Here are other popular search & data extraction servers you can use with Claude, Cursor, and VS Code.
TrendRadar
★ 58.0kA real-time hotspot monitoring and news aggregation assistant that provides AI-powered analysis of trending topics across multiple platforms via the Model Context Protocol. It enables users to track news and receive automated notifications through va
Scrapling
★ 52.7k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
PDF Math Translate
★ 33.9k[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero
GPT Researcher
★ 27.2kAn autonomous agent that conducts deep research on any data using any LLM providers
Agent Reach
★ 20.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Xiaohongshu
★ 13.7kMCP for xiaohongshu.com
Browse More Search & Data Extraction MCP Servers
Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Telegram Search in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Telegram Search?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.