MCP connection
Connect the Claude app, Claude Code, Codex, or another OAuth-capable MCP client to your Sellavi account. The assistant can inspect your storefront, manage your catalog, edit theme files, and generate branding assets through the hosted Sellavi MCP server.
MCP stands for Model Context Protocol: it lets an assistant discover available Sellavi tools and call them on your behalf. You describe a task in normal language; the app selects a tool, asks for any required inputs and shows the result.
You do not need to install or host an MCP server. Connecting an assistant gives it access to the store you authorize, so start with a read-only request before making changes.
Choose your app
| App | Start here |
|---|---|
| Codex desktop, CLI or IDE extension | Codex connection steps |
| Claude desktop or web | Claude app connection steps |
| Claude Code | Claude Code connection steps |
| Another coding assistant | Remote MCP requirements |
After connecting, follow Verify your connection and explore tools.
Connection Details
| Field | Value |
|---|---|
| Server name | sellavi-design-ops |
| MCP URL | https://api.sellavi.com/mcp |
| Transport | Streamable HTTP |
| Authentication | OAuth 2.0 through your Sellavi account |
| Company and store | Selected automatically from the company active when you approve access |
Add the server URL without a manually configured Authorization header. Your MCP client obtains and sends the OAuth access token after you sign in.
The API key from Company settings is for the regular API. It is not accepted by the current MCP authentication flow.
Before Connecting
- Use an MCP client that supports remote HTTP servers and OAuth.
- Sign in to your Sellavi dashboard and select the company/store you want the assistant to use.
- Add the MCP server using one of the instructions below.
- Complete the browser login and approve the requested permissions.
If your account manages several companies, select the intended company before approving access. Changing the company in the dashboard later does not change an existing MCP token. Sign out of the MCP connection and authenticate again to connect another company.
Connect with the Claude App (Desktop / Web)
No terminal commands are needed for this setup.
Claude app setup instructions
- Open Claude and go to Customize → Connectors, or open Connectors in your browser using the same Claude account.
- Choose + Add → Add custom connector.
- Enter Sellavi MCP as the name and
https://api.sellavi.com/mcpas the remote MCP server URL. Click Continue. - Review the detected OAuth settings. Choose Sign in now. For OAuth client, use Claude's published identity or Register automatically. Leave your own client ID/secret and request headers empty; Sellavi supports automatic client identification.
- Finish adding the connector. If it is not connected yet, click Connect.
- In the browser, sign in to Sellavi, ensure the intended company is selected, and approve access.
- Open a Claude chat, click + → Connectors, and enable Sellavi MCP.
Try: Inspect my current store and list its products. Do not change anything yet.
For Team or Enterprise accounts, an authorized organization administrator must add the connector first; each member then connects individually. If the app does not show the add option, use the browser Connectors page above.
Connect with Claude Code
Run in your terminal:
Claude Code setup instructions
Code(bash)
Inside an interactive Claude Code session, open:
Code(text)
Select sellavi-design-ops, start authentication, and complete the Sellavi login and permission approval in your browser. Then check the connection:
Code(bash)
If You Already Added an API Key
Remove the old user-scoped entry, then add it again without a header:
Code(bash)
Open /mcp again and authenticate. If the old entry was added with a different scope, remove that entry using its original scope.
A configured Authorization header prevents Claude Code from falling back to OAuth when that header is rejected. See the official Claude Code MCP documentation.
Connect with Codex
Use the desktop app's MCP settings or configure the server from the CLI. For a local Codex host, the desktop app, CLI and IDE extension share MCP configuration.
Codex setup instructions
Desktop setup
If your desktop client has MCP servers in Settings, add a server named sellavi-design-ops, select Streamable HTTP and enter https://api.sellavi.com/mcp. Save and restart the connection, then choose Authenticate to complete Sellavi sign-in. If these controls are unavailable in your version, use the CLI setup below.
CLI setup
Run these commands in the environment where your Codex client runs:
Code(bash)
Complete the Sellavi login and permission approval in the browser opened by the login command. Then open a chat and ask the assistant to discover the connected tools. A configured server entry alone does not confirm that authentication or tool discovery succeeded.
Configure Manually
Alternatively, add this entry to ~/.codex/config.toml:
Code
Then run codex mcp login sellavi-design-ops. Reload your Codex session if the new server is not visible.
For an existing entry, remove manually configured Authorization values from http_headers or env_http_headers, and remove bearer_token_env_var for this server before using OAuth. Keep only one definition of this server in the configuration that applies to your session.
See the official Codex MCP documentation.
Other MCP Clients
Add a remote HTTP MCP server with URL https://api.sellavi.com/mcp, choose OAuth authentication, and follow the browser login flow. Leave custom API key and Authorization header fields empty.
Connection requirements
The client must support OAuth discovery and either dynamic client registration or a supported client metadata document. A client that only supports static API key headers cannot use this connection method.
Verify your connection and explore tools
Ask your assistant:
Code(text)
The MCP client handles connection setup and tool discovery. tools/list returns tool names, descriptions and input schemas. The app may expose this catalog through its tool search or connection panel rather than a button named tools/list.
A successful read with list_languages confirms that the assistant can call the connected server. Ask it to show a short summary rather than credentials or the full connection metadata. If tools are missing, reconnect, approve the required access and refresh the app's tool catalog.
How an assistant should select and call a tool
- Discover the tools exposed by the current connection. Do not infer a tool from a REST endpoint or from this guide alone.
- Inspect the chosen tool's input schema. Use its exact argument names and required fields.
- Read the current resource and use the returned IDs. For example, use
list_modulesbefore editing a module. - For a change, show the proposed arguments, explain the effect and obtain approval before calling the write tool.
- Read the result and verify the changed resource. After a timeout, check the current state before retrying a write.
The app sends tool calls through the MCP connection. A REST path such as GET /modules is documentation for the REST API; it is not a tool name. Similarly, layoutId in a tool schema and layout_id inside an API payload are not interchangeable.
What the Server Can Do
Available tools and usage guidance
| Area | Available tools |
|---|---|
| Setup and inspection | create_launch_plan, inspect_brand_assets, inspect_storefront |
| Store languages | list_languages |
| Products | list_products, get_product, create_product, update_product, delete_product |
| Categories | list_categories, get_category, create_category, update_category, delete_category |
| Options | list_options, get_option, create_option, update_option, delete_option |
| Custom CSS/JS and snapshots | read_theme, list_theme_versions, update_theme, create_snapshot, list_snapshots, rollback_snapshot |
| Editable theme files | list_theme_files, read_theme_file, update_theme_file, delete_theme_file |
| Branding and media | upload_media, update_logo, update_banner |
| AI image generation | check_demo_budget, list_brand_ai_prompts, generate_logo, generate_banner, generate_product_image, get_ai_generation_result |
Use the schemas returned by tools/list for each tool's required fields. OAuth scopes advertised by the server do not mean that a matching MCP tool exists for every regular API endpoint. For example, payment setup is handed off to the dashboard link returned by create_launch_plan.
Start with a Read-Only Request
After connecting, ask:
Code(text)
For a storefront redesign workflow, see Sellavi AI Storefront Designer.
Changes, Media, and Backups
- Ask the assistant to explain changes and obtain your approval before changing a live store.
update_themereplaces the full custom CSS value. Read the existing CSS first and keepcreateBackupenabled; it defaults totrue.- Non-empty JavaScript is blocked by
update_theme. Use the editable files returned bylist_theme_filesfor supported theme JS changes. create_snapshotandrollback_snapshotcover custom CSS and JS only. They do not back up products, categories, options, logos, banners, or the whole store.- Theme file updates and resets create separate file snapshots by default.
rollback_snapshotdoes not restore those file snapshots. Resetting a file withdelete_theme_filerestores the system version, not an earlier custom version. - Product/category/option deletion requires
confirmed: trueafter you approve the exact ID. Theme file reset requires confirmation of the exact path. - Use public, server-fetchable image URLs for product and branding updates. Chat-local files and session-only links are not accessible to the MCP server.
upload_mediaaccepts image data; itsfilePathrefers to a file on the MCP host. - AI generation consumes credits. Check
check_demo_budgetfirst. An insufficient balance may trigger a paid credit top-up; approve spending before generation. - Image generation is asynchronous. Poll
get_ai_generation_resultwith the sameresultId, respectingpollAfterSecondsandmaxWaitSeconds. Do not start another generation while the existing job is processing. Check the completed result'sdata.appliedbefore applying branding again.
Store design, layouts and modules
You can ask the assistant to change general design settings, mobile options, existing page layouts, header/footer settings, modules and individual banners. Start with the Store design guide for examples and the Modules and banners guide for content editing.
Design tools, permissions and examples
| Area | Tools | OAuth scope |
|---|---|---|
| General design | read_design_settings / update_design_settings | themes:read / themes:update |
| Existing layouts | list_layouts, get_layout | modules:read |
| Layout settings | update_layout_settings | modules:update |
| Shared header/footer | read_global_settings / update_global_settings | modules:read / modules:update |
| Read modules | list_modules, get_module | modules:read |
| Add a module | create_module | modules:create |
| Edit, move or reorder modules | update_module, reorder_modules | modules:update |
| Remove a module/banner | delete_module, delete_banner | modules:delete |
Read the current values first, then send only the fields you want to change. Omitted settings and banners remain saved. Supplied settings lists replace that list; banner removal uses delete_banner. Use the schemas returned by tools/list for exact arguments. If access is missing, reconnect and approve the required scope.
Product lists and sliders support up to two banners between products. Use create_module/update_module with payload.settings.banners_enabled (0/1), payload.settings.banners_interval (integer >=1 when enabled), and payload.banners for desktop/mobile images. Interval 2 inserts banners after products 2 and 4, once each, including across list pagination. Omitted banners remain saved and count toward the two-banner limit. Disabling banners preserves their images. Set payload.settings.banners_desktop_columns to 1 (default) or 2 for all banners in the module on screens >=992 px; smaller screens keep one space. If a wide banner does not fit in the remaining grid columns, it starts on the next row and following products fill the gap. Its visible position may therefore be later than the configured product interval. Recommended artwork for 1 space: desktop/mobile 900 × 1200 px (3:4). For 2 spaces: desktop 1800 × 1200 px (3:2), mobile/tablet 900 × 1200 px. See Banners between products.
Read inline banner IDs through get_module/list_modules. Use update_banner to replace existing desktop/mobile images from public URLs, or update_module for banner fields using uploaded CDN URLs. Use delete_banner for explicit removal; inspect_brand_assets discovers the separate branding banner module.
These writes affect the live store immediately. Ask the assistant to explain the specific changes and wait for approval, then inspect the affected pages in a browser on desktop and mobile. A storefront preview link shows the current state; it is not an isolated draft preview.
CSS/JS snapshots do not back up design settings, layouts, modules or banners. Keep the current read responses before editing; they help restore earlier values but cannot automatically recover deleted content. Deletion tools require confirmed: true only after you approve the exact module or banner.
Try this:
Code(text)
Troubleshooting
Common connection errors
| Message or symptom | What to do |
|---|---|
Token missing / needs authentication | Complete OAuth login. An unauthenticated connection receives HTTP 401 so the client can discover the login flow. |
Company not found after using a settings API key | Remove the manually configured key/header and reconnect with OAuth. Use the MCP sign-in flow instead of an API settings token. |
Company not found after OAuth login | Authenticate again with the intended company selected. If it continues, contact support with the request_id. |
Server rejected the configured Authorization header / OAuth fallback disabled | Remove the manually configured Authorization header and authenticate again. |
Invalid token | Remove stale manual credentials and reconnect through OAuth. |
Token expired | Let the client refresh the token, or sign in again if refresh fails. |
Invalid token audience | Use the exact MCP URL above and obtain a token through this MCP connection. A token for another resource cannot be reused. |
HTTP 402 / Payment owe detected | Resolve the company's outstanding payment in the dashboard. |
| HTTP 429 | Wait before retrying and reduce the frequency of requests. |
OAuth invalid_grant | Restart authentication. The authorization code may be expired/used, the refresh token unavailable, or the callback/PKCE values mismatched. |
OAuth invalid_client | Remove and add the server again so the client can register, then authenticate. Contact support if it persists. |
| Storefront inspection blocked | Use the returned storefront URL in a browser. Bot protection can block server-side inspection; provide a screenshot or relevant HTML if needed. |
When contacting support, include your client name, the MCP URL, the error, and request_id when present. Do not send access tokens, refresh tokens, API keys, or complete authorization callback URLs.
OAuth Flow for Developers
MCP clients handle these steps automatically; merchants do not need to create a client ID or exchange tokens manually.
Discovery and token endpoints
| Step | Endpoint / behavior |
|---|---|
| Discover the protected resource | GET https://api.sellavi.com/.well-known/oauth-protected-resource/mcp |
| Discover authorization endpoints | GET https://api.sellavi.com/.well-known/oauth-authorization-server |
| Register a client when needed | POST https://api.sellavi.com/mcp/oauth/register |
| Request authorization | GET https://api.sellavi.com/mcp/oauth/authorize; redirects to the dashboard for login and consent |
| Exchange the authorization code | POST https://api.sellavi.com/mcp/oauth/token with grant_type=authorization_code, client_id, redirect_uri, code, and code_verifier |
| Call MCP | The client sends the issued access token as Authorization: Bearer <access_token> to /mcp |
| Refresh access | The token endpoint accepts grant_type=refresh_token, client_id, and refresh_token |
The flow uses Authorization Code with PKCE (S256). Authorization codes are single-use and valid for five minutes. Default access token lifetime is one hour; default refresh token lifetime is 90 days. Use the token response's expiry fields rather than hard-coding these defaults.
Use the MCP resource URL https://api.sellavi.com/mcp as the OAuth resource. Sign in with the store you want the assistant to access.
Saved custom CSS/JS versions
Use list_theme_versions with kind: "css" or kind: "js" to get up to 30 saved versions, newest first. Entries contain only date, version and version_id; no code is included. Empty history returns an empty list in the response envelope.
Version history tools
Pass a returned version_id with the same kind to read_theme to read that version's content. Omitting version_id preserves the existing current-code read. The response keeps kind, code and bytes. These tools only read; they do not activate, save or roll back a version. A supplied ID must be a positive integer belonging to this store and code type.
See Saved CSS/JS versions for examples, API equivalents and the difference between editor history and MCP snapshots. Use IDs returned for your connected store.
Start a store-launch workflow
Read your current setup before creating anything. Keep existing logos and banners unless you approve replacing them, then prepare categories and products, inspect the storefront, and finish payment setup in the dashboard.
Code(text)