MCP server
Connect an AI app to ab.one over MCP. Server URL, OAuth, read and write access, and every tool the server offers.
ab.one runs an MCP server (Model Context Protocol). An AI app such as Claude, ChatGPT, Claude Code or Cursor connects to it and can then read the store's tests, product knowledge and theme templates, and set up draft tests. The AI changes the theme itself with its own Shopify tools; ab.one's tools handle the testing side.
For setup steps per AI app and example prompts, see Use ab.one with your AI. This page is the technical reference.
Server
| What | Value |
|---|---|
| URL | https://app.ab.one/api/v1/mcp |
| Transport | Streamable HTTP, stateless. Every request is answered with a single JSON response; there are no sessions and no server-sent event streams. |
| Authentication | OAuth 2.1 bearer token in the Authorization header |
The URL is also under Store settings → AI connections → MCP server URL. In Claude Code, for example:
claude mcp add --transport http abone https://app.ab.one/api/v1/mcp
Connecting
Most AI apps handle the OAuth flow on their own: you add the server URL, a browser window opens on ab.one, you sign in if needed and confirm.
The consent screen
The page is titled "Connect … to ab.one" with the AI app's name, and shows where you'll be sent back to.
Choose the store
If your account has several stores, pick one under Store. A connection always belongs to exactly one store.
Check the access
The app can always read: "Your tests and their results", "Product knowledge (Cortex) and variant ideas", "Page texts and theme templates".
Decide on changes
With Allow changes on, the app may also "Create draft tests, audiences and text variants", "Launch, pause or end tests" and "Generate variant ideas". Switch it off for read-only access.
Confirm
Click Allow access, or Deny to cancel. You're sent back to the AI app.
Any team member of a store can connect an AI app to it. The app acts with that person's access: if they're removed from the store, the connection stops working at once.
Only allow apps you started connecting yourself.
Scopes
| Scope | Shown as | Allows |
|---|---|---|
mcp:read | Always included | The read tools below |
mcp:write | Allow changes | The write tools below |
A read-only connection doesn't see the write tools in its tool list. In the app, Connected apps shows each connection as Read only or Read & write.
OAuth details for client developers
ab.one follows the MCP authorization spec. If you're building your own MCP client:
| What | URL |
|---|---|
| Protected resource metadata | https://app.ab.one/.well-known/oauth-protected-resource/api/v1/mcp |
| Authorization server metadata | https://app.ab.one/.well-known/oauth-authorization-server |
| Issuer | https://app.ab.one |
| Authorization endpoint | https://app.ab.one/oauth/authorize |
| Token endpoint | https://app.ab.one/api/v1/oauth/token |
| Dynamic client registration | https://app.ab.one/api/v1/oauth/register |
| Revocation endpoint | https://app.ab.one/api/v1/oauth/revoke |
- A request without a valid token gets
401with aWWW-Authenticate: Bearer resource_metadata="…"header that points to the protected resource metadata. - Grant types:
authorization_codeandrefresh_token. Response typecodeonly. - PKCE with
S256is required. resource, if sent, must be the server URL. Tokens only work for this MCP server.scope:mcp:read,mcp:write, or both. Without a scope, both are offered and the user decides on the consent screen. The user can grant less than requested, never more.- Clients register themselves (RFC 7591) with 1 to 10 redirect URIs:
httpsURIs,httponly onlocalhost,127.0.0.1or[::1], or an app's own scheme such ascursor://. Public clients (token_endpoint_auth_method: none) andclient_secret_post/client_secret_basicare supported. - Registration is limited to 30 per hour per IP address, the token endpoint to 60 requests per minute.
Token lifetime
| Token | Valid for |
|---|---|
| Authorization code | 5 minutes, once |
| Access token | 1 hour |
| Refresh token | 30 days, replaced on every use |
Each refresh returns a new refresh token and ends the old one. If an old refresh token is used again, ab.one treats it as stolen and ends the whole connection. As long as the AI app is used at least once every 30 days, the connection stays.
Disconnecting
Go to Store settings → AI connections and click Disconnect next to the app under Connected apps. Access ends immediately, including tokens that haven't expired yet. The list also shows who connected each app and when it was last used.
An AI app can also end its own connection through the revocation endpoint.
Tools
Read tools work on every connection. Write tools need Allow changes.
Read
| Tool | What it does |
|---|---|
get_store | The store's name, domains and currency, how many tests are active and how many the plan allows, and whether ab.one tracking is live. |
list_tests | Up to 50 tests, newest first, with ID, name, status, type and creation date. Optional status filter: all, live, scheduled, ended, draft. |
get_test | One test (testId) with its settings and versions, plus live results per version: visitors, conversions, conversion rate, revenue, and the significance. |
get_page_opportunities | Per page: viewers, buyers and conversion rate over the last days (1 to 90, default 30), plus store totals. productOnly: true limits it to product pages. Finds pages with many views and few sales. |
list_audiences | The store's audiences with their conditions. |
get_product_profiles | The product profiles. Without productGid, a list; with a product GID (gid://shopify/Product/…), that product's full profile. |
get_variant_ideas | The variant ideas for one product (productGid), with status, hypothesis, planned changes, whether ab.one can build them, and the result of tests made from them. |
get_template_texts | Every editable text of a page's current template, by template (for example product.json) or productGid. |
list_templates | The templates of the live theme: filename, page type, how many pages use it, and a sample handle for previews. |
get_template | The full JSON of one template of the live theme (filename). |
Write
| Tool | What it does |
|---|---|
create_template_test | Creates a draft Template test between templates that already exist in the live theme: controlTemplate and 1 to 5 variantTemplates of the same page type. Optional: hypothesis, primaryMetric (cvr, atc, aov, rpv, ctr, default cvr), resourceIds to limit it to products or pages, trafficSplit (percent on the control), variantNames, sampleHandle. |
create_text_variant | Copies a page's current template, changes only the given texts (up to 40) and creates a draft test: the current template against the copy, named "New texts". Use the path and setting_id values from get_template_texts. |
set_test_status | Sets a test (testId) to live, paused or ended. |
create_audience | Creates an audience as a draft, with name, optional description and conditions. |
generate_variant_ideas | Asks Cortex for new variant ideas for a product with a built profile (productGid). Optional focus, count (1 to 6, default 4) and copyOnly. Runs in the background; the ideas appear on the product's Ideas & variants tab after about a minute. Counts as an idea run. |
The tools follow the same rules as the app:
- Creating a test or setting one live needs working tracking, and the plan's limit on active tests applies. See Plans.
create_audiencerespects the plan's audience limit.- Status changes follow the normal test statuses. An ended test can't be started again.
- Tests an AI app creates are drafts. You review them in ab.one and launch them yourself. On Home they show as "Draft from …" with the app's name.
When a tool fails for an expected reason (not found, limit reached, invalid input), the AI gets the reason as text and can try something else.
What counts toward the plan
The MCP server is free on every plan, and its tools don't count toward the plan's limits. Only generate_variant_ideas counts, as an idea run, the same as proposing ideas in the app: one AI action from the monthly allowance on paid plans, and once free per store. See AI in each plan. What the AI app itself costs is between you and its provider.
Rate limit
120 requests per minute per connection. Above that, the server answers 429 with a Retry-After: 60 header and the JSON-RPC error "Rate limit reached. Slow down and retry in a minute."