telegram-search-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TELEGRAM_API_ID | Yes | Integer API ID from my.telegram.org | |
| TELEGRAM_API_HASH | Yes | API Hash from my.telegram.org | |
| TELEGRAM_SESSION_PATH | No | Custom session file path | ~/.local/state/telegram-search-mcp/session |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_dialogsA | Search for chats, channels, or groups by name. Args: query: Part of the name to search for. limit: Max results (default 10). Returns: List of matching dialogs with id, name, username, type. |
| get_messagesA | Get recent messages from a Telegram chat/channel/group. Args: entity: Chat username (e.g. @some_channel), chat ID, or title. limit: Number of messages to retrieve (default 20, max 100). Returns: List of recent messages with id, date, sender, text, has_document. |
| search_messagesA | Search messages by keyword inside a specific Telegram chat/channel/group. Args: entity: Chat username (e.g. @some_channel), chat ID, or title fragment. query: Keyword or phrase to search for. limit: Max results to return (default 30, max 100). Returns: List of matching messages with id, date, sender, text, has_document. |
| get_message_documentA | Download and extract text from a document attached to a specific message. Args: entity: Chat username (e.g. @some_channel), chat ID. message_id: The ID of the message that contains the document. Returns: Dict with filename, mime_type, size_bytes, and content (extracted text), or an error field if extraction is not possible. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 4 tools
Each tool targets a distinct resource/action: dialog lookup, message listing, message search, and document extraction. get_messages and search_messages overlap only superficially because one returns recent unfiltered messages and the other returns keyword-filtered results.
All tools use lower_snake_case and follow a consistent verb_noun pattern such as search_dialogs, get_messages, search_messages, and get_message_document. The verbs match the operations clearly, and the nouns identify the resource being acted on.
Four tools is a tight, well-scoped set for a read-only Telegram search/retrieval server. Each tool earns its place in the workflow of finding a dialog, reading or searching messages, and extracting document text.
The read-oriented workflow is well covered: discover dialogs, list recent messages, search messages by keyword, and extract document text. Minor gaps such as global message search and pagination/offset support mean some advanced retrieval tasks may require workarounds.