Skip to content

Read-only mode and a chat allowlist for agents #26

Closed

Description

@neoromantic

Any agent that can run tg can also run tg send, or a tg api call that changes something. telegram-mcp can expose only read-only tools and limit every tool to an allowlist of chats.

Proposed:

  • Config keys readOnly and allowedChats, plus TELEGRAM_SYNC_CLI_READ_ONLY=1.
  • In read-only mode, mutating commands fail with a new documented READ_ONLY error code, and tg api allows only read methods (get*, search*, resolve*, check*).
  • Commands that take a chat refuse chats outside allowedChats.
  • The docs describe this as protection against mistakes, not as a security boundary.

Done when tests show every mutating command blocked in read-only mode and chat-scoped commands limited to the allowlist.

Activity

  1. added
    enhancement
    on Oct 21, 2026
  2. added 3 commits that reference this issue on Nov 17, 2026
    0d73c2e
    b908202
    14eeb07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions