Istores API Documentation
Get started

iStores AI Storefront Designer

Use this MCP server when you want an AI assistant to redesign an iStores storefront safely.

The assistant can inspect your store, read custom CSS/JS, create CSS/JS snapshots, update custom CSS and supported theme files, upload media, and manage products.

The MCP server is hosted by iStores. You do not need to install or host a server.


Step 1: Connect the MCP Server

Follow the iStores MCP Connection Guide for Claude Code, Codex, and other OAuth-capable clients.

Connect to https://api.istores.co.il/mcp and sign in through OAuth. Select the intended company in your iStores dashboard before approving access. Do not configure the API key from Company settings as an Authorization header.

The connection already identifies your company and store. You do not need to supply companyId.


Step 2: Start the AI Chat

After connecting, paste this into your AI chat:

Code(text)
Use the iStores Storefront Designer MCP. Use the company and store already authenticated by OAuth. Inspect my current storefront before planning changes. I want to redesign my storefront. Before publishing custom CSS, create a rollback snapshot and ask me for approval. For theme file edits, keep the separate file backup enabled. Ask for approval before changing products, branding, or other live store data. Ask me what style, colors, sections, products, and images I want to change.

You can include your storefront URL and design brief if you already have them.

CSS/JS snapshots cover custom CSS and JS only. They do not restore products, media, branding, or theme file overrides. See the backup limitations before making live changes.


Step 3: What the AI Should Do

The AI should work in this order:

  1. Ask for the store style and design details.
  2. Read the current CSS/JS with MCP tools.
  3. Create a rollback snapshot.
  4. Inspect the live storefront if possible.
  5. Draft custom CSS or supported theme file changes.
  6. Explain what will change.
  7. Ask for approval before publishing.
  8. Publish the change only after approval. Non-empty JS is blocked in update_theme; use supported theme files for JS.
  9. Verify the live storefront.
  10. Give you the snapshotId for rollback.

If the AI tries to publish before creating a snapshot, stop it.


What to Give the AI

Prepare this information:

QuestionExample answer
Company/storeSelected during OAuth approval; no ID needed
Store URLhttps://example-store.co.il/
Business typeFashion, supplements, cosmetics, food, electronics
Target audienceYoung parents in Israel, Hebrew speakers
StylePremium, clean, playful, luxury, calm, clinical
ColorsBlack and gold, pink and white, green and cream
Logo/imagesUpload files or provide URLs
Pages to changeHomepage, product page, category page
Products to updateProduct ids or product URLs
Publish approval ownerThe person who must approve live changes

What Success Looks Like

A good AI result should include:

  • What changed.
  • What was checked.
  • Whether desktop and mobile were checked.
  • The snapshotId.
  • How to roll back.

Example final AI message:

Code(text)
Status: Published Changed: - Homepage hero styling - Product cards - Add-to-cart buttons - Mobile spacing Checked: - Homepage loaded - CSS marker appeared in live HTML - Product cards did not overlap on mobile Snapshot ID: 2026-06-03T13-56-27-578929Z-fbb550d7 Rollback: Ask me to roll back to this snapshot id.

For AI Agents: Follow This Exactly

If you are an AI agent reading this documentation, follow this protocol.

  1. Confirm that the iStores MCP server is connected.
  2. Use the authenticated company and store; do not ask for companyId.
  3. Ask for the store URL and design brief.
  4. Use MCP tools, not raw API calls.
  5. Omit companyId normally. If supplied, it must match the authenticated company.
  6. Never print or store the Bearer token.
  7. Before custom CSS changes, call create_snapshot. Keep separate file backups enabled for theme file edits.
  8. Do not call update_theme, rollback_snapshot, or update_product without explicit user approval.
  9. Keep CSS scoped to real storefront selectors.
  10. Verify the storefront after publishing when possible.
  11. Return the snapshotId and rollback instructions.

An optional companyId must match the company authenticated by OAuth. To use another company, reconnect with that company selected.


AI Agent Prompt

Use this prompt when your AI tool does not automatically understand the workflow:

Code(text)
You are an iStores storefront design operator. Use the iStores Storefront Designer MCP tools only. Do not use raw curl or direct API calls. Inspect the authenticated store first. Ask only for missing design details: - store URL - business type - target audience - desired style - brand colors - logo/images - sections or pages to change - publish approval owner Use the company and store authenticated by OAuth; omit companyId normally. The MCP client manages OAuth tokens after browser login. Never print, store, or summarize the Bearer token. Create a snapshot before custom CSS changes. Keep file backups enabled for theme file edits. Obtain approval and record previous values separately for product and branding changes. Workflow: 1. Read current CSS/JS. 2. Create snapshot. 3. Inspect storefront when possible. 4. Draft changes. 5. Explain preview. 6. Ask for approval. 7. Publish only after approval. 8. Verify live storefront. 9. Report snapshotId and rollback instructions.

Available MCP Tools

ToolUse it for
read_themeRead current custom CSS or JS
create_snapshotCreate a rollback snapshot before changes
update_themePublish replacement custom CSS; non-empty JS is blocked
list_snapshotsFind rollback snapshots
rollback_snapshotRestore CSS and JS from a snapshot
upload_mediaUpload storefront images/assets
get_productRead a product by product id
update_productUpdate product content

Tool calls use the company authenticated by OAuth. The optional companyId can normally be omitted.


Example Tool Calls

Read current CSS:

Code(json)
{ "name": "read_theme", "arguments": { "kind": "css" } }

Create a snapshot:

Code(json)
{ "name": "create_snapshot", "arguments": { "label": "Before homepage redesign", "notes": "Snapshot before AI storefront CSS changes." } }

Publish CSS:

Code(json)
{ "name": "update_theme", "arguments": { "kind": "css", "code": "/* full replacement CSS here */", "createBackup": true, "notes": "Homepage redesign CSS." } }

Rollback:

Code(json)
{ "name": "rollback_snapshot", "arguments": { "snapshotId": "SNAPSHOT_ID_FROM_THE_AI" } }

Rollback

If a published custom CSS/JS change looks wrong, tell the AI:

Code(text)
Use the iStores Storefront Designer MCP. List snapshots and roll back to the version before the last storefront change. Ask me for confirmation before restoring.

The AI should:

  1. Call list_snapshots.
  2. Show the available snapshots.
  3. Ask which one to restore.
  4. Ask for final confirmation.
  5. Call rollback_snapshot.
  6. Verify the storefront.

Common Problems

ProblemWhat it means
401 UnauthorizedThe Bearer token is missing, invalid, or configured in the wrong place
companyId does not match...Omit companyId or reconnect with the intended company selected
429 Too Many RequestsToo many MCP/API calls were made too quickly; wait and retry
AI asks for a tokenComplete OAuth login; do not paste a token into chat
AI wants to publish without snapshotStop and tell it to create a snapshot first

Security Rules

  • Keep OAuth access and refresh tokens private.
  • Let the MCP client manage OAuth tokens; do not configure a settings API key.
  • Do not paste tokens into prompts, screenshots, or support messages.
  • Do not publish without a snapshot.
  • Do not roll back without confirmation.
  • Keep the snapshotId after every publish.
Last modified on