Docs

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

WhatValue
URLhttps://app.ab.one/api/v1/mcp
TransportStreamable HTTP, stateless. Every request is answered with a single JSON response; there are no sessions and no server-sent event streams.
AuthenticationOAuth 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 page is titled "Connect … to ab.one" with the AI app's name, and shows where you'll be sent back to.

  1. Choose the store

    If your account has several stores, pick one under Store. A connection always belongs to exactly one store.

  2. Check the access

    The app can always read: "Your tests and their results", "Product knowledge (Cortex) and variant ideas", "Page texts and theme templates".

  3. 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.

  4. 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

ScopeShown asAllows
mcp:readAlways includedThe read tools below
mcp:writeAllow changesThe 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:

WhatURL
Protected resource metadatahttps://app.ab.one/.well-known/oauth-protected-resource/api/v1/mcp
Authorization server metadatahttps://app.ab.one/.well-known/oauth-authorization-server
Issuerhttps://app.ab.one
Authorization endpointhttps://app.ab.one/oauth/authorize
Token endpointhttps://app.ab.one/api/v1/oauth/token
Dynamic client registrationhttps://app.ab.one/api/v1/oauth/register
Revocation endpointhttps://app.ab.one/api/v1/oauth/revoke
  • A request without a valid token gets 401 with a WWW-Authenticate: Bearer resource_metadata="…" header that points to the protected resource metadata.
  • Grant types: authorization_code and refresh_token. Response type code only.
  • PKCE with S256 is 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: https URIs, http only on localhost, 127.0.0.1 or [::1], or an app's own scheme such as cursor://. Public clients (token_endpoint_auth_method: none) and client_secret_post / client_secret_basic are supported.
  • Registration is limited to 30 per hour per IP address, the token endpoint to 60 requests per minute.

Token lifetime

TokenValid for
Authorization code5 minutes, once
Access token1 hour
Refresh token30 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

ToolWhat it does
get_storeThe 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_testsUp to 50 tests, newest first, with ID, name, status, type and creation date. Optional status filter: all, live, scheduled, ended, draft.
get_testOne test (testId) with its settings and versions, plus live results per version: visitors, conversions, conversion rate, revenue, and the significance.
get_page_opportunitiesPer 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_audiencesThe store's audiences with their conditions.
get_product_profilesThe product profiles. Without productGid, a list; with a product GID (gid://shopify/Product/…), that product's full profile.
get_variant_ideasThe 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_textsEvery editable text of a page's current template, by template (for example product.json) or productGid.
list_templatesThe templates of the live theme: filename, page type, how many pages use it, and a sample handle for previews.
get_templateThe full JSON of one template of the live theme (filename).

Write

ToolWhat it does
create_template_testCreates 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_variantCopies 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_statusSets a test (testId) to live, paused or ended.
create_audienceCreates an audience as a draft, with name, optional description and conditions.
generate_variant_ideasAsks 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_audience respects 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."