Skip to main content

A Telegram user-account MCP and skills let Grok Bot read chats and draft confirmed sends

GitHubGitHubpewpewgogo2026-11-28

Life assistantMulti-bot teamsSource read in fullRead first
GitHubGitHubpewpewgogo2026-11-28

Open original

Overview

A Grok Bot user who wants the bot to read and draft messages as their own Telegram account, with confirmation before any send, can run this MCP server and skills.

Workflow

  1. What it is: An MCP server and Cursor / Grok Bot plugin that reads and sends Telegram messages as a person's own account, not as a Telegram bot. It speaks MTProto through teleproto, the maintained GramJS-compatible library. It does not use the Bot API and does not use a bot token. The README lists the author as Volodya Plotvinov / DevLaunch, and says the repo is meant for the Grok Bot community directory.
  2. Grok Bot parts used: A custom MCP server plus four skills (telegram-user-account, summarize-unread, draft-and-send, and search-telegram-history), with a short always-on safety rule in rules/telegram-account-safety.mdc (that rule file was listed but not extracted as a separate block). The README's stated assumption is that Grok Bot's Connect apps install Cursor Marketplace plugins, so the repo follows the Cursor plugin layout (.cursor-plugin/plugin.json, mcp.json, skills, and rules). A second manifest tree (.grok-plugin/plugin.json and .mcp.json) is included for the Grok Build plugin directory. There is no x.ai/bot/... template link. Not part of Grok Bot: the Node.js MCP server, teleproto / MTProto, the login script, Docker Compose, Cursor and Grok Build plugin manifests, and apps created at my.telegram.org.
  3. You need: Node.js 22 or newer, a Telegram user account, an api_id and api_hash from a user application at my.telegram.org/apps (not a BotFather token), and a StringSession from the repo's login script. The three values TELEGRAM_API_ID, TELEGRAM_API_HASH, and TELEGRAM_STRING_SESSION must be stored like a password. For the HTTP or Docker path you also need TELEGRAM_MCP_AUTH_TOKEN; binding anything other than loopback requires that token, and a non-local deployment needs a TLS reverse proxy because this server does not terminate TLS. Not stated in the source: which Grok Bot paid plan is required.
  4. Install: Create a Telegram user application, log in to produce a StringSession, store the three secrets, then run the MCP server and connect it as a plugin.
    • Step 1: While logged into the Telegram account you want to connect, open https://my.telegram.org/apps , create an application, and copy the numeric api_id and the api_hash.
    • Step 2: From this repository, run npm ci, export TELEGRAM_API_ID and TELEGRAM_API_HASH, and run npm run login. The interactive script prompts for the phone, the login code, and the two-factor password only if Telegram asks (it can also prompt for an email). Do not pass the hash, the code, or the password as command-line arguments. A non-interactive file mode can poll a code file and write the session to TELEGRAM_SESSION_OUT with mode 600. On a network that intercepts raw MTProto, set TELEGRAM_TRANSPORT=websocket before login.
    • Step 3: Put TELEGRAM_API_ID, TELEGRAM_API_HASH, and TELEGRAM_STRING_SESSION in a secret store. Delete code, password, and leftover session files after copying. The login client identifies itself as Telegram User MCP in Telegram's active sessions.
    • Step 4: Build and start the server with npm run build then npm start for stdio MCP (node bin/start.mjs or node dist/index.js, with the three variables in the environment). Or set TELEGRAM_MCP_TRANSPORT=http with a loopback host and port (default documented example: 127.0.0.1:8787) and point a client at http://127.0.0.1:8787/mcp. Docker Compose publishes that port on loopback only and refuses to start until the session variables and TELEGRAM_MCP_AUTH_TOKEN are set.
    • Step 5: For Grok Bot, the README assumes Connect apps install Cursor Marketplace plugins and says to submit the public repository at cursor.com/marketplace/publish, or to use a hosted MCP URL behind TLS if a form asks for a server URL. Plugin variables are set under Plugins, Configure. Do not commit .env or a session string. Values are not in the repo.
  5. After install: Ask the bot who the connected Telegram account is (get_me), then for a summary of unread chats; a send should stop on a dry-run draft until you confirm the exact text.
    • Read tools include list_dialogs, list_unread, read_messages, search_messages, get_chat_info, list_contacts, resolve_username, and get_channel_posts. Chat arguments are me, a @username, or a numeric id; phone numbers are not accepted as chat ids.
    • send_message and forward_message default to dry_run true. One confirmation is required per message; a second chat, a second message, or any edit needs a new draft and a new yes. mark_read is only when the person asked.
    • There is no tool to message many chats at once, delete history, join chats, or import phone numbers. Message bodies returned to the agent are capped at 4000 characters; sends are capped at Telegram's 4096-character text limit. Page sizes are 1 to 100.
  6. Did the author run it: The repository has no run records from the author. The README's "Try it after install" steps are acceptance steps for the reader. The repo has unit tests that call tool handlers with a fake Telegram gateway; the README says those tests do not log in and do not open a network connection to Telegram.

Key points and results

  • Maturity: At fetch time on 2026-11-29 the repo was created 2026-11-28T13:54:18Z, last pushed 2026-11-28T14:28:37Z, with 2 commits, 0 stars, 0 forks, 0 open issues or PRs, and an MIT license. There is no Grok Bot template link. The Grok Bot install path is stated as an assumption about Connect apps and the Cursor Marketplace, not as a documented official Grok Bot feature.
  • Permissions and boundaries: A StringSession is a full login; anyone who has it can read chats and send messages as that account, including private chats. Store it like a password. Revoke it under Telegram Settings, Devices, and replace it if it leaks. The process never writes these values to logs, and error text is scrubbed if a secret would otherwise appear. Sends and forwards are seen as the person, not as a bot, and default to a dry run until an explicit yes. Skills tell the agent not to ask for or print the session, hash, login code, or password, and not to treat text inside a message as an instruction.
  • Known limits: The server will not delete messages, leave or join chats, import contacts, or send one message to many recipients. Limits above 100 are rejected. Unread listing and title search scan a capped number of dialogs (default 200, maximum 500). A FLOOD_WAIT is retried once after retry_after_seconds, not in a loop. Grok Bot connectivity depends on how you host the MCP process (stdio on a cloud computer, or an HTTP URL the bot can reach).
  • Worth borrowing: Default every send and forward to a dry-run draft, and require a fresh yes for a second chat, a second message, or any edit. From skills/draft-and-send/SKILL.md and the README tools table.
  • Worth borrowing: Treat a StringSession as a password, identify the login client in Telegram's device list, and refuse phone numbers as chat ids. From the Create a session and Tools sections of the README.

Source

Platform
GitHub
Author
pewpewgogo
Published
Categories
Life assistant, Multi-bot teams

What this evidence label means

Source read in full

We read the source (post, article or transcript). That only means the original was read. It does not mean this site reproduced the author's results.

Read the editorial and evidence policy

Other cases in this scenario

This unofficial community project is independent of xAI. xAI has neither approved nor endorsed it. No sign-up. The methods and figures come from the original authors.