toolstringCanonical tool name (snake_case), e.g. 'planner' or 'get_browser_tabs'. Only one of tool/action is required.
RUN
/mcpUse the sessions and permissions already available in Chrome.
Connect an MCP client or send JSON from your backend.
Use browser tools on your device and knowledge tools in Cloud.
Introduction
MCP Deep Dive
/mcpControl your logged-in Chrome or call cloud-only knowledge base tools via HTTP or MCP
https://mcp.rtrvr.aiShared by both direct HTTP calls and MCP clients. Extension-generated MCP URLs include your API key and deviceId; cloud-only knowledge base tools do not require a device.
The rtrvr.ai Chrome Extension registers as a remote browser device and exposes a single public entrypoint at https://mcp.rtrvr.ai. That same endpoint speaks:
apiKey + deviceId) into any MCP-enabled client (e.g. Claude).tool + params. Extension-backed tools dispatch into your online browser devices, while cloud-only knowledge base tools execute immediately without a device."Your Chrome browser is now an Agentic API Endpoint."
Trigger complex workflows in your own logged-in browser instance from CI/CD, Slack bots, cron jobs, or backend services.
OAuth Support (Recommended)
MCP clients that support OAuth can authenticate by connecting to mcp.rtrvr.ai directly. This triggers a Google Sign-In flow and returns a secure session token.
API Key in URL (Fallback)
For MCP clients without OAuth support, embed your API key directly in the URL:
https://mcp.rtrvr.ai?apiKey=rtrvr_your_api_key&deviceId=your_device_idFor direct HTTP calls, auth can be provided via:
Authorization: Bearer YOUR_API_KEY (recommended)X-API-Key: YOUR_API_KEY?apiKey=YOUR_API_KEYAuthorization: Bearer rtrvr_your_api_keyEach Chrome/Chromium profile you install the extension into registers as a separate deviceId. This enables powerful multi-device workflows:
How deviceId works:
deviceId is embedded in the MCP URL generated by the extensiondeviceId in your requestdeviceId or device_id in the query or body to target a specific device.lastSeen timestamp)./mcp with different device IDs.get_current_credits and list_devices work even if no device is online.deviceId parameter is embedded in the URL.list_devices to see all registered devices and their online/offline status.// List all your devices
curl -X POST "https://mcp.rtrvr.ai" \
-H "Authorization: Bearer rtrvr_xxx" \
-H "Content-Type: application/json" \
-d '{"tool": "list_devices"}'
// Response shows deviceId + online status
{
"success": true,
"data": {
"devices": [
{ "deviceId": "dj75mmaTWP0", "online": true, "lastSeen": "2025-01-15T10:30:00Z" },
{ "deviceId": "abc123XYZ", "online": false, "lastSeen": "2025-01-14T18:00:00Z" }
]
}
}https://mcp.rtrvr.aiThe same endpoint powers both MCP and HTTP. For HTTP, you send a single JSON object describing which tool to run, which parameters to pass through, and optionally which device to target for extension-backed tools.
interface BrowserAgentApiRequest {
/**
* Canonical tool name, e.g. "planner" or "get_browser_tabs".
* Only one of "tool" or "action" is required.
*/
tool?: string;
/**
* Optional alias of "tool". Use canonical snake_case tool names.
*/
action?: string;
/**
* Parameters for the tool. "params" and "parameters" are equivalent.
* Prefer canonical snake_case parameter names.
*/
params?: Record<string, any>;
parameters?: Record<string, any>;
/**
* Optional: route extension-backed tools to a specific Chrome profile / device.
* Cloud-only knowledge base tools ignore this field.
*/
deviceId?: string;
device_id?: string;
/**
* Per-request timeout in milliseconds (default: 300000 / 5 minutes).
*/
timeout?: number;
/**
* Reserved for future async modes.
*/
async?: boolean;
webhookUrl?: string;
}toolstringCanonical tool name (snake_case), e.g. 'planner' or 'get_browser_tabs'. Only one of tool/action is required.
actionstringOptional alias of tool. Use canonical snake_case tool names for reliability.
params / parametersobjectJSON object of tool-specific parameters. 'params' and 'parameters' are aliases. Prefer snake_case parameter names.
params.options.ui.emitEventsbooleandefault falseOpt-in only. Set true to write execution progress events for SSE/polling consumers. If omitted/false, no execution event stream is written.
deviceId / device_idstringOptional device routing for extension-backed tools. If omitted, we pick the most recently active online browser extension device for that user. Cloud-only knowledge base tools ignore this field.
timeoutnumberdefault 300000Max execution time for this request in milliseconds. Defaults to 5 minutes.
async / webhookUrlboolean / stringReserved for future async execution modes. Ignored for now.
options.ui.emitEvents: true. CLI streaming defaults on for run, agent, and scrape (use --no-stream to disable). Streamed payloads at or under 1MB stay inline; larger payloads include inline preview markers and storage references (`outputRef` / `resultRef` / `responseRef`) for full downloads.The Browser as API/MCP exposes extension-backed browser tools, cloud-only tools, scheduling/trigger management, and utility tools. They are grouped into free, credit-based, cloud, utility, and user-defined families.
get_browser_tabs โ list open tabs (filter by all/active/domain).get_page_data โ get accessibility-tree representations for specific tab IDs.take_page_action โ run system tools like click, type, scroll, etc.execute_javascript โ run JS inside a secure browser sandbox (disabled by default).planner โ multi-step planning and tool orchestration from natural language.act_on_tab โ intelligent page interaction with optional structured schemas.extract_from_tab โ structured extraction to JSON or Google Sheets.crawl_and_extract_from_tab โ multi-page crawls with schema extraction.replay_workflow โ replay a previously executed workflow by task ID or shared URL.schedule โ create or modify a scheduled workflow on the browser extension.trigger_setup โ create or modify a trigger workflow on the browser extension.cloud_scrape โ scrape web pages using cloud browsers, returns accessibility trees.cloud_agent โ execute AI agent tasks using cloud browsers with structured output.list_skills โ list your skill files (persistent markdown memory the agent reads and updates).get_skill โ read one skill file's full markdown by name.check_schedule_results โ check execution results of scheduled workflows from cloud storage.check_trigger_results โ check execution results of trigger workflows from cloud storage.list_devices โ list all registered extension devices and online/offline status.get_current_credits โ fetch current plan, credits used, and credits remaining.upload_file โ upload a file (base64, URL import, or signed upload URL) to rtrvr storage and get back a storageUrl to attach to agent tools. Free, no device required.list_recordings โ list all user recordings (returns metadata: ID, name, timestamp).list_custom_functions โ list all custom functions (metadata only, not code).list_schedules โ list all scheduled workflow configurations. Works offline.list_triggers โ list all trigger workflow configurations. Works offline.user_function โ user-defined tools created in Cloud and executed in the extension sandbox.Use canonical snake_case tool names. For direct HTTP, action can mirror tool:
tool: "agent" โ unified alias that routes to cloud_agent (default) or planner (when extension/local session is requested).tool: "scrape" โ unified alias that routes to cloud_scrape (default) or extension scrape.tool: "planner" is equivalent to action: "planner".tool: "act_on_tab" is equivalent to action: "act_on_tab".tools/list.Prefer snake_case parameters. Common compatibility aliases include:
user_input โ userInputtab_urls โ tabUrlsdevice_id โ deviceIdmax_steps โ maxStepstask_id โ taskIdrecording_id โ recordingIdfile_urls โ fileUrlsimage_urls โ imageUrlsshared_workflow_url โ sharedWorkflowUrlstore_id โ storeIdconversation_context โ conversationContexttab_ids โ tabIdsweb_page_map โ webPageMapauth_token โ authTokenAll credit tools support file and image inputs via publicly fetchable URLs. Files are automatically uploaded to Firebase Storage and passed to the agent as context. For local files that aren't hosted anywhere, use the upload_file tool first (see below) and pass the returned storageUrl.
Supported input parameters:
file_urls โ array of publicly fetchable file URLs (CSV, PDF, etc.)image_urls โ array of publicly fetchable image URLs (JPG, PNG, etc.)recording_id โ ID of a recorded workflow to use as contextfile_urlsCSV, PDF, text files to use as input data
image_urlsJPG, PNG images for visual context
recording_idRecorded workflow to use as context
{
"tool": "planner",
"params": {
"user_input": "Upload this CSV and submit the form",
"tab_urls": ["https://example.com/upload"],
"file_urls": ["https://example.com/data.csv"],
"image_urls": ["https://example.com/screenshot.png"],
"recording_id": "rec_abc123"
}
}upload_fileThe upload_file tool stores a file under your account and returns a storageUrl + gcsUri. It is free, needs no device, and supports three modes (max 20MB per file):
name, mimeType, and base64 data โ best for small files.url โ the file is copied into rtrvr storage.name and mimeType โ you get back a signed uploadUrl valid for 15 minutes. PUT the raw bytes to it (no base64 inflation), then use the returned storageUrl.# 1. Request a signed upload URL (no bytes in the request)
curl -X POST "https://mcp.rtrvr.ai" \
-H "Authorization: Bearer rtrvr_xxx" \
-H "Content-Type: application/json" \
-d '{"tool": "upload_file", "params": {"name": "resume.pdf", "mimeType": "application/pdf"}}'
# โ { "mode": "signed_url", "uploadUrl": "https://storage.googleapis.com/โฆ", "storageUrl": "โฆ", "gcsUri": "gs://โฆ" }
# 2. Upload the raw bytes
curl -X PUT -H "Content-Type: application/pdf" --upload-file ./resume.pdf "<uploadUrl>"
# 3. Attach it to any agent tool
curl -X POST "https://mcp.rtrvr.ai" \
-H "Authorization: Bearer rtrvr_xxx" \
-H "Content-Type: application/json" \
-d '{
"tool": "planner",
"params": {
"user_input": "Apply to this job with my resume",
"tab_urls": ["https://example.com/careers/apply"],
"file_urls": ["<storageUrl>"]
}
}'For agent / cloud_agent, attach files via the files parameter instead of file_urls:
{
"tool": "agent",
"params": {
"user_input": "Summarize the attached report",
"files": [
{ "displayName": "report.pdf", "uri": "<storageUrl>", "mimeType": "application/pdf" }
]
}
}The replay_workflow tool allows you to re-execute a previously completed workflow. You can replay your own workflows by task ID, or replay workflows shared by other users via a shared URL.
Two ways to replay:
task_id โ replay your own workflow by execution IDshared_workflow_url โ replay a workflow shared by another userAt least one of these must be provided.
task_idstringThe task ID from a previous workflow execution in your history.
shared_workflow_urlstringA shared workflow URL (e.g., https://rtrvr.ai/shared/Tasks/userId/taskId/token). Use this to replay workflows shared by other users.
tab_execution_modestringdefault new_tabsHow to handle tabs during replay.
new_tabsreuse_tabscurrent_contextrecording_idstringOptional recording ID to use as additional context.
file_urlsstring[]Optional file URLs to include as input.
image_urlsstring[]Optional image URLs to include as input.
// By task ID (your own workflow)
{
"tool": "replay_workflow",
"params": {
"task_id": "abc123xyz",
"tab_execution_mode": "new_tabs"
}
}
// By shared URL (another user's workflow)
{
"tool": "replay_workflow",
"params": {
"shared_workflow_url": "https://rtrvr.ai/shared/Tasks/userId/taskId/token"
}
}Below is a conceptual TypeScript view of each tool's parameters.
// Free tools
get_browser_tabs({
filter?: "all" | "active" | "domain";
domain?: string;
device_id?: string;
});
get_page_data({
tabIds: number[];
device_id?: string;
});
take_page_action({
actions: {
tab_id?: number;
tool_name: SystemToolName;
args: Record<string, any>;
}[];
device_id?: string;
});
execute_javascript({
code: string;
timeout?: number;
context?: Record<string, any>;
device_id?: string;
});
// Credit tools
planner({
user_input: string;
context?: string;
tab_urls?: string[];
max_steps?: number;
device_id?: string;
recording_id?: string; // Recording ID to use as workflow context
file_urls?: string[]; // Publicly fetchable file URLs
image_urls?: string[]; // Publicly fetchable image URLs
});
act_on_tab({
user_input: string;
tab_urls?: string[];
schema?: {
fields: {
name: string;
description: string;
type: string;
required?: boolean;
}[];
};
tab_id?: number;
device_id?: string;
recording_id?: string;
file_urls?: string[];
image_urls?: string[];
});
extract_from_tab({
user_input: string;
tab_urls?: string[];
schema?: {
fields: {
name: string;
description: string;
type: string;
required?: boolean;
}[];
};
output_destination?: {
type: "json" | "google_sheet";
new_sheet_title?: string;
new_tab_title?: string;
existing_sheet_id?: string;
existing_tab_title?: string;
};
tab_id?: number;
device_id?: string;
recording_id?: string;
file_urls?: string[];
image_urls?: string[];
});
crawl_and_extract_from_tab({
user_input: string;
tab_urls?: string[];
schema?: { fields: { name: string; description: string; type: string; required?: boolean; }[]; };
max_pages?: number;
follow_links?: boolean;
link_pattern?: string;
output_destination?: { type: "json" | "google_sheet"; new_sheet_title?: string; };
tab_id?: number;
device_id?: string;
recording_id?: string;
file_urls?: string[];
image_urls?: string[];
});
replay_workflow({
task_id?: string; // Task ID from previous execution
shared_workflow_url?: string; // Shared workflow URL from another user
tab_execution_mode?: "new_tabs" | "reuse_tabs" | "current_context";
recording_id?: string;
file_urls?: string[];
image_urls?: string[];
});
// Cloud-only skill tools (no device_id required)
list_skills({});
get_skill({
name: string;
}});
// Utility: upload a local file to rtrvr storage (free, no device_id required)
upload_file({
name?: string; // filename incl. extension; required unless url given
mimeType?: string; // inferred from extension if omitted
data?: string; // base64 content (small files)
url?: string; // OR: public URL to import
// neither data nor url โ returns a signed PUT uploadUrl (15 min)
// โ { storageUrl, gcsUri } to pass via file_urls or files[]
});
// User functions (defined in Cloud and executed in the browser sandbox)
user_function({
functionName: string;
// your custom parameters...
});All tools return a consistent envelope with tool-specific data plus metadata:
interface BrowserAgentApiResponse<TData = any> {
success: boolean;
data: TData | null;
error: string | null;
metadata: {
requestId: string;
executionTime: number;
tool: string;
deviceId?: string;
creditsUsed?: number;
creditsRemaining?: number;
inlineOutputMaxBytes?: number;
outputTooLarge?: boolean;
responseRef?: StorageReference;
};
timestamp: string;
}{
"success": true,
"data": {
"tabs": [{ "id": 1, "url": "https://example.com" }],
"activeTab": { "id": 1, "url": "https://example.com" },
"tabCount": 1
},
"error": null,
"metadata": {
"requestId": "req_abc123",
"executionTime": 1234,
"tool": "get_browser_tabs",
"deviceId": "dj75mmaTWP0",
"creditsUsed": 0,
"creditsRemaining": 10000
},
"timestamp": "2025-01-01T12:00:00.000Z"
}metadata.deviceId shows which device executed the request.metadata.requestId is useful for joining logs with rtrvr.ai's internal state.X-Credits-Used and X-Credits-Remaining are also surfaced.metadata.responseRef and/or outputRef/resultRef.Remote tool execution can be configured at a per-user and per-tool level via the extension settings and the Cloud dashboard.
If /mcp calls fail with No online devices found or other errors:
list_devices to see which devices are online.https://mcp.rtrvr.ai with your API key in headers. Optionally pass deviceId to target a specific device.These snippets show the recommended integration pattern: a thin server-side helper that wraps POST /mcp, keeps your API key off the frontend, and centralizes rate limiting + logging.
# 1) Your browser as an agentic API endpoint
curl -X POST "https://mcp.rtrvr.ai" \
-H "Authorization: Bearer rtrvr_xxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"tool": "planner",
"params": {
"user_input": "Go to ChatGPT.com, ask for top Indian restaurants in SF, and extract back citations.",
"tab_urls": ["https://chatgpt.com"],
"options": {
"ui": {
"emitEvents": true
}
}
},
"deviceId": "dj75mmaTWP0"
}'
# 2) Free tool: list all tabs on your most recent device (no deviceId = auto-select)
curl -X POST "https://mcp.rtrvr.ai" \
-H "X-API-Key: rtrvr_xxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"tool": "get_browser_tabs",
"params": { "filter": "all" }
}'
# 3) Replay a workflow with file inputs
curl -X POST "https://mcp.rtrvr.ai" \
-H "Authorization: Bearer rtrvr_xxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"tool": "replay_workflow",
"params": {
"task_id": "abc123xyz",
"tab_execution_mode": "new_tabs",
"file_urls": ["https://example.com/data.csv"]
}
}'
# 4) Planner with image context
curl -X POST "https://mcp.rtrvr.ai" \
-H "Authorization: Bearer rtrvr_xxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"tool": "planner",
"params": {
"user_input": "Find similar products to the one in this image",
"tab_urls": ["https://amazon.com"],
"image_urls": ["https://example.com/product.jpg"]
}
}'
# 5) Cloud-only skills listing (no deviceId required)
curl -X POST "https://mcp.rtrvr.ai" \
-H "Authorization: Bearer rtrvr_xxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"tool": "list_skills",
"params": {}
}'
# 6) Cloud-only skill read (no deviceId required)
curl -X POST "https://mcp.rtrvr.ai" \
-H "Authorization: Bearer rtrvr_xxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"tool": "get_skill",
"params": {
"name": "general"
}
}' YOUR NEXT RUN