MCP

Shopify MCP server: store data and ad spend in one agent session

TL;DR

Shopify is unusual in this list: it ships official MCP servers, and they are good at what they do. The gap is not store data — it is that a store server cannot see what you paid to get the visitors, which is the number that decides whether a product is worth selling.

What already exists for this platform

Shopify ships official MCP servers, including a Storefront MCP for catalogue and cart interactions and a development-oriented one. They are genuinely useful and this integration uses the Storefront MCP directly.

  • Official servers exist and are maintained by Shopify.
  • Storefront MCP covers catalogue and cart operations — the customer-facing surface.
  • Admin access is a separate matter, with its own scopes and its own risk profile.
  • None of them see ad spend, because ad spend is not in Shopify.

What a full MCP server adds

Typical option todayAgent Planners MCP
Shopify toolsStorefront + dev, official10 reads, 4 writes
Admin reads (orders, products, inventory)Separate setupIncluded
Ad spend in the same sessionNoGoogle Ads, Meta, TikTok on the same key
Multiple storesOne connection eachAdded alongside, never replaced
Approval before a store writeYour own disciplineEvery write, with an audit row
Tool counts are derived from the live catalogue rather than typed by hand: this family exposes 10 reads and 4 writes of the 384 tools on the endpoint. A key only sees the writes if it carries `tools:write`.

How to configure it

  1. 1Create a key in API & MCP. `tools:read` for questions; add `tools:write` if the agent should be able to change things. Tools mode needs a paid plan and fails closed.
  2. 2Connect Shopify under Integrations — that OAuth step is why the MCP key never carries platform credentials.
  3. 3Add the server to Claude Code, Claude Desktop or Codex using the snippet below.
  4. 4Have the agent call `describe_permissions` first — it reports the key's mode, scopes, plan entitlement and connected accounts.
  5. 5Call `list_accounts` for the account ids, and scope each call with one. Resolution is exact or it refuses, naming the candidates.
bash
claude mcp add --transport http agentplanners https://www.agentplanners.com/api/mcp \
  --header "Authorization: Bearer ap_live_…"

Claude Desktop and Codex

Claude Desktop takes the same endpoint as JSON:

json
{
  "mcpServers": {
    "agentplanners": {
      "url": "https://www.agentplanners.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ap_live_…"
      }
    }
  }
}
Codex uses the same endpoint from `~/.codex/config.toml`, with the key in an environment variable rather than the file: `[mcp_servers.agentplanners]` / `url = "…/api/mcp"` / `bearer_token_env_var = "AGENTPLANNERS_API_KEY"`.

Connecting a second store used to delete the first

Worth writing down because it is a trap any commerce integration can fall into. Discovery-style OAuth connections — Google Ads, AdMob, Ad Manager — return the COMPLETE list of accounts you can see, so replacing every stored row with the payload is correct: a row that is missing really has gone.

A paste-a-token commerce connection carries exactly one store. Running the same replace-everything logic against it removes every other store silently. The fix is an additive upsert keyed on the store, and a write that refuses rather than guessing when two stores could match.

The refusal matters as much as the upsert: with two stores connected, a write that names no store used to fall back to whichever was first — a coin flip with real consequences.

Use cases

  • Product profitability after acquisition cost, joining orders to ad spend — the question Sidekick structurally cannot answer.
  • Reconciling platform-reported conversions against settled orders, including refunds and discounts.
  • Inventory-driven campaign decisions — pausing ads for products that went out of stock.
  • Multi-store reporting for merchants running several shops, with each store addressed explicitly.

Frequently asked questions

Does Shopify have an official MCP server?
Yes — Shopify ships official MCP servers, including a Storefront MCP for catalogue and cart operations. This integration uses the Storefront MCP directly alongside read-only admin access.
What can't a Shopify-only MCP server do?
See your ad spend. Google, Meta and TikTok spend is not in the Shopify admin, so questions about whether a product is profitable after acquisition cost need a server that reaches both.
Can I connect more than one Shopify store?
Yes. Each store is added alongside the others rather than replacing them, and a write that does not name a store is refused with both stores named rather than defaulting to one.
Put a human-approved agent on your ad ops

Start free — 2,500 credits a month, no credit card. Reads are free; every write waits for you.

Related reading