All guides
Cerber MCP for Telegram
Connect an MCP client, find a familiar phrase in one shared chat and trace the answer back to the original message.
Before you start
- An MCP-compatible client
- An account with a saved chat and permission to share it
- Your Cerber archive password
On this page
Start with one account and one question
Pick a chat you can open in Telegram and a phrase you know it contains. This gives you a way to check the first result before you share more accounts.
- Open the developer connection form in Cerber. Give the connection a name you will recognise later in AI Access.
- Choose the accounts or departments this client needs. Select a duration that fits the work. Your role and the selected accounts limit what the client can access.
- Choose a mode below, review the selection and create the connection. Keep the tab with the one-time credentials open until setup is complete.
Choose where decryption happens
| Mode | Where it runs | What to configure |
|---|---|---|
| Cloud | Cerber opens the permitted archive on its server. | Use a client with remote HTTP MCP support. Copy the URL and Authorization header issued for this connection. |
| Local | A bridge decrypts the permitted archive on your computer. It must be running when the client requests data. | Use the bridge instructions, archive URL and token from the setup screen. Enter the archive password in the bridge on your computer. |
A local bridge still contacts Cerber to get the archive. The AI client may send retrieved content to its own cloud provider.
Archive tool reference
The cloud server advertises the tools this connection may call through tools/list, including the exact input schemas. The archive Developer connection grants archive reading within its selected accounts. For a scoped grant, the relevant archive:read permission or tool-level permission must be present. Use the account and chat identifiers returned by the tools.
| Tool | Input | Result |
|---|---|---|
| list_accounts | {} | Visible accounts and archive status. A visible account can still have an empty archive. |
| list_chats | Optional account, folder, unreadOnly, includeUnsaved | chats with identifiers and coverage. historyFrom is the oldest saved date. Check historyComplete before interpreting older results. |
| search_messages | Required query. Optional account, chat, after, before, sender, limit (1–200) | hits with msgId, matchedIn and a snippet where available. partial signals an unfinished search. |
| get_chat_messages | Required account and chat. Optional after, before, limit (1–500) | messages in chronological order, count, more, nextBefore and nextAfter. |
| get_message_history | Required account, chat and integer msgId | Archived versions of a message, when available, and its current version. |
| get_media | Required account, chat and integer msgId | Attachment facts and available content. A message without an attachment returns a tool error. |
| list_topics | Required account and chat | Topics recorded for a forum group. Use a returned topic ID to narrow message retrieval. |
| list_chat_members | Required account and group chat | Recorded membership, changes and details of any gaps in the snapshot. |
| list_folders | Optional account | Recorded folder names and chat counts. Newer archives may return an empty list. |
Read one known message
After initialisation, call list_accounts with {}. Choose your account, use list_chats to find a saved chat, then replace both placeholders and the example search term. This JSON-RPC request is for a client that has already authenticated.
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "search_messages",
"arguments": {
"account": "<account>",
"chat": "<chat>",
"query": "catalogue",
"limit": 5
}
}
}Search matches text and captions without case sensitivity. It can also match sender names, filenames, extracted document text and voice transcripts when available.
Check the result against Telegram
The archive tool returns text content in the MCP result. Below are selected fields from an illustrative decoded result. Compare the message ID, date and wording with the chat. If partial is true, narrow the time range or chat before drawing a conclusion.
{
"hits": [
{
"msgId": 1842,
"date": "2026-11-02T10:30:00Z",
"matchedIn": "text",
"snippet": "The catalogue cover is approved."
}
],
"scanned": 12,
"total": 12,
"partial": false
}For surrounding messages, call get_chat_messages. To page backwards, pass nextBefore as before. To move forwards, pass nextAfter as after. A null cursor means that end of the available history has been reached.
Read the error before changing permissions
| Signal | Meaning | Next step |
|---|---|---|
| 401 | The credential was refused. | Check the URL, the selected connection, its expiry and whether it was revoked. |
| JSON-RPC −32001 / −32002 | The archive password is wrong or missing. | Check the password setting for this connection. Re-enter it through the protected setup screen. |
| JSON-RPC −32602 | A tool name or argument is invalid. | Compare the request with tools/list. Check required fields and the limit range. |
| result.isError = true | The tool could not serve this request, for example because the chat name is ambiguous. | Read the tool message. Select an exact chat ID from list_chats and retry within the existing grant. |
| hits = [] | The search returned no matches. | Check the spelling, account, saved date range and partial flag. Try a word you can verify in Telegram. |
Check the result
Your client has read a known message from an allowed chat, and its date and ID match the original. Listing tools alone only tests the connection.