Developer docs
MCP server
The endpoint, sign-in, scopes, search mode and workspace tools.
New to the API? Start with the introduction.
Endpoint and sign-in
Claude, ChatGPT and other MCP clients connect to https://app.roasaurus.com/mcp (Streamable HTTP, JSON responses). They sign in with OAuth (protected resource metadata, dynamic client registration and PKCE): an owner or admin picks the store and ticks the optional scopes. Clients without OAuth send a named API key with the mcp scope as Authorization: Bearer rsk_…. The server card is at /.well-known/mcp/server-card.json.
Scopes
The mcp scope gives read tools for one store: the reports Ask AI uses, ad performance, GA4, Search Console and connected sites. actions:write adds tools that propose ad, Google and site changes to the Actions inbox for an owner or admin to approve; actions:apply adds apply_action and rollback_action, which change the ad account right away, within the guardrails, as the owner or admin who granted the scope.
Search and execute mode
Clients with a tool limit connect to https://app.roasaurus.com/mcp?mode=search (or use a key or connection set to it under Settings › API). tools/list then shows search (query, optional platform and access: matching tools with their exact input schemas and annotations, plus the store's connected ad accounts, channels and sites), execute_read ({"tool", "arguments"}, read tools only) and execute ({"tool", "arguments", "reasoning"}, write tools only; the reasoning is kept on the proposal).
Workspace tools
admin:read and admin:write reach every store in the workspace of the key's store, by store_id. Only owners and admins can create such a key or allow such a connection, and the scopes stop working when that person is no longer an owner or admin. The older store key never has them. Every change through admin:write is in the workspace's audit log, with actor kind api_key or oauth. The tools never claim what only the merchant can do: the Shopify app install, the theme app embed, ad platform logins and billing approval need the merchant's own clicks, so the tools return the link and mark the step who: merchant.
| Tool | Scope | Does |
|---|---|---|
list_stores | admin:read | Every store in the workspace: id, domain, platform (shopify, woocommerce, custom and other webshop platforms), status (active, paused, review, pending), whether the Shopify app is installed, and when the last storefront event arrived. |
store_setup_status | admin:read | Setup status of one store, or of every store in the workspace when store_id is left out: Shopify app, app web pixel and theme app embed (the embed's on/off state is only visible inside the Shopify admin, so it is inferred from storefront events), ad platform connections and their logins, server events sent and failed per platform in the last 7 days, last synced ad spend day per platform, share of variants with a product cost, orders matched to a visitor in the last 7 days, consent and attribution settings, and visitor recognition. "checks" is the verified setup report. |
diagnose_store | admin:read | The likely reasons conversions are missing for a store, optionally for one ad platform (meta, google, tiktok, …), each with the concrete next step and who can take it ("merchant" when it needs the merchant's own login or clicks, "mcp" when a tool here can do it). Built only from data ROASaurus has: store status, Shopify app and pixel, storefront events, consent, destination logins, failed and skipped deliveries with their errors, and matched orders. |
list_custom_costs | admin:read | The custom costs of a store (Profit › Costs): id, name, category, frequency, amount, start and end date, whether it counts in CAC, and its source (manual, or the cost source that syncs it; only manual costs can be changed here). Custom metrics are listed by list_dashboards. |
list_clients | admin:read | Every store the person behind these credentials can open: their own workspace's and those of the clients that granted their agency access, with the client (workspace) name, store id, domain and platform. Use the store_id with client_report. |
client_report | admin:read | Runs one read report tool (the Ask AI tools: profit_summary, campaign_profit, ad_performance, products, customer_value, attribution, anomalies, action_plan, inventory and the others listed by tools/list) for one store from list_clients. Read only. |
update_consent_settings | admin:write | Changes how a store handles consent: mode respect (track only with consent), strict, region (consent asked in the EU/EEA, UK and Switzerland) or ignore (track everyone; needs confirm_no_consent=true, and the merchant answers for it legally); anonymous cookieless measurement; visitor recognition by browser fingerprint (only for visitors who consented) and the household link (needs fingerprint). Leave out what should stay. Audited. |
update_attribution_settings | admin:write | Changes a store's attribution settings as the store settings form allows: click window in days (1-90), click lookback (window, or all since the first visit), survey lookback, position-based weights (first and last, in %), time decay half-life in days, and whether orders are dated by order or click. Leave out what should stay. Audited. |
set_variant_costs | admin:write | Sets product costs (COGS) per unit in the store currency, like the cost CSV import: each row names a variant_id or a sku, the cost, and optionally a handling cost, the day it applies from (YYYY-MM-DD) and a country or zone ("DE FR NL"). Up to 500 rows a call. Returns how many were saved and the rows that were refused. Audited. |
create_store | admin:write | Adds a WooCommerce store or another webshop (platform custom) to the workspace and returns its store key and install steps. For shopify it adds nothing and returns the Shopify App Store link: the install, theme app embed, ad platform logins and billing approval need the merchant's own clicks. Audited. |
set_own_site_store | admin:write | ROASaurus admins only: the store whose tracking script roasaurus.com and the dashboard load (own_store_key). store_id null switches it off. Audited. |
create_custom_cost | admin:write | Adds a custom cost to a store, like Profit › Costs › Add a cost: a fixed cost per period (rent, software, salaries), a cost per order, or a percent of revenue, profit, COGS, shipping or ad spend, from start_date until end_date. Returns the new id. Audited. |
update_custom_cost | admin:write | Changes a manual custom cost by id (from list_custom_costs). Leave out what should stay; end_date null makes it open-ended. Audited. |
delete_custom_cost | admin:write | Deletes a manual custom cost by id. Reports for every period recalculate without it. Audited. |
create_custom_metric | admin:write | Adds a workspace custom metric (Dashboards › Custom metrics) with a formula; it can be used in dashboards, evaluate_metric and other custom metrics. The key comes from `key` or the name. Returns the key. Audited. |
update_custom_metric | admin:write | Changes a custom metric by key: name, formula, description, format, higher_is_better. The key stays. Audited. |
delete_custom_metric | admin:write | Deletes a custom metric by key. Refused while another custom metric uses it; dashboard widgets that use it show an error until edited (the result counts them). Audited. |
Setup per AI app: MCP server and the help article Connect Claude or ChatGPT.