Telegram Search

v1.0.0Search & Data Extractionstable

🔍 导出并模糊搜索 Telegram 聊天记录 | Export and fuzzy search your Telegram chat history

aiai-agentembeddingmcptelegram
Share:
3,900
Stars
0
Downloads
0
Weekly
0/5

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

Export and fuzzy search Telegram chat history
Search conversations with semantic embedding
groupultra

Maintainer

LicenseAGPL-3.0
Languagetypescript
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx telegram-search

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-hash
2

Create 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 .env
3

Configure 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=3333
4

Start 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 -d
5

Authorize 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:3333
6

Configure 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.

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.

Quick Config Preview

{ "mcpServers": { "telegram-search": { "command": "npx", "args": ["-y", "telegram-search"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides