Sign InSign Up
Install on Shopify
Aimerce Blogs
How to Use the Aimerce Data API & MCP: Complete Guide
2 December 2026
How to Use the Aimerce Data API & MCP: Complete Guide
First-Party Data 101Shopify
Aimerce blog thumbnail: How to Use the Aimerce Data API & MCP: Complete Guide

Quick Answer: The Aimerce Data API & MCP lets you ask your AI tool about your store's attribution, ad spend, ROAS, orders, products, profit, and Klaviyo data in plain language. Claude, Claude Code, ChatGPT, and Codex connect by signing in to Aimerce and clicking Allow, with no API key. In Claude, Aimerce is listed in the connector directory. Meta Muse uses a key you generate on the page, and tools that can't sign in, like Cursor or your own app, use a read-only API key. Every connection is read-only. Run several stores? Link them, and one connection reads all of them. Open it in the Aimerce dashboard under AI Assistants, then Data API & MCP. It's turned on per store.

Key Takeaways

  • Claude, Claude Code, ChatGPT, and Codex connect by signing in and clicking Allow. Meta Muse uses a key.
  • In Claude, search for Aimerce in the connector directory. Adding a custom connector is the fallback.
  • Every connection is read-only and can't change anything in your store, ad accounts, or Aimerce.
  • Link up to 20 stores so one AI connection reads all of them, without reconnecting.
  • The optional Aimerce agent plugin adds three skills that help your AI tool read marketing data correctly.

This guide shows you how to connect Claude (web, desktop, mobile, and Claude Code), ChatGPT, Codex, or Meta Muse to your store's data, so you can ask about attribution, ad spend, ROAS, orders, products, profit, and Klaviyo in plain language. No coding needed: most tools connect by signing in, with no API key.

Just want dashboards inside Aimerce? See "How to Build Your Own Triple Whale Using Aimerce AI Apps" instead.

What is the Aimerce Data API & MCP?

  • Who it's for: owners and marketers of ecommerce stores, on Shopify and other websites, who use Aimerce.
  • What it does: answers questions about attributed revenue and orders by channel and campaign, Meta and Google ad performance, store orders, products, profit, customer cohorts, website traffic, the conversion funnel, Klaviyo email, and your saved Aimerce dashboards.
  • Read-only: your AI tool can read your store's data, but can't change anything in your store, ad accounts, or Aimerce. Every tool is annotated readOnlyHint: true, destructiveHint: false, and openWorldHint: false.
  • Your store, plus any stores you link: each connection reads the store you were signed in to when you approved it, and any stores linked to it.
  • Server: https://aglb.aimerce.ai/data/mcp (Streamable HTTP). Sign in with OAuth 2.0 (authorization code with PKCE and dynamic client registration), or use an API key sent as Authorization: Bearer <key>.

What do you need before you start?

  • Access for your store. Data API & MCP is turned on per store. If you can't open the page, contact Aimerce support and ask us to enable Data API & MCP for your store.
  • The right store. Sign in to the Aimerce dashboard with the store you want to connect. The connection reads that store, plus any stores you link to it later.
  • The page. In the left sidebar, click AI Assistants, then Data API & MCP, or go to aimerce.ai/dashboard/integrations.

How do you connect your AI tool?

Pick your tool's tab on the page. Claude, ChatGPT, and Codex connect by signing in to Aimerce and clicking Allow. Meta Muse uses a key you generate on the page. Always copy the name and URL from the page with the Copy buttons.

ToolHow it connectsAPI key needed?
Claude (web, desktop, mobile)Find Aimerce in the connector directory, then sign in and AllowNo
Claude CodeSign in with the same Claude account as your connectorNo
ChatGPTCustom MCP server in developer mode, then sign in and AllowNo
CodexAdd an MCP server, Authenticate, then AllowNo
Meta MuseA key you generate on the Meta Muse tabYes
Cursor, Windsurf, scripts, your own appRemote MCP server or REST API with a headerYes

Claude and Claude Code

Aimerce is listed in Claude's connector directory, so there's nothing to type in.

  1. In Claude (web, desktop, or mobile app), open Customize, then Connectors, choose Discover, and search for Aimerce.

Searching for Aimerce on the Discover tab of Claude's connector directory.

2.Open Aimerce and click Connect. On a Team or Enterprise plan, click Connect for your team.

The Aimerce listing in Claude's connector directory, with the Connect button.

3.Claude opens an Aimerce page. Check the store name, then click Allow.

The Aimerce sign-in page showing the store name and an Allow button.

4.Start a new chat in Claude and ask a question.

Using Claude Code? Sign in to Claude Code with the same Claude account and Aimerce is there too. Type /mcp to see it. On a Team or Enterprise plan, an owner may need to allow the Aimerce connector first.

Aimerce not in the list? Add it as a custom connector.

  1. In Customize, then Connectors, click + Add, then Add custom connector.
  2. Enter the name Aimerce and the URL https://aglb.aimerce.ai/data/mcp, then click Continue.

Adding a custom connector in Claude with the name Aimerce and the Aimerce MCP URL.

3.Leave Sign in now and Register automatically selected (Claude detects both), then click Add. Claude's custom connector settings with Sign in now and Register automatically selected.

4.On the Aimerce connector, click Connect, then Allow on the Aimerce page.

The Aimerce custom connector in Claude's Connectors list, with the Connect button.

On a Team or Enterprise plan, only an owner can add custom connectors.

ChatGPT

  1. In ChatGPT on the web, open Settings, then Apps, then Advanced settings, and turn on Developer mode.
  2. Open Plugins, click Add, and choose custom MCP server. Enter the name Aimerce and the server URL https://aglb.aimerce.ai/data/mcp, keep Authentication on OAuth, tick I understand and want to continue, then click Create as a plugin.

Adding a custom MCP server in ChatGPT with the name Aimerce, the Aimerce MCP URL, and Authentication set to OAuth.

3.Click Continue to Aimerce.

ChatGPT prompting the user to continue to Aimerce to sign in.

4.An Aimerce page opens. Check the store name, then click Allow.

The Aimerce sign-in page showing the store name and an Allow button to connect ChatGPT.

5.Start a new chat, turn on Aimerce for it, and ask a question.

ChatGPT custom MCP servers need a Business, Enterprise, or Edu workspace, where an admin may need to allow developer mode first.

Codex

  1. In the Codex app, open Settings, then Plugins, click Add, and choose Add MCP server.

The Codex app's Plugins settings, with the Add menu open and Add MCP server highlighted.

2.Enter the name Aimerce, choose Streamable HTTP, and paste the URL https://aglb.aimerce.ai/data/mcp. Leave the token and header fields empty, then click Save.

The Codex Add MCP server form with the name Aimerce, Streamable HTTP selected, the Aimerce MCP URL, and empty token and header fields.

3.On the MCPs tab, click Authenticate next to aimerce.

The MCPs tab in Codex, with the Authenticate button next to the aimerce server.

4.Your browser opens an Aimerce page. Check the store name, then click Allow.

The Aimerce sign-in page showing the store name and an Allow button to connect Codex.

5.Start a new Codex chat and ask a question.

Using the Codex CLI instead? Run this in your terminal. Your browser opens the same Aimerce page, where you click Allow.

codex mcp add aimerce --url https://aglb.aimerce.ai/data/mcp && codex mcp login aimerce

Meta Muse

Muse builds a custom connector from a chat message and asks for a key in its own secure prompt.

  1. On the Meta Muse tab, click Generate key and copy it. It's read-only, covers all of your store's data, and doesn't expire. It's shown only once.
  2. Open Muse (the app or muse.ai), start a new chat, and send the message shown on the page. Use its Copy button.
  3. Muse replies with an Aimerce connector. Click Connect, then Continue.

Meta Muse replying with an Aimerce connector and a Connect button. Meta Muse asking to continue setting up the Aimerce connector.

4.Paste the key into API key (the key only, without "Bearer"), then click Add.

Meta Muse's secure API key prompt for the Aimerce connector, with an Add button.

5.When Muse asks to share information with aimerce.ai, click Always allow this site.

Meta Muse asking permission to share information with aimerce.ai, with the Always allow this site option.

6.Ask a question, starting with "Use the Aimerce connector to…".

Muse is available in the US. Never paste the key into the Muse chat, because it would stay in your chat history.

Check the connection

After you ask your first question, click Check connection under the steps. It checks the tool on the tab you have open and shows Connected with the time of its last request, or tells you no request has arrived yet.

What should you ask first?

Click Copy next to a question on the page and paste it into your AI tool. Start with the first one, because it checks the connection:

Use Aimerce MCP to confirm my connected store, timezone, permissions and the date attribution data starts.

Show revenue and orders by channel for the last 7 complete days, with a daily trend. Include ad spend and ROAS if available.

Which channel brought the most new-customer revenue last week?

For more ideas, see the use cases below, or click Use cases at the top right of the page and pick a topic such as Attribution, Ad Performance, Products, Klaviyo, Customers, Traffic & Funnel, or Reports.

Just upgraded? Attribution data starts on the day tracking began on your plan, so questions about earlier dates come back empty. For your first 30 days, the page shows that date, and the example questions ask about the days since then.

What are the Aimerce skills? (optional)

The Aimerce agent plugin adds three skills to your AI tool: short written rules that help it read marketing data correctly, for example never averaging ROAS and not treating missing data as zero. They don't run code and don't change what data the tool can read. The plugin also adds the Aimerce connection, so you can install it instead of connecting your tool separately.

The source and full instructions are at github.com/aimerce/aimerce-agent-plugin (MIT licence).

SkillWhat it helps with
attribution-data-queryGetting the numbers right: the right tool for each question, your store's timezone, blank is not zero, currencies kept apart, ROAS summed before dividing
attribution-model-comparisonWhy channels look different under each attribution model, and why Aimerce differs from Meta, Google, or Shopify
attribution-drop-diagnosisWhy revenue, orders, or ROAS dropped: checks spend, then traffic and funnel, store orders, campaigns and ads, and data warnings, in that order

Claude Code:

  1. In Claude Code, run:
/plugin marketplace add aimerce/aimerce-agent-plugin
/plugin install aimerce@aimerce-plugins

2.Type /mcp, pick aimerce, and choose Authenticate. Your browser opens the Aimerce page. Check the store name and click Allow. 3. Start a new session so the skills load, then ask a question.

Already connected Aimerce in Claude with the same account? The connection is there already, and you only need the plugin for the skills.

Gemini CLI:

gemini extensions install https://github.com/aimerce/aimerce-agent-plugin

You need a store on a plan that includes Data API & MCP. Without it, the skills install, but your AI tool can't read any data.

How do you use several stores?

Run more than one store? Link them, and one AI connection reads all of them. You don't need to reconnect your AI tool: once a store is linked, your existing connection can read it straight away. Each store keeps its own plan, data, settings, and billing.

  1. Signed in to your first store, open Data API & MCP and scroll to Linked stores. Click Link another store. Aimerce shows a one-time code, such as ABCD-EFGH. It's valid for 10 minutes and works once.

The Linked stores section in Aimerce, showing a one-time code for linking another store.

2.Sign in to your other store (through Shopify, or with that store's email and password), open Data API & MCP, then Linked stores, choose Join a linked store group, and enter the code.

Joining a linked store group in Aimerce by entering the one-time code.

3.Read the notice and click Join group. Both stores now appear under Linked stores. Repeat from step 1 for each extra store, up to 20.

Signing in to both stores is how Aimerce knows you run them, so you can only link a store you can sign in to.

Who can read a linked store?

Every AI connection and API key of every store in the group can read every store in it, including connections made later. Each store needs Data API & MCP on its own plan. A store without it is listed as Not available for AI tools until it has it.

How do you ask about a specific store?

Name the store in your question, for example:

List my Aimerce stores.

Show last week's revenue by channel for mystore-eu.myshopify.com.

If you don't name a store, your AI tool reads the store you connected with. Each answer covers one store, so to compare stores, ask about each one.

How do you remove a store?

Under Linked stores, click Remove next to the store. Any store in the group can remove any store, including itself. The other stores' connections stop reading it on their next request, and its own connections stop reading the others. If you remove the main store, the store linked longest takes over.

What can you do with it? Use cases

Each example lists a prompt to paste into your AI tool, the tools it typically calls, and what the answer contains.

Use casePromptToolsAnswer
Check the connection"Use Aimerce to confirm my connected store, timezone, permissions and the date attribution data starts."get_connection_infoThe store domain, timezone, data permissions, and the first date with attribution data
Channel performance"Show revenue and orders by channel for the last 7 complete days, with a daily trend."get_attribution_summary, get_attribution_timeseriesChannels like Facebook, Instagram, Google, Klaviyo, AI assistants, and Direct, with attributed revenue and orders, plus the daily trend
Campaign and ad performance"Which Meta campaigns and ads drove the most attributed revenue last week? Include spend and ROAS where available."get_attribution_entities, get_ad_entity_spendCampaigns and ads ranked by attributed revenue, and with an ad account connected, spend, impressions, clicks, and ROAS per ad
New vs. returning customers"Which channel brought the most new-customer revenue in the last 30 days, and how many new users did each channel bring?"get_attribution_summary, get_attribution_usersNew and returning revenue and orders per channel, and new vs. returned users per channel
Funnel drop-off"Where do visitors drop off between product view and purchase over the last 14 days? Did any step change recently?"get_funnel_timeseries, get_funnel_changeStep-to-step conversion rates by day, and the step that changed with the day it changed
One order's customer journey"What marketing touchpoints led to order 1234 before it was placed?"get_order_touchpointsThe visits before the order, in order, with the channel and campaign of each
Email performance"How did my Klaviyo flows perform last week? Which flow drove the most orders?"get_email_performance_timeseriesPerformance and placed orders per flow. Needs a connected Klaviyo account
Saved dashboards"List my Aimerce dashboards and run the first one for the last 30 days compared with the previous period."list_dashboards, run_dashboardThe dashboard's cards and charts with values, the change against the previous period, and any widget that's unavailable

Which tools does the Aimerce MCP include?

Which tools a connection sees depends on the data permissions you approved: attribution, order touchpoints, ad spend, events, commerce, and email. Dates are in your store's timezone: startDate is inclusive and endDateExclusive is exclusive (YYYY-MM-DD).

ToolWhat it readsMain inputs
list_storesThe stores this connection can read: the connected store and any linked stores, and whether each one can be readNone
get_connection_infoThe connected store, its timezone, granted permissions, and the date attribution data startsOptional store
get_data_catalogAvailable datasets, metrics, definitions, and limitsNone
get_attribution_summaryAttributed revenue and orders by channel for a date rangestartDate, endDateExclusive, model (first click, last non-direct click, linear, time decay), lookbackDays (1-30), includeAdSpend, level
get_attribution_timeseriesThe same, per daySame as above
get_attribution_entitiesAttributed revenue and orders per Meta or Google campaign, ad set, or adDates, level (campaign, adset, ad), breakdown (total or daily), model, lookbackDays
get_attribution_usersNew and returning users per channel or campaignDates, level, breakdown, returnedAfterDays
get_order_touchpointsThe marketing touchpoints observed before one orderorderId, optional lookbackDays and dates
get_ad_spend_summaryMeta and Google ad spend for a date rangeDates, sources (meta, google)
get_ad_spend_timeseriesThe same, per daySame as above
get_ad_entity_spendSpend, impressions, and clicks per campaign, ad set, or adDates, level, optional breakdown (device)
get_orders_timeseriesStore orders, order total, and average order value per dayDates
get_channel_orders_timeseriesStore orders by the store's own last-visit channelDates
get_ai_orders_timeseriesOrders that came from AI assistants such as ChatGPTDates
get_products_timeseriesProduct sales and unitsDates, optional limit
get_profit_timeseriesProfit after product costsDates
get_customer_cohortsCustomer retention and lifetime value by first-order monthFirst day of a month for each date, 1-13 months
get_traffic_timeseriesWebsite page views and visitors per dayDates
get_funnel_timeseriesPage view, product view, add to cart, checkout, and purchase per dayDates
get_funnel_changeWhich funnel step changed, from which day, comparing the periods before and afterDates, optional splitDate
get_email_performance_timeseriesKlaviyo flow and campaign performanceDates, optional kind (flow or campaign)
list_dashboardsYour saved Aimerce dashboardsNone
run_dashboardA saved dashboard (or an inline one) computed for a date rangedashboardId or spec, optional range and compare
query_dataAny dataset above in one generic calldataset, metricVersion, input
get_api_usageRecent calls made with this connectionA UTC time range

Every tool except list_stores and get_data_catalog also takes an optional store: the domain of a linked store from list_stores. Without it, the tool reads the connected store. Over the REST API, add ?store= to the URL, and GET /v1/stores lists the stores.

Every result says whether it's complete (available) or partial, and lists warnings as plain codes, for example a disconnected ad account. When a connection can read more than one store, every result also names the store it covers in store.

Products, profit, customer cohorts, and channel orders come from synced Shopify orders, so they're available for Shopify stores. For other websites, get_orders_timeseries counts the purchases Aimerce tracked and says so in a warning.

How do you connect with an API key instead?

API keys are for tools that can't sign in, such as Cursor, Windsurf, your own agent, scripts, or your own app. At the bottom of the page, click Use an API key.

  1. Create an API key. It takes one click: the key is read-only, covers all of your store's data, and doesn't expire. It's filled into the setup below and shown only on this page, so finish the setup before you leave.
  2. Connect. Choose a tab:
    • MCP client: add Aimerce as a remote MCP server over HTTP with the URL https://aglb.aimerce.ai/data/mcp and the header Authorization: Bearer YOUR_API_KEY. If your tool reads an mcpServers config file, paste the JSON shown on the page.
    • REST API: call https://aglb.aimerce.ai/data/v1 from your server with the same header. Never call it from browser code.
  3. Ask about your data (MCP client only).

Claude Code or Codex on a server without a browser, for example a remote server or CI: signing in needs a browser on the same machine, so use a key instead. The page shows a ready-to-run command for each tool under the MCP client tab.

For all REST endpoints and parameters, see the Quick Start section in "Aimerce Apps and Data API & MCP: Attribution Without CSVs."

How do you manage your keys?

Click Manage keys at the top right of the page. It appears once your store has a key. Every key is listed with its platform (Claude, Claude Code, ChatGPT, Codex, Muse, or API key), its status, when it expires, and when it was last used. Keys made when an AI tool signs in are listed here too.

  • Rotate replaces a key and stops the old one immediately. The new key is filled into the API key setup.
  • Revoke stops a key for good, which disconnects the tool using it. This can't be undone.

Creating, rotating, or revoking a key never affects your Apps dashboards.

How does Aimerce handle your data and privacy?

  • What's returned: aggregated store analytics: revenue, orders, spend, traffic, and funnel counts, by channel, campaign, product, or day.
  • What's never returned: customer contact details (names, email addresses, phone numbers, postal addresses) and raw tracking events.
  • Who can see it: only the AI session that asked. Aimerce doesn't sell the data or share it with third parties.
  • Security: HTTPS only. Each OAuth token or API key is read-only and belongs to one store. It can also read the stores linked to that store, and nothing else.
  • Linked stores: linking requires you to be signed in to both stores. Removing a store from the group stops every other store's connections from reading it on their next request.
  • Revoking access: open Manage keys on the Data API & MCP page and click Revoke. Access stops immediately.
  • Policies: Privacy policy and Terms of service.

What are the limits?

  • Dates use your store's timezone. "Last 7 days" means the last 7 full days in your store's local time.
  • One query covers up to 31 days. Saved dashboards cover up to 90 days.
  • Rate limit: 30 requests per minute per store and per key, and one query at a time per store. Over the limit, tools return rate_limited or query_busy. Wait a moment and retry.
  • Timeouts: 25 seconds per call, or 60 seconds for attribution. On a timeout, retry with a shorter date range.
  • Blank is not zero. If ad spend or ROAS is empty, the data isn't available, for example because no ad account is connected. It doesn't mean you spent nothing.
  • Ad spend and ROAS come from Meta and Google. Other channels, such as TikTok or Pinterest, show attributed revenue and orders.
  • Currencies are kept separate. Nothing is converted automatically.
  • Order counts can be fractional with the Linear or Time Decay attribution models, because one order's credit is split across channels.
  • Numbers may differ from Shopify or other tools. Aimerce shows attributed revenue, which credits orders to channels. It's not the same as net sales after refunds, tax, and shipping.
  • Several stores: each answer covers one store. Numbers from different stores aren't added together automatically, because currencies and attribution start dates can differ.
  • Errors come back as a code with a message and a request ID, for example insufficient_scope, feature_access_denied, invalid_parameters, or rate_limited.

Troubleshooting

What you seeWhat to do
"This store is not enrolled in the Data API preview"Contact Aimerce support to enable it for your store.
The Aimerce page shows the wrong storeClick Cancel, switch to the right store in the Aimerce dashboard, then start again from your AI tool. Or link your stores, so one connection reads all of them.
Check connection says no request yetFinish the steps on the tab you have open, ask one question in that tool, then check again.
Your AI tool says it isn't authorizedThe connection was revoked. Remove Aimerce from the tool and connect again.
You can't find Aimerce in Claude's directorySearch on the Discover tab under Customize, then Connectors. On a Team or Enterprise plan, ask an owner to allow it, or add it as a custom connector.
Claude says "Couldn't connect to the server" (custom connector)Check the URL is exactly https://aglb.aimerce.ai/data/mcp and that Authentication is set to Sign in now.
Muse doesn't accept the keyPaste the key only, without "Bearer", or generate a new key on the Meta Muse tab.
Ad spend or ROAS is emptyMake sure your Meta or Google ad account is connected in Aimerce.
"This code is wrong or has expired" when joiningCodes last 10 minutes and work once. Create a new code in the other store. If you already clicked Join once, check Linked stores first, because the store may already be linked.
"This store is already in a linked store group"Remove the store from its current group under Linked stores, then join the new one.
A linked store shows "Not available for AI tools"That store's plan doesn't include Data API & MCP, or Aimerce isn't installed on it. Your AI tool can't read it until that changes, but it stays linked.
Your AI tool says the store isn't linked (store_not_linked)Ask it to list your stores first, then use the exact store domain.
"Too many requests" or a timeoutWait a minute, then try again with a shorter date range.

Still stuck? Contact Aimerce support at support@aimerce.ai. Tell us your store, what you tried, and the error message, including the request ID if there is one. Never send us your API key.

FAQ

What is the Aimerce Data API & MCP? A read-only way to ask your AI tool about your store's attribution, ad spend, ROAS, orders, products, profit, and Klaviyo data in plain language. It works with Claude, Claude Code, ChatGPT, Codex, Meta Muse, and tools that support remote MCP servers.

Do I need an API key to connect Aimerce to Claude or ChatGPT? No. Claude, Claude Code, ChatGPT, and Codex connect by signing in to Aimerce and clicking Allow. Meta Muse and tools that can't sign in, like Cursor or your own app, use an API key.

Can my AI tool change anything in my store? No. Every connection is read-only. It can read your store's data but can't change anything in your store, ad accounts, or Aimerce.

Can one connection read several stores? Yes. Link up to 20 stores under Linked stores on the Data API & MCP page, and one AI connection reads all of them without reconnecting. Each store needs Data API & MCP on its own plan.

Does the Aimerce MCP return customer names or emails? No. It returns aggregated store analytics only. Customer contact details and raw tracking events are never returned.

What are the Aimerce agent skills? Three optional skills from the Aimerce agent plugin that help your AI tool read marketing data correctly: attribution-data-query, attribution-model-comparison, and attribution-drop-diagnosis. They don't run code or change what data the tool can read.

What are the Aimerce MCP limits? One query covers up to 31 days, saved dashboards up to 90 days, and you can make 30 requests per minute per store and per key, with one query at a time per store. Calls time out after 25 seconds, or 60 seconds for attribution.

Sources

[1] Aimerce, "Data API & MCP,"

[2] GitHub, "aimerce/aimerce-agent-plugin,"

Try Aimerce Pixel Risk-Free
for 30 Days

Most teams see results within 2 weeks.

Money-back guarantee.
It pays for itself, or you don't pay anything.

Install On
Sign Up for a
30-Day Aimerce Pixel Free Trial
Sign Up Using Your Shopify Account Email
*Money back guaranteed.
Aimerce pays for itself or you don’t pay anything.