Skip to main content
Glama
Rubika MCP
by NabuxAi

Rubika MCP (روبیکا)

npm CI license

یک سرور MCP برای پیام‌رسان روبیکا، تا دستیار هوش مصنوعی (Claude، Cursor، ChatGPT و …) بتواند پیام بخواند و بفرستد. دو حالت دارد:

  • حالت بات — Bot API v3 رسمی روبیکا: متن، فایل (آپلود سه‌مرحله‌ای)، ویرایش، حذف، دریافت پیام‌ها. بات باید ادمین گروه/کانال باشد.

  • حالت وب (اکانت خودتان) — Rubika Web در یک پنجره‌ی Chrome محلی با پروفایل جدا باز می‌شود و با اکانت خودتان کار می‌کند. یک بار خودتان وارد می‌شوید (کد ورود و رمز دومرحله‌ای را فقط خودتان در همان پنجره می‌زنید) و ورود ذخیره می‌ماند. 26 قابلیت از 26.

English summary below.

نصب در Claude Code / Claude Desktop / Cursor

{
  "mcpServers": {
    "rubika": {
      "command": "npx",
      "args": ["-y", "@nabuxai/rubika-mcp"],
      "env": {
        "NABU_MESSAGING_ENABLE_SEND": "1",
        "RUBIKA_BOT_TOKEN": "…",
        "RUBIKA_ALLOWED_CHAT_IDS": "…",
        "NABU_BROWSER_ENABLE": "1",
        "RUBIKA_WEB_ALLOWED_CHATS": "me"
      }
    }
  }
}

یا در Claude Code:

claude mcp add rubika -e NABU_BROWSER_ENABLE=1 -e RUBIKA_WEB_ALLOWED_CHATS=me -- npx -y @nabuxai/rubika-mcp

همه‌ی متغیرها در .env.example توضیح داده شده‌اند. توکن بات: @BotFather داخل روبیکا. حالت وب به Chrome نصب‌شده نیاز دارد (یا CHROME_EXECUTABLE_PATH).

IP ایران: وب‌اپ و API بیشتر پیام‌رسان‌های ایرانی فقط از IP ایران جواب می‌دهند. اگر سیستم شما IP خارج دارد، از یک سرور داخل ایران تونل بزنید و NABU_BROWSER_PROXY=socks5://127.0.0.1:1088 بدهید:

ssh -N -D 127.0.0.1:1088 <server-in-iran>

Related MCP server: dibaMCP

شروع حالت وب

  1. rubika_web_open — پنجره باز می‌شود.

  2. اگر وارد نیستید: rubika_web_login_start با شماره موبایل؛ بعد کد را خودتان در پنجره بزنید.

  3. rubika_web_list_chats، rubika_web_read_chat، rubika_web_send_message و …

قابلیت‌های حالت وب

قابلیت

ابزار

فهرست گفتگوها

rubika_web_list_chats

✅

خواندن پیام‌ها

rubika_web_read_chat

✅

ارسال متن (و پاسخ)

rubika_web_send_message

✅

ارسال عکس و فایل

rubika_web_send_file

✅

ویرایش پیام

rubika_web_editText

✅

حذف پیام

rubika_web_deleteMessages

✅

هدایت (فوروارد)

rubika_web_forwardMessages

✅

سنجاق کردن

rubika_web_pinMessage

✅

خوانده‌شده کردن

rubika_web_markRead

✅

ارسال موقعیت

rubika_web_sendLocation

✅

ارسال مخاطب

rubika_web_sendContact

✅

ارسال نظرسنجی

rubika_web_sendPoll

✅

اطلاعات گفتگو

rubika_web_getChatInfo

✅

اعضا

rubika_web_getMembers

✅

جستجوی پیام

rubika_web_searchMessages

✅

دانلود رسانه

rubika_web_downloadMedia

✅

پیام‌های نخوانده

rubika_web_getUnread

✅

مخاطبان

rubika_web_getContacts

✅

ساخت گروه/کانال

rubika_web_createChat

✅

تغییر نام/توضیح

rubika_web_updateChat

✅

لینک دعوت

rubika_web_getInviteLink

✅

عضویت

rubika_web_joinChat

✅

ترک گفتگو

rubika_web_leaveChat

✅

افزودن عضو

rubika_web_addMembers

✅

حذف عضو

rubika_web_removeMember

✅

ادمین کردن

rubika_web_setAdmin

✅

محدودیت‌ها: Polls only in groups and channels (Rubika refuses them elsewhere). Members, admins and invite links only for groups/channels you administer. getInviteLink returns the existing link and never creates one. joinChat takes rubika.ir/joing/…, rubika.ir/joinc/… or a public channel @username. A contact is sent as a plain contact card.

قفل‌های امنیتی

کار

چه لازم دارد

خواندن

توکن بات، یا پنجره‌ی واردشده و NABU_BROWSER_ENABLE=1

نوشتن در گفتگو (ارسال، ویرایش، حذف، سنجاق، فوروارد…)

confirm: true، گفتگو در RUBIKA_ALLOWED_CHAT_IDS (بات) یا RUBIKA_WEB_ALLOWED_CHATS (وب)، و NABU_MESSAGING_ENABLE_SEND=1

تغییر اکانت (ساخت/عضویت/ترک گفتگو، اعضا، ادمین)

همه‌ی موارد بالا و NABU_WEB_ALLOW_ACCOUNT_CHANGES=1

ارسال انبوه وجود ندارد: هر بار یک گفتگو، و حداکثر ۵ عضو در هر بار افزودن.

هشدار: حالت وب اکانت شخصی شما را خودکار می‌کند و ممکن است خلاف قوانین روبیکا باشد؛ استفاده‌ی نادرست می‌تواند به محدود شدن اکانت برسد. هر کس به پوشه‌ی پروفایل مرورگر (~/.nabuxai/iranian-messaging-profiles/rubika) دسترسی داشته باشد به اکانت شما دسترسی دارد. جزئیات در SECURITY.md.


English

An MCP server for Rubika. Bot mode — Rubika's official Bot API v3: text, files (three-step upload), edit, delete, updates. The bot must be an admin of a group or channel. Web mode drives Rubika Web in a local Chrome window with your own signed-in account (you type the sign-in code yourself in that window; the session is kept in a local profile). 26 of 26 web operations are available here; call rubika_web_capabilities for the live list.

Install: npx -y @nabuxai/rubika-mcp (see the JSON config above; every variable is documented in .env.example). Writes need confirm: true, an allowlisted chat and NABU_MESSAGING_ENABLE_SEND=1; account changes also need NABU_WEB_ALLOW_ACCOUNT_CHANGES=1. There is no bulk sending. Most Iranian messenger hosts only answer Iranian IPs; use NABU_BROWSER_PROXY with a SOCKS tunnel if needed.

Built on @nabuxai/iranian-messaging-core. Sister servers: eitaa-mcp, rubika-mcp, bale-mcp, soroushplus-mcp, gap-mcp.

MIT © NabuxAI. Community project; not affiliated with or endorsed by Rubika.

Available Tools

40 tools
rubika_bot_delete_messageRubika bot: deleteA
DestructiveIdempotent

Delete a message the bot sent. Cannot be undone. Needs confirm: true, the chat in RUBIKA_ALLOWED_CHAT_IDS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: chatId (required), confirm (required), messageId (required).

rubika_bot_edit_messageRubika bot: editA
Idempotent

Replace the text of a message the bot sent. Needs confirm: true, the chat in RUBIKA_ALLOWED_CHAT_IDS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: text (required), chatId (required), confirm (required), messageId (required).

rubika_bot_get_chatRubika bot: chat infoC
Read-onlyIdempotent

Type, title and username of a chat the bot can see.

Inputs: chatId (required).

rubika_bot_get_meRubika bot: who am IA
Read-onlyIdempotent

Check the bot token and return the bot id, username and name.

Inputs: no named parameters.

rubika_bot_get_updatesRubika bot: incomingB
Read-only

Messages and events the bot received. Pass nextOffset as offset for newer ones. Marks earlier updates as delivered.

Inputs: limit, offset.

rubika_bot_infoRubika bot: setupA
Read-onlyIdempotent

Show what the Rubika bot integration supports and which env vars it needs.

Inputs: no named parameters.

rubika_bot_preview_messageRubika bot: previewB
Read-onlyIdempotent

Check whether a text message would be sent, without sending.

Inputs: text (required), chatId (required).

rubika_bot_send_fileRubika bot: send fileA

Send ONE file from an https URL or a path inside NABU_MESSAGING_FILE_ROOT. Needs confirm: true, the chat in RUBIKA_ALLOWED_CHAT_IDS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: chatId (required), confirm (required), kind, caption, +2 more.

rubika_bot_send_messageRubika bot: send textA

Send ONE text message through the bot. No bulk sending. Needs confirm: true, the chat in RUBIKA_ALLOWED_CHAT_IDS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: text (required), chatId (required), confirm (required), replyToMessageId.

rubika_web_add_membersRubika (own account): add membersA

Add up to 5 users to a group or channel the user administers. Only add people who agreed to it. Changes the user's account: needs confirm: true after the user approves, NABU_WEB_ALLOW_ACCOUNT_CHANGES=1 and (for an existing chat) the chat in RUBIKA_WEB_ALLOWED_CHATS.

Inputs: chatId (required), confirm (required), userIds (required).

rubika_web_capabilitiesRubika (own account): capabilitiesC
Read-onlyIdempotent

Which Rubika web operations are available here.

Inputs: no named parameters.

rubika_web_closeRubika (own account): closeA

Close the web app window. The sign-in stays saved.

Inputs: no named parameters.

rubika_web_create_chatRubika (own account): create group/channelA

Create one group or channel owned by the user. Changes the user's account: needs confirm: true after the user approves, NABU_WEB_ALLOW_ACCOUNT_CHANGES=1 and (for an existing chat) the chat in RUBIKA_WEB_ALLOWED_CHATS.

Inputs: type (required), title (required), confirm (required), about.

rubika_web_delete_messagesRubika (own account): deleteA
DestructiveIdempotent

Delete messages; forEveryone (default true) also removes them for the other side where allowed. Cannot be undone. Needs confirm: true after the user approves, the chat in RUBIKA_WEB_ALLOWED_CHATS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: chatId (required), confirm (required), messageIds (required), forEveryone.

rubika_web_download_mediaRubika (own account): download mediaA

Save one message's photo, video or file under NABU_MESSAGING_FILE_ROOT/downloads/ and return its path.

Inputs: chatId (required), messageId (required).

rubika_web_edit_messageRubika (own account): editA
Idempotent

Replace the text or caption of one of the user's messages. Needs confirm: true after the user approves, the chat in RUBIKA_WEB_ALLOWED_CHATS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: text (required), chatId (required), confirm (required), messageId (required).

rubika_web_forward_messagesRubika (own account): forwardA

Forward up to 10 messages to another chat; the destination must be allowlisted. Needs confirm: true after the user approves, the chat in RUBIKA_WEB_ALLOWED_CHATS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: confirm (required), toChatId (required), fromChatId (required), messageIds (required).

rubika_web_get_chat_infoRubika (own account): chat detailsC
Read-onlyIdempotent

Title, username, type, description, member count and the user's role.

Inputs: chatId (required).

rubika_web_get_contactsRubika (own account): contactsB
Read-onlyIdempotent

The user's contacts (userId, name, username). Phone numbers are not returned.

Inputs: limit, query.

rubika_web_get_membersRubika (own account): membersB
Read-onlyIdempotent

Members of a group or channel the user can see (userId, name, username, role).

Inputs: chatId (required), limit, query.

rubika_web_get_unreadRubika (own account): unreadA
Read-onlyIdempotent

Chats with unread messages and their newest unread messages, without marking them read. Poll this to receive messages.

Inputs: limit.

rubika_web_join_chatRubika (own account): joinA

Join one group or channel by invite link or @username. Changes the user's account: needs confirm: true after the user approves, NABU_WEB_ALLOW_ACCOUNT_CHANGES=1 and (for an existing chat) the chat in RUBIKA_WEB_ALLOWED_CHATS.

Inputs: link (required), confirm (required).

rubika_web_leave_chatRubika (own account): leaveA
Destructive

Leave one group or channel. Changes the user's account: needs confirm: true after the user approves, NABU_WEB_ALLOW_ACCOUNT_CHANGES=1 and (for an existing chat) the chat in RUBIKA_WEB_ALLOWED_CHATS.

Inputs: chatId (required), confirm (required).

rubika_web_list_chatsRubika (own account): list chatsC
Read-onlyIdempotent

Chats, groups and channels with chatId, title, username, unread count and whether the user can post.

Inputs: limit, query.

rubika_web_login_startRubika (own account): start sign-inA

Type the user's mobile number on the login page and continue. The verification code and any 2FA password must be typed by the user in the browser window; never ask for them in chat.

Inputs: phone (required).

rubika_web_mark_readRubika (own account): mark readA
Idempotent

Mark everything in a chat as read for the user.

Inputs: chatId (required).

rubika_web_openRubika (own account): openA

Open Rubika Web in a visible Chrome window with a saved profile and report whether the user is signed in. Needs NABU_BROWSER_ENABLE=1; set NABU_BROWSER_PROXY (e.g. socks5://127.0.0.1:1088) when this machine has no Iranian IP.

Inputs: no named parameters.

rubika_web_pin_messageRubika (own account): pin/unpinA
Idempotent

Pin a message, or unpin it with unpin: true. Needs confirm: true after the user approves, the chat in RUBIKA_WEB_ALLOWED_CHATS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: chatId (required), confirm (required), messageId (required), unpin.

rubika_web_read_chatRubika (own account): read chatA
Read-onlyIdempotent

Recent messages of one chat, newest first. Pass nextBeforeMessageId as beforeMessageId for older ones.

Inputs: chatId (required), limit, beforeMessageId.

rubika_web_remove_memberRubika (own account): remove memberA
Destructive

Remove (ban: true also blocks) one member. Changes the user's account: needs confirm: true after the user approves, NABU_WEB_ALLOW_ACCOUNT_CHANGES=1 and (for an existing chat) the chat in RUBIKA_WEB_ALLOWED_CHATS.

Inputs: chatId (required), userId (required), confirm (required), ban.

rubika_web_search_messagesRubika (own account): searchB
Read-onlyIdempotent

Search messages by text in one chat (chatId) or across all chats.

Inputs: query (required), limit, chatId.

rubika_web_send_contactRubika (own account): send contactB

Send one contact card. Needs confirm: true after the user approves, the chat in RUBIKA_WEB_ALLOWED_CHATS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: phone (required), chatId (required), confirm (required), firstName (required), +1 more.

rubika_web_send_fileRubika (own account): send fileA

Send ONE file (up to 20 MB) from an https URL or a path inside NABU_MESSAGING_FILE_ROOT; images go as photos. Needs confirm: true after the user approves, the chat in RUBIKA_WEB_ALLOWED_CHATS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: chatId (required), confirm (required), caption, fileUrl, +1 more.

rubika_web_send_locationRubika (own account): send locationA

Send one location pin. Needs confirm: true after the user approves, the chat in RUBIKA_WEB_ALLOWED_CHATS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: chatId (required), confirm (required), latitude (required), longitude (required).

rubika_web_send_messageRubika (own account): send textA

Send ONE text message from the user's own account. No bulk sending. Needs confirm: true after the user approves, the chat in RUBIKA_WEB_ALLOWED_CHATS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: text (required), chatId (required), confirm (required), replyToMessageId.

rubika_web_send_pollRubika (own account): send pollA

Send one poll with 2-10 options. Needs confirm: true after the user approves, the chat in RUBIKA_WEB_ALLOWED_CHATS and NABU_MESSAGING_ENABLE_SEND=1.

Inputs: chatId (required), confirm (required), options (required), question (required), +2 more.

rubika_web_set_adminRubika (own account): admin rightsA
Idempotent

Promote one member to admin (isAdmin: true) or demote them. Changes the user's account: needs confirm: true after the user approves, NABU_WEB_ALLOW_ACCOUNT_CHANGES=1 and (for an existing chat) the chat in RUBIKA_WEB_ALLOWED_CHATS.

Inputs: chatId (required), userId (required), confirm (required), isAdmin.

rubika_web_statusRubika (own account): sign-in statusA
Read-onlyIdempotent

Whether the web app is open and signed in, or which login step it waits on.

Inputs: no named parameters.

rubika_web_update_chatRubika (own account): rename/describeA
Idempotent

Change the title and/or description of a group or channel the user administers. Changes the user's account: needs confirm: true after the user approves, NABU_WEB_ALLOW_ACCOUNT_CHANGES=1 and (for an existing chat) the chat in RUBIKA_WEB_ALLOWED_CHATS.

Inputs: chatId (required), confirm (required), about, title.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 40 tools

    Disambiguation4/5

    Most tools target distinct resources or actions, and the rubika_bot_ vs rubika_web_ prefixes plus detailed descriptions clarify whether an operation uses the bot API or the user's own account. However, parallel pairs such as bot/web send_message, edit_message, delete messages, and get_updates vs get_unread create some selection ambiguity.

    Naming Consistency4/5

    All tool names use snake_case with consistent rubika_bot_ and rubika_web_ namespaces, and most follow a readable verb_noun pattern such as send_message, get_chat_info, and add_members. A few noun-only or irregular forms like rubika_bot_info, rubika_web_status, rubika_web_capabilities, and login_start are minor deviations.

    Tool Count2/5

    40 tools is heavy for a messaging integration, even accounting for the split between bot API and web-account automation. The many granular web operations make the surface large enough to overwhelm tool selection rather than feeling well-scoped.

    Completeness4/5

    The web surface covers the core lifecycle: login/status, chats, messages, media, search, contacts, members, forwarding, pinning, and admin actions. Minor gaps remain around reactions, poll results, richer profile/chat settings, and explicit reply workflows, but core messaging workflows are covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      A
      maintenance
      Enables coding agents to browse chats, read and search messages, look up contacts, save received files, and send messages or files through a linked account.
      4
      572 npm
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI clients such as Claude and Cursor to send messages and media through Iranian messaging services including Bale, Eitaa, Rubika, and Soroush Plus via MCP tools. Includes a Persian dashboard for managing bot tokens, MCP connection settings, logging, and security limits.
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to read and send messages on the Eitaa messenger, either through the Eitaayar bot API or by driving a locally signed-in web session. Supports chat listing, media and file sending, message management, contacts, groups, channels, and guarded write operations.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to read and send messages, manage chats, share files and locations, search conversations, and perform account actions through the messaging platform using either the official Bot API or a locally signed-in web session.
      MIT