feat: add the telegram_mcp role #45

Merged
aleksei merged 5 commits from feat/telegram-mcp-role into main 2026-11-21 00:15:39 +00:00
Owner

Adds roles/telegram_mcp, which builds https://github.com/chigwell/telegram-mcp at commit eed9d69 (v3.3.22) with Compose and runs it as a shared streamable-HTTP MCP server, and adds the role to the mcp host.

  • The build context is the pinned commit, so a rebuild cannot pick up newer upstream code.
  • TELEGRAM_EXPOSED_TOOLS=read-only leaves only the read-only tools registered (67); send, edit, delete and admin tools are pruned.
  • The MCP server has no authentication of its own, so it is not published. The only way in is a supergateway 4.2.2 proxy with --apiKeyFile; a request without the key gets 401. Clients pass Authorization: Bearer <key> or X-API-Key: <key>, and the key is never forwarded to the server.
  • The server is published on mcp.lan:8765; MCP_ALLOWED_HOSTS admits the host's DNS name and the Compose service name the gateway uses.
  • The voice-transcription cache lives in /opt/telegram_mcp/transcripts on the host.
  • The account credentials and the gateway key live in host_vars/mcp.yaml as vault-encrypted values; the role renders them into /opt/telegram_mcp/.env and /opt/telegram_mcp/api_key (both 0600).
  • The mcp host now runs mihomo: the Telegram data centres are blocked on the lab's uplink, and without the proxy the server cannot connect.

Chat filtering (TELEGRAM_ALLOWED_CHAT_IDS) is deliberately left out as a follow-up.

Adds `roles/telegram_mcp`, which builds https://github.com/chigwell/telegram-mcp at commit `eed9d69` (v3.3.22) with Compose and runs it as a shared streamable-HTTP MCP server, and adds the role to the `mcp` host. - The build context is the pinned commit, so a rebuild cannot pick up newer upstream code. - `TELEGRAM_EXPOSED_TOOLS=read-only` leaves only the read-only tools registered (67); send, edit, delete and admin tools are pruned. - The MCP server has no authentication of its own, so it is not published. The only way in is a `supergateway` 4.2.2 proxy with `--apiKeyFile`; a request without the key gets `401`. Clients pass `Authorization: Bearer <key>` or `X-API-Key: <key>`, and the key is never forwarded to the server. - The server is published on `mcp.lan:8765`; `MCP_ALLOWED_HOSTS` admits the host's DNS name and the Compose service name the gateway uses. - The voice-transcription cache lives in `/opt/telegram_mcp/transcripts` on the host. - The account credentials and the gateway key live in `host_vars/mcp.yaml` as vault-encrypted values; the role renders them into `/opt/telegram_mcp/.env` and `/opt/telegram_mcp/api_key` (both `0600`). - The `mcp` host now runs `mihomo`: the Telegram data centres are blocked on the lab's uplink, and without the proxy the server cannot connect. Chat filtering (`TELEGRAM_ALLOWED_CHAT_IDS`) is deliberately left out as a follow-up.
aleksei changed title from WIP: feat: add the telegram_mcp role to feat: add the telegram_mcp role 2026-11-15 17:55:27 +00:00
aleksei deleted branch feat/telegram-mcp-role 2026-11-21 00:15:39 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zoo/infra!45
No description provided.