AI agent
Connect your store to an AI agent

For developers

Developer APIs: a platform your code and your AI understand

Admin GraphQL, Storefront API, REST and webhooks. A CLI with JSON output for every command. Dev MCP lets your AI agent read the schema and validate a query before running it. Everything is documented at cloudcart.dev.

GraphQL and REST · CLI and Dev MCP · Headless storefronts

AI Toolkit on GitHub

Three APIs

An API for every task

REST for external integrations, Admin GraphQL for the admin and agents, Storefront GraphQL for the storefront. The same store behind all three.

/api/v2

JSON-API v2 · REST

  • External integrations: ERP, Make, Zapier, scripts
  • API key per store
  • JSON:API 1.0, one resource per request
GET /api/v2/products?filter[sku]=RS-30 X-CloudCart-ApiKey: ••• Accept: application/vnd.api+json
Documentation
/api/gql

Admin GraphQL

  • Self-describing schema with introspection
  • Personal Access Token, audit trail for every mutation
  • Used by the CLI and AI agents
POST /api/gql { products(first: 1, sku: "RS-30") { edges { node { id name pricing { from } } } } }
Documentation
/api/sf

Storefront GraphQL

  • Headless storefronts: Next.js, Nuxt, SvelteKit, Remix, Astro
  • Scoped Storefront token + customer JWT
  • Requests from the customer's browser
POST /api/sf X-Storefront-Access-Token: ••• { product(handle: "serum-s-rozovo-maslo") { title priceRange { minVariantPrice { formatted } } } }
Documentation
01Real-time webhooks whenever an order, product or customer changes. Documentation →
02Tokens: API keys for integrations, Personal Access Tokens for CLI and GraphQL, scoped Storefront tokens for storefronts.

AI assistant + Nitrogen

Connect in a minute

Connect your AI assistant to CloudCart with one sentence. Then tell it what storefront you want, and it writes it with Nitrogen and puts it live through GitHub.

The sentence for your AI assistant
Fetch and follow the instructions at https://raw.githubusercontent.com/cloudcart/ai-toolkit/main/prompt.md to set up my AI agent for CloudCart

The assistant asks which language you want to work in and replies in it.

  1. Open your AI assistant

    Claude Code, ChatGPT Codex, Cursor, VS Code or Gemini CLI.

  2. Paste the sentence

    The assistant sets everything up by itself.

  3. Give it an access key

    Settings → “PAT Tokens” → new token. Done, start typing.

The PAT token: the assistant's key to your store

Only the permissions it needs

When you create it, you choose read only, full access or individual permissions per resource. The token works with the CloudCart CLI and Admin GraphQL.

Expiry and IP addresses

You can set a date until which the token is valid, and up to 20 IP addresses or networks it is accepted from.

Under your control

Only the store owner can create tokens. The value is shown once. You turn a token off or delete it with one click, and access stops immediately.

AI Toolkit and CLI

Works with your AI agent

$ cloudcart app execute --query 'mutation { productsBulkAdjustPrice(selector: { categoryId: 12 }, change: { op: PERCENT_DELTA, value: 5 }) { jobId queuedCount } }' --json

CloudCart CLI is a command-line interface for your store, built with AI agents in mind. It's built in and works right away. Every command returns JSON and a clear exit code - whether it succeeded and, if not, why. That makes it as easy for a script or AI agent to use as it is for an engineer.

JSON outputand exit codes for every command
Scriptableby agents and CI
Image understandingin the command line

View on GitHub

Build a new integration

Describe it, and Claude generates the GraphQL operations, validates them and connects the logic

› “Sync inventory from our WMS every hour”

Write and test queries

Claude reads the schema, writes the query and validates it through Dev MCP before execution

› “Which products have no image?”

Nitrogen component drafts

A storefront component built on the Storefront API, ready for your framework

› “Product card with a variant selector”

Dev MCP gives Claude Code, ChatGPT Codex, Cursor, VS Code and Gemini CLI the same capabilities: they read the schema and validate the query before running it.

Nitrogen - our headless technology

Write the storefront with React Router and Tailwind

Nitrogen is built on React Router and Tailwind, with a starter from CloudCart. The Storefront API can also be used with another framework, but Nova hosting is for Nitrogen. The catalog, orders, payments and inventory stay in CloudCart.

localhost:5173dev

Three versions · choose one

Your language modelDescribe the change…

The homepage of the sample store yourstore.com. The developer asks their language model, “Give me three fall versions of the homepage,” and gets three versions: warm tones, a dark banner, and a full image. The selected version becomes the homepage - the change is in the storefront code.

The APIs

  • Storefront GraphQL with public and private tokens
  • Customer Account API: passwordless sign-in with a 6-digit code
  • Your existing theme and Nitrogen run side by side on different domains

Deployment and Nova

  • cloudcart nitrogen deploy from the CLI or your CI
  • Or use the GitHub App: deploy on every push
  • Nova: Cloudflare Workers, <handle>.cloudcart.dev, production only, environment variables

What you handle yourself

  • robots.txt and sitemap.xml
  • 301 redirects
  • The contact form and cookie consent

These aren't included automatically on a Nitrogen domain - your app handles them. The documentation explains how.

Nitrogen documentation

Limits and rules

Up front, not after your first 429

The limits are public so you can plan your integration before you write it.

Requests per minute, by plan

The limit applies to JSON-API v2 (/api/v2). Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, and Retry-After; exceeding the limit returns a 429 with a JSON body. All of the store's keys share one budget. The limit applies to the store's primary domain.

Webhooks

The receiver must return a 2xx response and handle spikes - bulk catalog changes send many events at once. An endpoint that consistently returns errors is disabled automatically.

A webhook delivery waits up to 30 seconds.

Timeouts

30 seconds per request to JSON-API v2 and the admin. Large reads that exceed this limit are paginated, not given more time.

Abuse protections (bots, flooding) are not published; a client that triggers them receives 429 or 403.

Talk to our engineers

You bring the task. We show you which API handles it and where it is documented.