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)
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:
- Ask for the store style and design details.
- Read the current CSS/JS with MCP tools.
- Create a rollback snapshot.
- Inspect the live storefront if possible.
- Draft custom CSS or supported theme file changes.
- Explain what will change.
- Ask for approval before publishing.
- Publish the change only after approval. Non-empty JS is blocked in update_theme; use supported theme files for JS.
- Verify the live storefront.
- Give you the
snapshotIdfor rollback.
If the AI tries to publish before creating a snapshot, stop it.
What to Give the AI
Prepare this information:
| Question | Example answer |
|---|---|
| Company/store | Selected during OAuth approval; no ID needed |
| Store URL | https://example-store.co.il/ |
| Business type | Fashion, supplements, cosmetics, food, electronics |
| Target audience | Young parents in Israel, Hebrew speakers |
| Style | Premium, clean, playful, luxury, calm, clinical |
| Colors | Black and gold, pink and white, green and cream |
| Logo/images | Upload files or provide URLs |
| Pages to change | Homepage, product page, category page |
| Products to update | Product ids or product URLs |
| Publish approval owner | The 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)
For AI Agents: Follow This Exactly
If you are an AI agent reading this documentation, follow this protocol.
- Confirm that the iStores MCP server is connected.
- Use the authenticated company and store; do not ask for companyId.
- Ask for the store URL and design brief.
- Use MCP tools, not raw API calls.
- Omit companyId normally. If supplied, it must match the authenticated company.
- Never print or store the Bearer token.
- Before custom CSS changes, call
create_snapshot. Keep separate file backups enabled for theme file edits. - Do not call
update_theme,rollback_snapshot, orupdate_productwithout explicit user approval. - Keep CSS scoped to real storefront selectors.
- Verify the storefront after publishing when possible.
- Return the
snapshotIdand 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)
Available MCP Tools
| Tool | Use it for |
|---|---|
read_theme | Read current custom CSS or JS |
create_snapshot | Create a rollback snapshot before changes |
update_theme | Publish replacement custom CSS; non-empty JS is blocked |
list_snapshots | Find rollback snapshots |
rollback_snapshot | Restore CSS and JS from a snapshot |
upload_media | Upload storefront images/assets |
get_product | Read a product by product id |
update_product | Update 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)
Create a snapshot:
Code(json)
Publish CSS:
Code(json)
Rollback:
Code(json)
Rollback
If a published custom CSS/JS change looks wrong, tell the AI:
Code(text)
The AI should:
- Call
list_snapshots. - Show the available snapshots.
- Ask which one to restore.
- Ask for final confirmation.
- Call
rollback_snapshot. - Verify the storefront.
Common Problems
| Problem | What it means |
|---|---|
401 Unauthorized | The 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 Requests | Too many MCP/API calls were made too quickly; wait and retry |
| AI asks for a token | Complete OAuth login; do not paste a token into chat |
| AI wants to publish without snapshot | Stop 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
snapshotIdafter every publish.