Creatives, email and AI

Shopify MCP: ask your store data in Claude and other AI apps

A Shopify MCP server lets Claude and other AI apps query your store data. See how the ROASaurus read-only tools work and how to connect them.

·Updated ·9 min read·By the ROASaurus team

Key takeaways
  • MCP (Model Context Protocol) is an open standard that lets AI apps call tools on other services, so an assistant can answer from your real store data.
  • ROASaurus Ask AI and the ROASaurus MCP server share 24 read-only tools, from profit, attribution and customer value to costs, leads, subscriptions, the marketing mix model and anomalies.
  • An AI app connects by signing in to ROASaurus with OAuth, or with an API key in an Authorization header.
  • A named key with only the mcp scope can only read; the Orders API key can also send orders, so keep any key secret and revoke it if it leaks.
  • Periods are fixed (today, yesterday, or the last 7, 14, 30 or 90 days), and Ask AI allows 40 questions per user per day by default.

A Shopify MCP server connects your store data to an AI assistant through the Model Context Protocol (MCP). You ask a question in plain language, such as "Which campaign made the most profit last month?", and the assistant answers from your store's real numbers instead of from memory. ROASaurus runs an MCP server with 24 read-only analytics tools, and the same tools power Ask AI inside the dashboard.

This guide explains what MCP is, why it helps to ask analytics questions this way, how Ask AI and the MCP server work, how to connect a client, which questions work well, and the privacy, security and limits you should know about.

What is MCP?

MCP is an open-source standard for connecting AI applications to external systems. An AI app such as Claude is the client. A service that offers data or actions is the server. The server describes its tools: each tool has a name, a description and a schema for its inputs.

When you ask a question, the client asks the server which tools exist (tools/list). The model picks the tool that fits and the client calls it (tools/call). The result goes back to the model, which writes the answer. You do not have to know the tool names. You only ask the question.

Shopify also runs MCP servers. They focus on shopping agents and developers: product search, carts, checkout, customer accounts and developer documentation. An analytics MCP server answers a different kind of question: profit after ads, attribution and customer value, calculated from your orders, your costs and the spend in your ad accounts.

Why ask your store data in an AI assistant?

Most store questions need numbers from several reports. "Did Meta make money last month?" needs revenue, product costs, shipping, fees and ad spend in one place. In a dashboard you open the right report, set the dates and do the arithmetic. In an AI assistant connected to your data, you ask the question and get the answer with the numbers behind it.

  • Plain language. No filters, report builders or spreadsheet formulas.
  • Follow-up questions. Ask "and for TikTok?" or "which campaign caused that?" without starting again.
  • Several reports in one answer. Profit, attribution and customer value can be combined in one reply.
  • Your own language. Ask AI answers in the language you write in.
  • Next to your other work. Through MCP, store numbers are available in the AI app where you already write updates or plans.

The answer is only as complete as the data behind it. Connect server-side tracking, your ad accounts and your product costs first, so the tools have orders, spend and margins to work with.

How do Ask AI and the ROASaurus MCP server work?

Ask AI is a chat page in the ROASaurus dashboard. It runs on Claude, Anthropic's model. The MCP server offers the same 24 tools to an AI client you choose. In both cases the tools read your ROASaurus reports and return the numbers as JSON. The model writes the answer from those results.

You ask a questionIn Ask AI or in your own MCP client
The model picks a toolFor example campaign_profit for the last 30 days
ROASaurus runs the toolRead-only, on one store's data
The model writes the answerFrom the returned numbers only
The model never reads your database directly. It only sees what a tool returns.

Every analytics tool only reads. No tool can change your store, your campaigns, your costs or your settings. The MCP server marks each of them as read-only, and it tells the client to answer from tool results only. A key with the actions:write scope also gets propose_action, which adds a proposed ad change to the Actions inbox; nothing changes until an owner or admin approves it. Ask AI in the dashboard has it too.

In Ask AI, one question can use up to 8 rounds of tool calls. If a question needs more, the assistant asks you to be more specific. Ask AI keeps your conversation per user and store, and uses the last 12 messages as context for a follow-up. You can clear the conversation at any time.

24read-only tools, the same in Ask AI and MCP
6fixed periods: today, yesterday, 7, 14, 30 and 90 days
40Ask AI questions per user per day, by default
1store per API key and per connection

Which questions can you ask?

Good questions name a metric and one of the supported periods. The table shows example questions, the tool that answers each one, and what the answer is based on.

QuestionToolWhat the answer shows
How did the last 7 days compare with the 7 days before?profit_summaryRevenue, orders, ad spend, MER, POAS and profit, against the previous period of equal length
Which campaign had the best POAS in the last 30 days?campaign_profitPer campaign: credited revenue, gross profit, ad spend, profit after ads, ROAS, POAS and CAC
Which ads have a high CPM and few purchases?ads_tableSpend, impressions, clicks, CTR and CPM next to tracked purchases, ROAS and CPA
How many months does a cohort take to pay back its CAC?ltv_insightsMonthly cohorts, CAC payback month and predicted LTV
Which products bring back the most repeat customers?productsTop products and the share of first-time buyers who ordered again
Are we on track for this month's revenue goal?goals_forecastGoals, actuals so far and the end-of-month forecast
What should I reorder this week?inventoryStock on hand, sales velocity, days of stock left and reorder status
The model picks the tool. You only need to ask the question.

Here is a worked example. You ask: "Did Meta make money in the last 30 days?" The model calls campaign_profit with the period set to 30 days and the default last-click model. For an example store, the Meta row of the result looks like this:

LineMeta, last 30 daysHow it is calculated
Credited revenue$24,000Revenue of the orders credited to Meta clicks
Gross profit (contribution in the result)$13,440Revenue minus product cost, shipping, payment fees and handling (56%)
Ad spend$8,000Synced from the Meta ad account
Profit after ads$5,440$13,440 − $8,000
ROAS3.00$24,000 ÷ $8,000
POAS1.68$13,440 ÷ $8,000
Example store. A POAS above 1.0 means the ads earned back more gross profit than they cost.

In Ask AI, the answer leads with "Yes", then gives the profit after ads and the POAS, and suggests at most three next steps. If you want another view, ask a follow-up such as "and with the Total Impact model?". Our guides to POAS and attribution models explain these numbers in more depth.

How do you connect the ROASaurus MCP server?

The server uses MCP's Streamable HTTP transport and returns JSON responses, without server-sent events. AI apps such as Claude and ChatGPT sign in with OAuth: you log in to ROASaurus, pick a store and allow the connection. Clients that let you set a request header, such as Claude Code, can use an API key instead, as in the steps below.

  1. Create an API key

    Open Store settings › API & data in ROASaurus and create a named key with the mcp scope. Copy it: it is shown only once. Only owners and admins can create keys.

  2. Or reuse the Orders API key

    You can also use the key on the Orders API card, for example the one the WooCommerce plugin uses. That key can also send orders. Regenerate API key replaces it and disconnects everything that uses the old one.

  3. Note the store key

    A named key goes in the header on its own. With the Orders API key, add the store key: the X-Roasaurus-Key value on the same card, whose MCP section shows the full header.

  4. Add the server to your MCP client

    Enter the endpoint and the Authorization header shown below. The client must support Streamable HTTP and custom request headers.

  5. Ask a test question

    Ask "What was my revenue yesterday?" and check the number against your dashboard.

Endpoint and an example for Claude Code
# Endpoint
POST https://app.roasaurus.com/mcp
Authorization: Bearer <named key with the mcp scope>
# or, with the Orders API key
Authorization: Bearer <store key>:<API key>

# Claude Code
claude mcp add --transport http roasaurus https://app.roasaurus.com/mcp \
  --header "Authorization: Bearer <named key with the mcp scope>"

You can also send the store key in an X-Roasaurus-Key header and only the API key as the bearer token. In Claude Code, keep the default local scope. A project-scoped server is saved in a .mcp.json file that is shared through version control, and that would share your key.

To sign in instead, add https://app.roasaurus.com/mcp as a custom connector in Claude or ChatGPT and log in when the app asks. Only owners and admins can allow a connection. Store settings › API & data lists every connected app, where you can disconnect it, and a connection also stops when that person leaves the workspace.

initialize · 2025-06-18Client and server agree on the protocol version
tools/list · 24 tools · readOnlyHint: trueThe client learns which tools exist
tools/call · campaign_profit · period 30The model asks for 30 days of campaign profit
result · isError: falseJSON with one row per channel and campaign
401 · Invalid store key or API key.What a wrong or regenerated key returns
What one question looks like between the client and the ROASaurus MCP server.

Is it safe? Privacy and security

Because the analytics tools only read, an AI app cannot pause a campaign, edit a cost or change a setting through ROASaurus; with actions:write it can only propose an ad change for an owner or admin to approve. The tools also accept only fixed inputs, such as a period or an attribution model from a list. Still, a few points need care.

  • Where the data goes. Ask AI sends your question and aggregated store metrics to Anthropic, which runs Claude. It sends no contact details of your customers. Through MCP, tool results go to the AI client you connect, under that client's terms. Check its data retention and training settings.
  • What the tools return. Totals per period, channel, campaign, ad, product, cohort and segment. They return no customer names, email addresses or phone numbers.
  • Who can ask. Anyone with access to the AI app where you add the connection can query the store. Add it to your own account, not to a shared one.
  • Other connectors. The MCP specification says there should always be a human in the loop who can deny tool calls, and that clients must treat tool annotations as untrusted unless the server is trusted. If your AI app also has tools that send email or post messages, keep confirmation prompts on for those tools.

What are the limits?

  • Fixed periods. Today, yesterday, or the last 7, 14, 30 or 90 days, in the store's time zone. A custom range, such as one week in March, is not supported. The customer value and cohort tools take no period: they work from your order history, with up to 12 monthly cohorts.
  • A 7-day window for the ads table. The ads tool uses a 7-day lookback window, whatever window you set in Store settings. The attribution and campaign profit tools, like the attribution reports in the dashboard, use your own setting or a lookback you ask for.
  • Shortened lists. Campaign lists return at most 25 campaigns, the ads table the 30 rows with the most spend, and the product list the top 25 products.
  • One store per connection. For several stores, create a key and a connection for each.
  • The Ask AI question limit. Each user can ask 40 questions per day by default, counted over the last 24 hours. Through MCP, your AI client's own usage limits apply instead.
  • Answers can be wrong. The model can misread a result. Check important numbers in the reports before you act on them, for example in profit analytics.

Sources

  1. Model Context Protocol: What is the Model Context Protocol (MCP)?
  2. Model Context Protocol specification (2025-06-18): Tools
  3. Claude Code Docs: Connect Claude Code to tools via MCP
  4. Claude Docs: Authentication for connectors
  5. OpenAI: Building MCP servers for plugins and API integrations

In ROASaurus

Keep reading

Creatives, email and AICreative fatigue in Facebook ads: when to replace an adCreative fatigue in Facebook ads shows as rising frequency and falling CTR. Learn to measure it per ad, read hook and hold rate and plan a refresh routine.Creatives, email and AIKlaviyo abandoned cart flows: recognize more shoppersKlaviyo abandoned cart and browse flows only reach shoppers Klaviyo can identify. Learn how it identifies them and how to recognize more at checkout.TrackingAd blockers and tracking: what your store losesAd blockers stop tracking pixels, so ad platforms miss purchases. See which events are lost, why server-side events are not, and how to measure your gap.
FAQ

Questions, answered

What is a Shopify MCP server?

It is a server that uses the Model Context Protocol to give AI apps tools for a Shopify store. The ROASaurus MCP server gives an AI client read-only tools for one store's profit, attribution, ads, customer value, inventory, goals, benchmarks and alerts.

Can the AI change my campaigns or my store?

Not by itself. The analytics tools in Ask AI and the MCP server only read. Ask AI, and an MCP client whose key has the actions:write scope, can propose a change to a campaign in the Actions inbox, and nothing changes until an owner or admin approves it. Neither can edit your store, your costs or your settings.

Which AI apps can connect to the ROASaurus MCP server?

Claude, ChatGPT and other MCP clients that support OAuth sign in with your ROASaurus login. Clients that let you set an Authorization header, such as Claude Code, can use an API key instead.

Is customer data sent to the AI?

The tools return aggregated metrics, not customer contact details. Ask AI sends your question and these metrics to Anthropic; through MCP, the results go to the AI client you connect.

Why can I not ask about a custom date range?

The tools accept fixed periods only: today, yesterday, or the last 7, 14, 30 or 90 days in the store's time zone. Customer value and cohort questions take no period and use your order history instead.

Do MCP questions count toward the 40-question limit?

No. The daily limit applies to Ask AI in the dashboard. Through MCP, the usage limits of your own AI client apply.

Every sale, traced to the ad that earned it

Server-side tracking, profit and lifetime value in one app. 14-day free trial, no credit card.

Start your free trial →