# belaytzev/Telebrief [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/belaytzev/Telebrief  
**GitHub Stars:** 26  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/belaytzev-telebrief

## Description
Self-hosted digests of your Telegram channels over MCP: AI summaries, the last digest and raw per-channel messages, with OpenAI, Anthropic or Ollama.

## Tools
Capabilities this server exposes over MCP:

- **get_digest** — Builds a fresh digest. Takes 20 to 90 seconds and spends AI provider tokens. `hours=168` gives a weekly digest.
- **get_last_digest** — Returns the latest digest from the cache with the time it was built. Instant, costs nothing.
- **get_channel_messages** — Returns the raw messages of one channel, without summarizing. Spends no AI tokens.
- **search_messages** — Searches all configured channels, or one, newest first. Spends no AI tokens.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/belaytzev/Telebrief), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Configure:

```sh
mkdir telebrief && cd telebrief
```

2. Configure:

```sh
docker run --rm -it --user "$(id -u):$(id -g)" -v "$PWD":/setup \
  ghcr.io/belaytzev/telebrief python main.py init /setup
```

3. Start the server:

```sh
docker compose up -d
```

4. Start the server:

```sh
docker compose pull && docker compose up -d
```

5. Start the server:

```sh
python main.py mcp
```

## Documentation

## What belaytzev/Telebrief MCP server does

belaytzev/Telebrief collects messages from configured Telegram channels and makes them available to AI agents through MCP. Its main use is turning channel activity into a digest, but it also exposes the underlying message data for cases where a summary is insufficient.

The service can summarize content with OpenAI, Anthropic, or a locally running Ollama model. Digests may be organized by source channel or by configured topics, and the output language can be English, Russian, Spanish, German, or French. Telegram delivery is handled by the user's own bot, while MCP provides agent access to the same information.

## How it works

A Telegram user session reads the selected channels, and a Telegram bot delivers scheduled or on-demand digests. The MCP interface adds four operations:

- `get_digest` creates a new summary for a requested time window. It typically takes 20 to 90 seconds and uses tokens from the selected AI provider.
- `get_last_digest` returns the most recently cached digest and its build time without starting another AI request.
- `get_channel_messages` returns unsummarized messages from one configured channel.
- `search_messages` searches all configured channels, or a selected channel, with newest results first.

The message retrieval and search operations do not use AI tokens. A weekly period can be requested with `hours=168`. Digests longer than Telegram's message limit are split into multiple bot messages rather than truncated.

## Setup and configuration

Docker is the supported starting point. The initialization wizard logs into Telegram with the account's phone number, verification code, and optional two-factor authentication; validates the bot token; lets you choose channels from the account's dialogs; and creates the environment file, YAML configuration, Compose file, and Telegram session file.

Before running the wizard, prepare Telegram app credentials (`api_id` and `api_hash`), a bot token from BotFather, and an AI provider. OpenAI and Anthropic require an API key. Ollama can be used without a key after installing it locally.

Start the generated Compose service with `docker compose up -d`, then use `/digest` in the bot chat for an immediate digest. The MCP server is optional and can be enabled alongside the bot. SQLite is the default persistent storage backend, with PostgreSQL available as an alternative. Settings that are not selected during initialization can be adjusted in the generated configuration.

## Tools and capabilities

- Build summaries for a configurable lookback period.
- Retrieve the cached digest and its creation time.
- Read raw messages from an individual channel.
- Search messages across all configured channels or one channel.
- Choose channel-based or topic-based digest grouping.
- Remove repeated coverage of the same topic across channels when deduplication is enabled.
- Produce output in five supported languages.
- Use OpenAI, Anthropic, or Ollama for summarization.
- Deliver digests through a private Telegram bot as well as exposing them to MCP clients.

## Limitations and notes

Fresh digest generation is slower than reading cached or raw data and consumes AI-provider tokens. The service is designed for a single user and requires access to the Telegram account, selected channels, bot token, and Telegram app credentials. Keeping the deployment self-hosted keeps the Telegram session, API keys, and collected messages on that server.

_Full upstream README: https://allmcps.com/mcp/belaytzev-telebrief/readme_

