Shopify MCP server: store data and ad spend in one agent session
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 today | Agent Planners MCP | |
|---|---|---|
| Shopify tools | Storefront + dev, official | 10 reads, 4 writes |
| Admin reads (orders, products, inventory) | Separate setup | Included |
| Ad spend in the same session | No | Google Ads, Meta, TikTok on the same key |
| Multiple stores | One connection each | Added alongside, never replaced |
| Approval before a store write | Your own discipline | Every write, with an audit row |
How to configure it
- 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.
- 2Connect Shopify under Integrations — that OAuth step is why the MCP key never carries platform credentials.
- 3Add the server to Claude Code, Claude Desktop or Codex using the snippet below.
- 4Have the agent call `describe_permissions` first — it reports the key's mode, scopes, plan entitlement and connected accounts.
- 5Call `list_accounts` for the account ids, and scope each call with one. Resolution is exact or it refuses, naming the candidates.
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:
{
"mcpServers": {
"agentplanners": {
"url": "https://www.agentplanners.com/api/mcp",
"headers": {
"Authorization": "Bearer ap_live_…"
}
}
}
}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.
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.