RubiConnect MCP Integration Guide
The Model Context Protocol (MCP) server allows external AI assistants and enterprise agent platforms (such as Claude Desktop, Claude.ai, Google Cloud Connected Apps / Gemini Enterprise, ChatGPT, and Cursor) to securely read context from and trigger messaging actions within your RubiConnect workspace.
All tool executions and resource reads are strictly isolated to your authenticated accountId and support OAuth 2.1 with Least-Privilege Scopes (`mcp:read` vs `mcp`) as well as standard Developer API Keys.
1. Connection, OAuth 2.1 & Least-Privilege Scopes
RubiConnect supports three authentication and connection modes:
- OAuth 2.1 with Dynamic Client Registration (RFC 7591) & Interactive Consent — Zero-manual-key onboarding for enterprise ecosystems (Google Cloud Connected Apps / Gemini Enterprise, Claude Connectors, Smithery, and MCP registries) with mandatory
S256PKCE and interactive Read-Only vs Full Access user consent. - OAuth 2.1 API-Key Connector Bridge — Point-and-click browser OAuth flow where your RubiConnect API Key (
rc_live_...) serves directly as the OAuthclient_id. - Direct Header Authentication — Pass
Authorization: Bearer <API_KEY_OR_OAUTH_TOKEN>orX-Rubi-Key: <API_KEY>directly on HTTP SSE and JSON-RPCPOSTrequests (ideal for Cursor IDE and Python/Node.js SDKs).
Endpoint & Discovery Directory
OAuth 2.1 Scopes & Access Levels
RubiConnect implements granular OAuth 2.1 scopes so users and administrators can grant AI agents least-privilege access:
Interactive User Choice & Anti-Escalation: During browser authorization at/en/authorize/consent, users can choose between Read-Only Access (`mcp:read`) and Full Access (`mcp`) before approving a connection. If an external app explicitly requestsscope=mcp:read, the consent screen locks to Read-Only so permissions can never be escalated beyond what the client requested.
2. Client Configurations
2.1 Google Cloud Connected Apps / Gemini Enterprise (OAuth 2.1 + DCR)
RubiConnect natively satisfies Google Cloud Connected Apps and Gemini Enterprise OAuth 2.1 security requirements:
- MCP Server Endpoint:
https://console.rubiconnect.com/api/mcp - Discovery Metadata:
https://console.rubiconnect.com/.well-known/oauth-authorization-server - Dynamic Client Registration:
https://console.rubiconnect.com/api/oauth/register - PKCE Method:
S256(mandatory;plainand missingcode_challengerequests are rejected) - Supported Scopes: Request
mcp:readfor read-only workspace intelligence, ormcpto let the authorizing user choose between Read-Only (mcp:read) and Full Access (mcp) on the RubiConnect consent screen.
2.2 Claude In-App Connector (Desktop App & Claude.ai Web) — Recommended
Whether you are using Claude Desktop on macOS/Windows or Claude.ai in your browser, Anthropic provides a point-and-click Connector interface powered by OAuth 2.1 with PKCE:
- In Claude Desktop or Claude.ai, navigate to Settings > Connectors > Add Custom Connector.
- Enter the Server URL:
https://console.rubiconnect.com/api/mcp- Authentication:
- If Claude performs automatic OAuth 2.1 Dynamic Client Registration via
/.well-known/oauth-authorization-server, click Connect — your browser will open/en/authorize/consentwhere you sign in and select Read-Only (`mcp:read`) or Full Access (`mcp`). - If prompted manually for OAuth credentials, paste your RubiConnect API Key (
rc_live_...) as Client ID and leave Client Secret blank (PKCE does not require a static secret).
- If Claude performs automatic OAuth 2.1 Dynamic Client Registration via
- Once authorized, RubiConnect exposes the 16 read-only tools (for
mcp:read) or all 26 messaging, template, flow, campaign, analytics, and documentation tools (formcp) in your Claude sessions.
2.3 OpenAI Custom GPTs & Enterprise Agent Platforms
To connect RubiConnect to ChatGPT Custom GPTs or enterprise orchestrators (Flowise, LangChain, Relevance AI, Zapier Central):
- In the action/connector editor, select OAuth:
- Client ID: Obtain via
POST /api/oauth/register(client_...) or enter your RubiConnect API Key (rc_live_...). - Client Secret: Client secret returned by
/api/oauth/register(or leave empty when usingS256PKCE public client mode). - Authorization URL:
https://console.rubiconnect.com/en/authorize - Token URL:
https://console.rubiconnect.com/api/oauth/token - Scope:
mcp:read(for read-only analytics/inbox agents) ormcp(for full read & write agents). - PKCE:
S256(required).
- Client ID: Obtain via
- Import the MCP server (
https://console.rubiconnect.com/api/mcp) or OpenAPI 3.0 schema (https://console.rubiconnect.com/openapi.json).
2.4 Claude Desktop JSON File (claude_desktop_config.json) — Alternative Stdio Bridge
If you prefer configuring Claude Desktop manually via claude_desktop_config.json on disk rather than the in-app OAuth UI, use mcp-remote to bridge local stdio to RubiConnect's remote SSE endpoint:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"rubiconnect": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://console.rubiconnect.com/api/mcp",
"--header",
"Authorization:Bearer ${RUBI_API_KEY}"
],
"env": {
"RUBI_API_KEY": "rc_live_your_actual_api_key_token"
}
}
}
}Syntax Note: The--headerparameter must be formatted as"Authorization:Bearer ${RUBI_API_KEY}"with no space after the colon. You can supply either a full-access API key (rc_live_...) or a scoped OAuth token (rc_oauth_...).
macOS GUI PATH Resolution: GUI apps on macOS do not load.zshrcPATH automatically. If Claude reportscommand not found: npx, use the absolute binary path (/opt/homebrew/bin/npxon Apple Silicon or/usr/local/bin/npxon Intel Mac).
Alternative: Bundled Node.js Bridge Script
RubiConnect also includes a standalone bridge script at scripts/claude-mcp-bridge.mjs:
{
"mcpServers": {
"rubiconnect": {
"command": "node",
"args": ["/absolute/path/to/RubiConnect platform/scripts/claude-mcp-bridge.mjs"],
"env": {
"RUBI_API_KEY": "rc_live_your_actual_api_key_token"
}
}
}
}2.5 Cursor IDE
Cursor natively supports remote Server-Sent Events (SSE) MCP servers without any local bridge:
- Open Cursor Settings (
Cmd + ,orCtrl + ,) > Features > MCP. - Click + Add New MCP Server and enter:
- Name:
rubiconnect - Type:
SSE - URL:
https://console.rubiconnect.com/api/mcp - Headers:
{"Authorization": "Bearer rc_live_your_actual_api_key_token"}(or{"X-Rubi-Key": "rc_live_your_actual_api_key_token"})
- Name:
- Cursor connects immediately and displays a green status indicator alongside the negotiated tools.
2.6 Python SDK Connection
Using the official Python mcp library (pip install mcp):
import asyncio
from mcp import ClientSession
from mcp.client.sse import sse_client
async def main():
headers = {"Authorization": "Bearer rc_live_your_actual_api_key_token"}
async with sse_client("https://console.rubiconnect.com/api/mcp", headers=headers) as (read_stream, write_stream):
async with ClientSession(read_stream, write_stream) as session:
await session.initialize()
# List available tools (16 tools for mcp:read, 26 tools for mcp)
tools = await session.list_tools()
print("Available Tools:", len(tools.tools))
# Retrieve active messaging agents
result = await session.call_tool("list_agents", {})
print("Agents:", result.content[0].text)
asyncio.run(main())2.7 Node.js SDK Connection
Using the official JavaScript @modelcontextprotocol/sdk package:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
async function main() {
const transport = new SSEClientTransport(
new URL("https://console.rubiconnect.com/api/mcp"),
{
headers: {
"Authorization": "Bearer rc_live_your_actual_api_key_token"
}
}
);
const client = new Client(
{ name: "rubiconnect-mcp-client", version: "1.0.0" },
{ capabilities: {} }
);
await client.connect(transport);
const { tools } = await client.listTools();
console.log(`Discovered ${tools.length} tools`);
const agentsResponse = await client.callTool({
name: "list_agents",
arguments: {}
});
console.log("Agents:", agentsResponse.content[0].text);
}
main();2.8 Google Gemini API Integration (Function Calling)
Expose RubiConnect tools to Gemini models using the official @google/genai SDK:
import { GoogleGenAI } from "@google/genai";
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
async function main() {
const transport = new SSEClientTransport(
new URL("https://console.rubiconnect.com/api/mcp"),
{
headers: {
"Authorization": "Bearer rc_live_your_actual_api_key_token"
}
}
);
const client = new Client({ name: "gemini-mcp-agent", version: "1.0.0" }, { capabilities: {} });
await client.connect(transport);
const { tools } = await client.listTools();
const geminiTools = tools.map((tool) => ({
functionDeclarations: [{
name: tool.name,
description: tool.description,
parameters: tool.inputSchema
}]
}));
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
const response = await ai.models.generateContent({
model: 'gemini-2.5-flash',
contents: 'List my active messaging agents, please.',
config: { tools: geminiTools }
});
const call = response.functionCalls?.[0];
if (call) {
const result = await client.callTool({ name: call.name, arguments: call.args });
console.log("MCP Execution Result:", result.content[0].text);
} else {
console.log("Gemini Response:", response.text);
}
}
main();3. Complete Tools Reference Directory (26 Tools)
The MCP server exposes 26 production tools partitioned into 16 Read-Only tools (available with mcp:read or mcp) and 10 Write tools (require mcp or mcp:write scope, or a full-access API key):
System & Health
get_server_status — Read-Only (`mcp:read`)
Retrieve real-time health status, supported messaging channels, and MCP protocol version for the RubiConnect server.
- Input Schema:
object(no parameters required) - Output Format: Health status object containing
status,serverName,version,protocolVersion,supportedChannels, andtimestamp.
Brand Identities & Agents
list_agents — Read-Only (`mcp:read`)
Retrieve active messaging agent profiles (RCS & WhatsApp) registered to the account.
- Input Schema:
object(no required parameters) - Output Format: Array of agent profiles containing
id,displayName,type("RCS"|"WHATSAPP"),status,highLevelStatus,launchStatus, andphoneNumber.
get_agent_profile — Read-Only (`mcp:read`)
Retrieve detailed configuration, verification status, webhook endpoints, and supported channel capabilities for a specific agent profile.
- Parameters:
agentId(string, optional): Unique agent profile identifier (uses active agent from context if omitted).
- Output Format: Detailed agent object including Sinch/Meta verification metadata, webhooks, and channel attributes.
Messaging & Transcripts
check_capability — Read-Only (`mcp:read`)
Checks whether a recipient's phone number is capable of receiving rich messages (RCS or WhatsApp) on a specified agent profile.
- Parameters:
recipient(string, required): Recipient phone number in E.164 format (e.g."+447822857257").agentId(string, optional): Agent identifier to verify against (uses active agent from context if omitted).
- Output Format:
{ recipient, channel: "RCS"|"WHATSAPP", isRcs, status, features }
send_message — Write (`mcp` / `mcp:write`)
Sends a rich or text message to a single recipient OR streams a zero-persistence bulk broadcast directly from a remote HTTPS CSV/JSONL URL across RCS and WhatsApp.
- Parameters:
recipient(string, conditional): Phone number of the recipient in E.164 format (required for single send).contactsUrl(string, conditional): Pre-signed HTTPS CSV or JSONL URL to stream contacts from with zero database persistence.urlFormat(string, optional): Format ofcontactsUrl("csv"or"jsonl", default"csv").agentId(string, optional): Unique ID of the sending agent profile (uses active agent if omitted).text(string, optional): Text message content.mediaUrl(string, optional): Public URL of image, video, or PDF media to send.templateId(string, optional): Pre-configured template ID reference.allowSmsFallback(boolean, optional): Fall back to SMS if recipient lacks RCS capability (defaultfalse).suggestions(array of objects, optional): List of interactive buttons (max 4). Each object contains:type(string, required):"reply","url", or"phone".text(string, required): Label shown on the button (max 25 chars).value(string, optional): Action value (URL for"url", phone number for"phone", or custom postback payload for"reply").
idempotencyKey(string, optional): Client-generated unique key (up to 255 chars, e.g. UUID) to make tool retries safe. Reusing the same key with the same parameters within 24 hours returns the cached response (idempotencyReplayed: true) without sending a duplicate message.
- Output Format: Status object returning
messageId(for single send) orbroadcastIdandstatus: "streaming"(for remote URL broadcasts).
get_inbox_messages — Read-Only (`mcp:read`)
Retrieve recent incoming and outgoing inbox messages and chat logs for an agent profile.
- Parameters:
agentId(string, optional): Agent profile identifier (uses active agent if omitted).limit(number, optional): Number of messages to return (max100, default20).senderType(string, optional): Filter by"user"(outbound),"contact"(inbound customer replies), or"all"(default"all").
- Output Format: Object containing
agentId,agentName,totalMessages, andmessagesarray (id,recipient,sender,content,status,contactName,date).
get_conversation_history — Read-Only (`mcp:read`)
Retrieves chronologically sorted back-and-forth chat messages and transcripts for a specific customer phone number.
- Parameters:
recipient(string, required): Customer phone number in E.164 format.agentId(string, optional): Agent profile identifier (uses active agent if omitted).limit(number, optional): Number of message turns to return (max100, default20).
- Output Format: Object containing
recipient,agentId,totalMessages, and chronologicalmessagesarray.
Message Templates
list_templates — Read-Only (`mcp:read`)
Retrieves pre-configured rich media, card, carousel, and text message templates AND template folders for an agent profile.
- Parameters:
agentId(string, optional): Agent ID or display name (uses active agent if omitted).folderId/folderName(string, optional): Filter templates inside a specific template folder (folderId: "root"returns only root templates).
- Output Format:
{ totalTemplates, folders, templates }where each template includesid,name,type,text,folderId,folderName,createdAt, andmetaStatus.
get_template_detail — Read-Only (`mcp:read`)
Retrieves the full structural layout, folder placement (folderId, folderName), variable placeholders, orientation, and button action payloads for a specific message template.
- Parameters:
templateIdentifier(string, required): Unique ID or name of the template to retrieve.agentId(string, optional): Agent identifier (uses active agent if omitted).
- Output Format: Complete template entity with card structures, media URLs, folder placement, and button configurations.
create_template — Write (`mcp` / `mcp:write`)
Create a message template in the account library (optionally organized inside a template folder via folderName or folderId). Supports rich standalone cards (image/video, title, text, buttons), carousels, media, and plain text. For WhatsApp agents, validates Meta formatting rules before saving as a workspace draft (or optionally submitting immediately to Meta).
- Parameters:
name(string, required): Unique name of the template (lowercase, numbers, and underscores for WhatsApp).text(string, required): Main message content or card description. Supports placeholders like{{name}}or{{1}}.agentId(string, optional): Associated agent ID or name.folderName/folderId(string, optional): Template folder placement (auto-createsfolderNameif needed).type(string, optional):"card","text","media", or"carousel".title(string, optional): Headline for rich card templates.mediaUrl(string, optional): Optional image, video, or document URL for the header.cardOrientation(string, optional):"VERTICAL"(default) or"HORIZONTAL".mediaHeight(string, optional):"SHORT","MEDIUM"(default), or"TALL".category(string, optional): Meta template category for WhatsApp agents ("MARKETING","UTILITY","AUTHENTICATION", default"MARKETING").language(string, optional): Language code for WhatsApp templates, e.g."en_US","es_ES"(default"en_US").footer(string, optional): Optional footer text (up to 60 characters on WhatsApp).submitToMeta(boolean, optional): For WhatsApp agents: whether to submit immediately to Meta Graph API (defaultfalse— draft-first mode).suggestions(array of objects, optional): Interactive buttons ("reply","url","phone","copy_code","flow").
- Output Format: Status object confirming
success,templateId,folderId,folderName,metaTemplateName, andmetaStatus.
manage_templates — Write (`mcp` / `mcp:write`)
Organizes existing message templates and manages template folders (template_folders): batch-moves one or multiple templates into a folder (auto-creating the folder if needed) or back to root, creates/renames/deletes template folders, or renames/deletes templates. Destructive actions (delete_folder, delete_template) require confirm: true.
- Parameters:
action(string, optional):"move_templates"(default),"create_folder","rename_folder","delete_folder","rename_template", or"delete_template".templateIdentifiers/templateIdentifier(array of strings / string, conditional): Template names or IDs to move, rename, or delete.folderName/folderIdentifier(string, conditional): Target or existing template folder name/ID.moveToRoot(boolean, optional): Move template(s) out of folders back to root.newName(string, conditional): New name forrename_templateorrename_folder.deleteTemplatesInFolder(boolean, optional): Whenfalse(default ondelete_folder), safely moves templates back to root; whentrue, deletes templates inside the folder.confirm(boolean, conditional): Requiredtruefor"delete_folder"and"delete_template".
- Output Format: Action status object with
folderId,folderName,movedCount, or folder/template mutation summary.
submit_template_to_meta — Write (`mcp` / `mcp:write`)
Submits an existing WhatsApp template from the account library to Meta Graph API for official review and approval.
- Parameters:
templateIdentifier(string, required): The name or document ID of the template to submit.agentId(string, optional): Associated WhatsApp agent ID (uses active agent if omitted).category(string, optional): Meta template category ("MARKETING","UTILITY", or"AUTHENTICATION", default"MARKETING").language(string, optional): Language code for WhatsApp templates, e.g."en_US"(default"en_US").
- Output Format: Status object returning
success,templateId,channel: "WHATSAPP",metaTemplateName,metaCategory,metaLanguage, andmetaStatus("PENDING","APPROVED", or"REJECTED_VALIDATION").
Campaigns & Broadcasts
list_campaigns — Read-Only (`mcp:read`)
List recent messaging campaigns with live delivery status and summary metrics.
- Parameters:
agentId(string, optional): Filter campaigns by sending agent profile.limit(number, optional): Maximum number of campaigns to return (default20, max50).
- Output Format: Array of campaign summaries (
id,name,status,recipientSource,stats,createdAt).
get_campaign_status — Read-Only (`mcp:read`)
Retrieve real-time delivery status, sent, delivered, read, and failed counts for a campaign or streaming broadcast.
- Parameters:
campaignId(string, required): Unique campaign identifier.agentId(string, optional): Agent identifier to scope query.
- Output Format: Object containing
id,name,status,recipientSource, andstats: { sent, delivered, read, failed }.
get_campaign_performance — Read-Only (`mcp:read`)
Retrieves in-depth analytical performance for a campaign, including delivery rate, read rate, replies, and unique engaged recipients.
- Parameters:
campaignId(string, required): Unique campaign identifier.agentId(string, optional): Agent identifier (uses active agent if omitted).
- Output Format: Performance breakdown (
totalSent,delivered,read,replied,failed,uniqueRecipients,uniqueEngagedUsers,deliveryRate,readRate).
create_campaign — Write (`mcp` / `mcp:write`)
Create and dispatch an outbound messaging campaign targeting stored contacts or streaming from a remote HTTPS CSV/JSONL URL with zero database persistence.
- Parameters:
name(string, required): Descriptive name of the campaign.agentId(string, optional): Agent ID to send the campaign from (uses active agent if omitted).recipients(array of strings, optional): Explicit array of recipient phone numbers in E.164 format.contactsUrl(string, conditional): Pre-signed HTTPS CSV/JSONL URL to stream contacts from.urlFormat(string, optional): Format ofcontactsUrl("csv"or"jsonl", default"csv").recipientSource(string, optional): Audience source ("contacts"or"remote_url").contactListName(string, optional): Stored contact list name in workspace.text(string, optional): Main campaign message content.templateId(string, optional): Pre-configured template ID reference.flowId(string, optional): Interactive flow ID reference.sendNow(boolean, optional): Immediately queue and stream broadcast in the background (defaulttrue; passfalseto save as"Draft"for manual console review before sending).allowSmsFallback(boolean, optional): Enable SMS fallback for non-RCS recipients (defaultfalse).
- Output Format: Status object with
campaignId,status("Sending"or"Draft"),recipientSource, andchannel.
Conversation Flows
list_flows — Read-Only (`mcp:read`)
Lists all conversation flows and flow folders configured for an agent profile, including validation status (Valid/Draft), step counts, folder assignments, and trigger types.
- Parameters:
agentId(string, optional): Agent ID or display name (uses active agent if omitted).folderId/folderName(string, optional): Filter flows inside a specific folder.status(string, optional):"Valid","Draft", or"ALL".
- Output Format:
{ agentId, agentName, totalFlows, folders, flows }
get_flow_detail — Read-Only (`mcp:read`)
Retrieves the complete ReactFlow graph (nodes, edges), referenced templates, step-by-step summary, and live validation check for a specific flow.
- Parameters:
flowIdentifier(string, required): Name or unique ID of the flow.agentId(string, optional): Agent ID or display name.
- Output Format: Complete flow object with
nodes,edges,steps,referencedTemplates,isValid,validationErrors, andflowSummary.
create_flow — Write (`mcp` / `mcp:write`)
Creates a new multi-step conversation flow on the ReactFlow canvas. Automatically creates any inline rich card/carousel/text templates (data.inlineTemplate), normalizes sourceHandle branches, arranges visual node coordinates, and validates all branches.
- Parameters:
name(string, required): Human-readable name for the flow.description(string, optional): Short summary of what the flow does.agentId(string, optional): Target agent ID or display name.folderName/folderId(string, optional): Folder placement (auto-createsfolderNameif needed).nodes(array, required): Flow step nodes (start,sendText,sendCard,sendCarousel,sendMedia,userInput,decision,delay,waitUntil,setVariable,webhook,connector,ai,aiChatbot,gotoFlow,end).edges(array, required): Directed edges connectingsource+sourceHandletotarget.autoLayout(boolean, optional): Automatically arrange node coordinates top-to-bottom.
- Output Format:
{ success, flowId, name, status, isValid, validationErrors, createdTemplates, flowSummary }
update_flow — Write (`mcp` / `mcp:write`)
Modifies an existing conversation flow using targeted patches (upsertNodes, removeNodeIds, upsertEdges, removeEdgesFrom, textReplacements, mediaReplacements, name, folderName) or full nodes/edges replacement.
- Parameters:
flowIdentifier(string, required): Name or ID of the flow to modify.upsertNodes/removeNodeIds/upsertEdges/removeEdgesFrom(optional): Incremental graph patch operations.nodes/edges(optional): Full graph replacement arrays.textReplacements(array of{ find, replace }, optional): Find/replace copy across flow steps.mediaReplacements(array of{ nodeId?, findUrl?, cardIndex?, newMediaUrl }, optional): Swap mediafileUrls on flow steps and newly cloned rich card/carousel templates without mutating shared templates.
- Output Format:
{ success, flowId, name, status, isValid, validationErrors, createdTemplates, flowSummary }
clone_flow — Write (`mcp` / `mcp:write`)
Uses an existing conversation flow as a starting point to create a new adapted flow within the same agent or across agents in the account, optionally cloning referenced templates (cloneReferencedTemplates: true) so the source flow's templates remain untouched.
- Parameters:
sourceFlowIdentifier(string, required): Name or ID of the existing source flow.newName(string, required): Name for the new flow.sourceAgentId/agentId(string, optional): Source and target agent identifiers.folderName/folderId(string, optional): Target folder placement (auto-createsfolderNameif needed).cloneReferencedTemplates(boolean, optional): Deep-copy referenced templates for independent editing.textReplacements(array of{ find, replace }, optional): Adapt copy across nodes and cloned templates.mediaReplacements(array of{ nodeId?, findUrl?, cardIndex?, newMediaUrl }, optional): Replace card/carousel/media image URLs across cloned templates while keeping source templates untouched.upsertNodes/removeNodeIds/upsertEdges(optional): Structural customizations applied on top of the cloned graph.
- Output Format:
{ success, flowId, sourceFlowId, sourceFlowName, name, status, isValid, clonedTemplates, flowSummary }
delete_flow — Write (`mcp` / `mcp:write`)
Deletes a conversation flow or manages flow folders (create_folder, rename_folder, delete_folder). Destructive operations require confirm: true after explicit user confirmation.
- Parameters:
action(string, optional):"delete_flow"(default),"create_folder","rename_folder", or"delete_folder".flowIdentifier/folderIdentifier/folderName(string, conditional): Target flow or folder identifier.confirm(boolean, conditional): Requiredtruefor"delete_flow"and"delete_folder".
trigger_flow — Write (`mcp` / `mcp:write`)
Starts/dispatches an existing conversation flow for a recipient phone number in E.164 format.
- Parameters:
flowIdentifier(string, required): Name or ID of the flow to start.recipient(string, required): E.164 phone number (e.g."+447700900123").agentId(string, optional): Sending agent ID or display name.initialVariables(object, optional): Key-value variables injected into{{variable}}context.
- Output Format:
{ success, flowId, flowName, recipient, message, flowSummary }
Analytics & Media
get_message_stats — Read-Only (`mcp:read`)
Retrieves message volume, delivery rates, read receipts, SMS fallbacks, and inbound engagement breakdowns over an ISO date range.
- Parameters:
startDate(string, required): ISO date string (YYYY-MM-DD) for the start of the period.endDate(string, required): ISO date string (YYYY-MM-DD) for the end of the period.agentId(string, optional): Agent identifier (uses active agent if omitted).
- Output Format: Aggregate metrics (
total,sent,received,delivered,read,failed,smsFallback,uniqueRecipients,uniqueEngagedUsers,inboundBreakdown).
search_images — Read-Only (`mcp:read`)
Queries royalty-free stock photography (Pixabay) matching a search query for message cards, carousels, and rich templates.
- Parameters:
query(string, required): Search terms (e.g."coffee","summer sale").index(number, optional): 0-based index to pick a specific image from the results (default0).
- Output Format: Object containing
url(proxied image URL ready for cards/templates) andsuccessboolean.
Knowledge & Documentation
search_documentation — Read-Only (`mcp:read`)
Searches official RubiConnect documentation, user guides, API references, character limits, console navigation, and feature how-to guides to ground AI agent responses in verified platform rules.
- Parameters:
query(string, required): Search query or keywords (e.g."character limits for cards","OAuth read-only scope","SMS fallback configuration").topic(string, optional): Optional topic filter ("GENERAL","DEVELOPER_API","MCP","CONSOLE_UI","RCS_SPECS", or"BILLING").
- Output Format: Object containing
queryand an array of top matchingresultswithsource,heading, andsnippet.
4. Resources & Real-Time Subscriptions
The MCP server exposes workspace resources (accessible under both mcp:read and mcp scopes) that connected AI clients can list, read, and subscribe to over SSE:
messages://inbox (Static Resource URI)
Contains the 20 most recent workspace messages (incoming customer replies and outbound messages).
- MIME Type:
application/json - Format: JSON array containing
id,recipient,content,status, anddate.
messages://{recipient} (Dynamic Resource Template)
Exposes a parameterized chat log stream for any specific customer phone number in international E.164 format (e.g. messages://+447822857257).
- MIME Type:
application/json - Template Parameter:
recipient(string, required, E.164 phone number).
Real-Time Update Notifications
Connected MCP client agents can subscribe to messages://inbox:
- When a contact replies or taps an interactive quick-reply chip, the carrier delivers the inbound event to RubiConnect.
- The MCP Server immediately broadcasts a JSON-RPC
notifications/resources/updatedevent (uri: "messages://inbox") over active SSE streams for that tenant. - The AI client calls
resources/readto fetch the new reply and continue the workflow in real time.
5. Rate-Limiting, Session Lifecycle & Security
- Least-Privilege Read-Only Enforcement (`mcp:read`): Tokens authorized with
mcp:readonly see the 16 read-only tools intools/list. Directtools/callinvocations of any write tool (send_message,create_template,manage_templates,submit_template_to_meta,create_campaign,create_flow,update_flow,clone_flow,delete_flow,trigger_flow) are rejected at the execution boundary, and REST write calls (POST /api/v1/messages/send,POST /api/v1/campaigns,POST /api/flows/start) returnHTTP 403withWWW-Authenticate: Bearer error="insufficient_scope", scope="mcp". - OAuth 2.1 Cryptographic Protections: Authorization requests enforce mandatory
S256PKCE challenges, exact-stringredirect_uriverification against registered URIs, single-use transactional authorization codes (10-minuteTTL), and instant token revocation viaPOST /api/oauth/revoke. - Token-Bucket Rate Limiting: Every MCP request consumes
1token from the key's Token Bucket capacity and returnsX-RateLimit-Limit/X-RateLimit-Remainingheaders (HTTP 429 Too Many RequestswithRetry-Afterwhen exhausted). - SSE Session Lifecycle & Automatic Rehydration: Idle SSE connections automatically close after
2 minutesof inactivity to conserve cloud resources. If a subsequent JSON-RPCPOSTarrives with a valid Bearer credential andmcp-session-idafter an idle disconnect or serverless instance scale-out, RubiConnect transparently rehydrates the session without dropping the tool call. - Action Audit Trail & Draft Safety: Every execution of a write/action tool (
isAction: true) writes a tenant-scopedMCP_TOOL_EXECUTEDentry to your workspace audit log. WhatsApp templates created viacreate_templatedefault tosubmitToMeta: false(draft-first mode), and campaigns created viacreate_campaignsupportsendNow: falseto stage a"Draft"campaign for manual console review before dispatch. - Idempotent Retries (`send_message` & `POST /api/v1/messages/send`): Pass an optional
idempotencyKeyargument tosend_message(orIdempotency-Keyheader /idempotencyKeybody field onPOST /api/v1/messages/send) so retried requests within 24 hours return the originalmessageIdorbroadcastIdwithout texting the recipient twice. Keys are isolated peraccountId, return an in-progress conflict (IDEMPOTENCY_KEY_IN_PROGRESS/ HTTP409) during concurrent retries, reject payload mismatches (IDEMPOTENCY_KEY_PAYLOAD_MISMATCH/ HTTP422), and release cleanly if dispatch fails.
6. Platform Integrations (Salesforce Agentforce, HubSpot, Shopify)
External CRM and e-commerce platforms can consume the RubiConnect MCP server to allow their native AI agents to inspect conversations or trigger communications.
Salesforce Agentforce & Einstein Copilot
- Named Credentials: Configure an OAuth 2.1 or API-Key Named Credential in Salesforce Setup targeting
https://console.rubiconnect.com/api/mcp(use scopemcp:readfor read-only support copilots ormcpfor outbound outreach agents). - Agent Actions: Expose
check_capability,get_conversation_history,list_flows,trigger_flow,send_message, orcreate_campaignto Agentforce / Einstein Copilot.
HubSpot Breeze & AI Agents
- Custom Workflow Extensions: Connect HubSpot Breeze agents or custom workflow actions to
/api/mcpor/api/v1/messages/send. - Automated Outreach & Flows: When a CRM lifecycle stage changes (e.g. Lead Status becomes
"Contacted"), invoketrigger_flowto enroll the contact in an interactive multi-step RCS/WhatsApp flow, orsend_messageto deliver a branded card or approved WhatsApp template.
Shopify AI Agents & Flow
- Order & Cart Events: Connect e-commerce AI support agents (with
mcp:readfor order/inbox lookup ormcpfor proactive notifications). - Interactive Recovery: Invoke
send_messageto dispatch rich RCS carousels or WhatsApp utility updates directly to the shopper's handset.