← All Telegram MCP connectors

opencode · SST

opencode Telegram MCP — give your terminal agent your inbox

Add Entergram as an MCP server in opencode, SST’s open-source terminal AI agent, and let it work your real Telegram account — surface missed messages, chase leads that went cold, and act on chats from the command line.

MCP server URL https://mcp.entergram.com/mcp

opencode loads MCP servers from its config file. Register Entergram’s as a remote MCP server and SST’s open-source agent can work your real personal Telegram account in the terminal — scoped by OAuth, with no bot account and no API keys.

Paste-ready configuration

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "entergram": {
      "type": "remote",
      "url": "https://mcp.entergram.com/mcp",
      "enabled": true
    }
  }
}

Ask opencode things you could never ask Telegram

With your personal account connected, opencode can act across every chat from the terminal. Try prompts like:

  • “Open an incident channel and pull in whoever is on call.”
  • “Post the deploy summary to the customer updates channel.”
  • “How many tickets are still open before I cut the release?”
  • “Find chats mentioning the migration and summarize the concerns.”
  • “Add a note to that thread with the rollback plan.”
  • “Who in the beta group has not replied to the upgrade notice?”

Connect opencode in 3 steps

Works with the opencode TUI and CLI.

  1. 01

    Copy your MCP URL in Entergram

    Copy your endpoint from Entergram under Settings → Workspace → Connectors → MCP. opencode reads it out of opencode.json, so you'll paste it into a file rather than a prompt.

  2. 02

    Add the server in opencode.json

    In your opencode.json, add Entergram under "mcp" as a remote server pointing at the Entergram MCP URL: https://mcp.entergram.com/mcp.

  3. 03

    Authorize and run

    Start opencode, log in with your Entergram account, and click Allow access to grant scoped access. opencode can then read and act on your Telegram account in its sessions.

Global, per-project, or headless

Global — ~/.config/opencode/opencode.json

One entry that follows you into every repository you open. This is the right place for a personal grant: the server is available whether you are in a work project or a weekend one, and you authorize a single time rather than once per checkout.

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "entergram": {
      "type": "remote",
      "url": "https://mcp.entergram.com/mcp",
      "enabled": true
    }
  }
}

Per-project — opencode.json at the repo root

Committed alongside the code, so anyone who clones the repository gets the server declared without being told about it. Nothing secret is being shared — the file names an endpoint and nothing else, and each teammate still completes their own login with their own permissions. Project config layers over the global file, so keep one definition rather than two competing ones.

Headless — opencode run

The reason this connector suits a terminal agent in the first place. A single non-interactive invocation fits into a deploy script, a Makefile target or a CI step, which is how a release notification stops depending on somebody remembering to send it.

opencode run "post the release summary for v2.14 in the customer channel"

Shipping, from the same shell

A terminal agent gets used at the moments when opening a chat app would break concentration: right after a deploy, mid-incident, or at the end of a day when you want to know what is still open. These runs assume that context — short prompts, keyboard only, and the connector doing the part you would otherwise postpone until it stopped mattering. Each one maps to a handful of named calls that print in the session log, which also makes them safe to lift straight into a script once you have watched them work by hand.

You ask

«The deploy finished. Post the version and the changelog link in the release channel.»

Tools called

entergram_list_accountsentergram_list_groupsentergram_send_message

You get

The announcement goes out from the same shell that ran the deploy, seconds after it succeeded rather than an hour later. The agent resolves which connected account can post, finds the channel by name so the id never has to live in your script, and sends. Wire it into the deploy target and the step stops being optional.

You ask

«I put the wrong build number in that announcement — fix it in place.»

Tools called

entergram_list_messagesentergram_get_messageentergram_edit_message

You get

Correcting the original beats posting a correction underneath it. The agent walks back through recent history to identify the message, confirms the content before touching it, and edits it, so anyone who scrolls past tomorrow reads the right number instead of a thread of amendments.

You ask

«Open an incident room for this and pull in whoever is on call.»

Tools called

entergram_create_group_chatentergram_list_membersentergram_invite_chat_members

You get

Thirty seconds of setup that nobody wants to do while a system is down. A group is created, the workspace roster is read to resolve the people you named, and invitations go out. You get back to the logs with the coordination already handled instead of half-started.

You ask

«Forward Friday's maintenance notice to every customer group that hasn't seen it.»

Tools called

entergram_list_groupsentergram_list_messagesentergram_forward_messages

You get

Forwarding the original keeps every group reading identical wording, which is exactly what you want for a maintenance window and exactly what retyping destroys. The agent checks which groups already received it before it fans out, so nobody gets the same notice twice.

You ask

«This reporter is in some of our communities — which ones, and who else from our list is in them?»

Tools called

entergram_list_contactsentergram_get_contactentergram_list_contact_shared_groups

You get

Shared-group lookup answers a question Telegram itself will not: where your overlap with someone actually is. Useful when a bug report needs context on how loud the reporter is likely to be, and useful again when you are deciding whether a workaround can be posted once in a shared community rather than repeated across ten private threads by hand.

You ask

«Before I cut the release, how many open tickets are tagged for this milestone?»

Tools called

entergram_list_ticket_custom_columnsentergram_list_ticketsentergram_get_ticket

You get

A release-readiness check that takes one line and no dashboard. The agent reads your ticket schema to find the milestone column, filters open tickets by it, and reports the count with titles. Run it as the first step of your release script and a blocking ticket stops the tag instead of surfacing after it.

What opencode can do with your Telegram

  • Drive Telegram entirely from the keyboard
  • Announce a deploy to a customer channel post-ship
  • Open an incident channel and invite responders
  • Count open tickets before cutting a release
  • Configure globally or per project via opencode.json
  • Run non-interactively for scripted jobs

Seventy tools, nothing installed locally

Entergram hosts the server, so opencode picks up nine tool groups without a single dependency added to your machine or your CI image — no bridge process, no Python environment, no credentials in the repo. Everything below is reachable the moment the grant exists, within whichever access level you chose, and the same list is available to an interactive session and a one-shot run alike.

Accounts & workspace

5 tools

Identity and scope discovery. Every message call needs an account_id from list_accounts first — an AI client that skips this step will address the wrong Telegram account.

  • entergram_get_me
  • entergram_list_accounts
  • entergram_get_workspace
  • entergram_get_member
  • entergram_list_members

Chats & discovery

8 tools

Finding conversations. The workspace views carry CRM state (tickets, comments, custom fields); the live views carry current Telegram transport state and unread counts.

  • entergram_list_chats
  • entergram_get_chat
  • entergram_list_live_chats
  • entergram_get_live_chat
  • entergram_list_workspace_chats
  • entergram_get_workspace_chat
  • entergram_update_workspace_chat
  • entergram_get_chat_management

Messages

9 tools

Reading and writing message history, including edits, forwards and reactions. Sending is scoped per account, so nothing is global across your connected accounts.

  • entergram_list_messages
  • entergram_get_message
  • entergram_send_message
  • entergram_send_media_message
  • entergram_edit_message
  • entergram_delete_message
  • entergram_forward_messages
  • entergram_get_message_reactions
  • entergram_set_message_reactions

Contacts

3 tools

Who you are talking to, and where else you overlap with them. Shared-groups lookup is what makes questions like “which of my leads are in the same community?” answerable.

  • entergram_list_contacts
  • entergram_get_contact
  • entergram_list_contact_shared_groups

Tickets

10 tools

Full support-desk control: open, assign, prioritise, comment and close. Tickets link back to the chat they came from, so an AI client can move from conversation to queue in one step.

  • entergram_list_tickets
  • entergram_get_ticket
  • entergram_create_ticket
  • entergram_update_ticket
  • entergram_delete_ticket
  • entergram_list_chat_tickets
  • entergram_list_ticket_comments
  • entergram_create_ticket_comment
  • entergram_update_ticket_comment
  • entergram_delete_ticket_comment

CRM custom fields

11 tools

Your pipeline schema. Read the columns before writing values — checkboxes take booleans, multiselects take arrays of option values, dates take ISO 8601 strings.

  • entergram_list_custom_columns
  • entergram_get_custom_column
  • entergram_create_custom_column
  • entergram_update_custom_column
  • entergram_delete_custom_column
  • entergram_list_custom_column_options
  • entergram_create_custom_column_option
  • entergram_update_custom_column_option
  • entergram_delete_custom_column_option
  • entergram_get_chat_custom_fields
  • entergram_patch_chat_custom_fields

Ticket custom fields

9 tools

The same schema control for the ticket side — categories, severities, SLA tiers and anything else your desk tracks beyond status and priority.

  • entergram_list_ticket_custom_columns
  • entergram_get_ticket_custom_column
  • entergram_create_ticket_custom_column
  • entergram_update_ticket_custom_column
  • entergram_delete_ticket_custom_column
  • entergram_list_ticket_custom_column_options
  • entergram_create_ticket_custom_column_option
  • entergram_update_ticket_custom_column_option
  • entergram_delete_ticket_custom_column_option

Internal notes

4 tools

Comments on a chat that your customer never sees. Useful for letting an AI client leave its reasoning behind for a human teammate to pick up.

  • entergram_list_chat_comments
  • entergram_create_chat_comment
  • entergram_update_chat_comment
  • entergram_delete_chat_comment

Groups & channels

11 tools

Creating and administering Telegram groups and channels — membership, permissions, privacy and info — plus a raw command escape hatch for the rest.

  • entergram_list_groups
  • entergram_get_group
  • entergram_list_group_members
  • entergram_create_group_chat
  • entergram_create_channel
  • entergram_invite_chat_members
  • entergram_remove_chat_member
  • entergram_update_chat_info
  • entergram_update_chat_permissions
  • entergram_update_chat_privacy
  • entergram_run_chat_command

Terminal-side security in one paragraph

Nothing sensitive ends up in your dotfiles. opencode.json carries a URL and a flag; the credential itself is held in opencode's own auth storage after a browser login, and your Telegram session stays inside Entergram where SST and the model provider never see it. If a machine goes missing or a CI runner is decommissioned, kill the grant from Entergram under Settings → Workspace → Connectors → MCP and every session on that box loses access at its next call.

Personal agent
The default for one developer's terminal, and available to every member without an approval step. Reading covers the workspace record, your connected accounts, contacts, chats, message history and the ticket queue; writing is limited to the custom fields on chats your own accounts own. That is enough for triage, digests and release-readiness checks, and deliberately short of anything that speaks to a customer.
Workspace connector
Created by an owner or admin, holding every scope the server defines: sending, editing, forwarding, ticket writes, custom-field writes anywhere in the workspace, and group administration. This is the level a deploy script needs if it is going to post to a customer channel without a human in the loop.
Revocation
Immediate, and deliberately one-sided. You do not need access to the machine running opencode in order to cut it off — revoking in Entergram invalidates the grant wherever it happens to be stored, which is the whole point when the runner is a CI box rather than a laptop on your desk.

Constraints of a terminal-native connector

Most of these are about the gap between an interactive session and an automated one, which is the gap a terminal agent spends its life straddling. None of them are blockers; all of them are cheaper to learn here than in a pipeline.

  • The first authorization needs a browser. A scripted invocation cannot complete a consent screen, so authorize once in an interactive session and let the stored grant carry the runs that follow.
  • A committed opencode.json shares the address, not the access. Teammates who pull the repo each go through their own login, and their token carries their permissions rather than yours.
  • There is no scheduler on our side. opencode exits when the run ends, so anything recurring — a nightly digest, a post-deploy notice — is your cron entry or your pipeline step, never something Entergram triggers on its own.
  • MCP is part of the Pro plan. On anything lower the server still answers the handshake, which makes the failure look like a config bug when it is really a billing one.
  • Writes need the column to exist first. The agent can fill a release-tracking field on a chat, but creating that field is a workspace-connector action and a personal grant will not do it.
  • Per-account addressing is mandatory. Terminal habits expect a sensible default and there isn't one, so name the account in the prompt or the agent will resolve it from the account list itself.

opencode connector troubleshooting

opencode starts but lists no Entergram tools
Check that the entry sits under the mcp block with type set to remote and enabled set to true — an entry missing either is parsed and skipped without comment. The config is read at startup, so restart the session after editing it.
opencode refuses to start after the edit
Keep the $schema line and run the file through a JSON parser. A trailing comma is the usual cause, and the startup error tends to name the file rather than the offending line.
A scripted run hangs at authorization
Non-interactive runs cannot open a consent screen. Start opencode interactively once, complete the Entergram login, and the stored grant will carry the scripted runs from then on.
The wrong config is in effect
A project opencode.json layers over the global file in ~/.config/opencode/. If a teammate committed an entry, theirs is the one being used — reconcile the two rather than adding a second server under a different name.
Messages land in the wrong place
Name both the account and the target chat in the prompt. entergram_list_accounts resolves the first, but nothing about a terminal session implies a default, and a one-shot run will not stop to ask you.
Calls started failing after a few days
Tokens expire. Run opencode interactively and approve access again — the config file does not change, only the grant sitting behind it.

opencode + Telegram FAQ

How does opencode connect to MCP servers?
opencode reads MCP servers from its config file. Add Entergram as a remote server with the MCP URL and authorize via OAuth.
Is this a Telegram bot?
No. There is no bot token anywhere in this setup — the hosted MCP server acts as your own Telegram account, which is why it can read history a bot never could.
Is it secure?
Yes. OAuth 2.0 with scoped permissions; you decide what opencode can access and can revoke it at any time.
Can opencode run multi-step Telegram actions?
Yes. As an autonomous terminal agent, opencode can chain steps in one run — read unanswered chats, draft replies and open tickets — pausing for your approval before anything is sent.

opencode Telegram MCP — give your terminal agent your inbox