Connect an AI agent to your store
On this page
The StoreConnect Model Context Protocol (MCP) server is how an external AI agent connects to your store to work on it. This article explains how the connection works, which agents it supports, and how StoreConnect keeps the connection safe. See also Build on StoreConnect using AI agents.
How the connection works
Each StoreConnect store hosts its own managed MCP endpoint at https://<your-store-domain>/mcp. There is nothing to download or run — the endpoint is part of your store.
Two separate things work together:
- The AI skills toolkit teaches an agent how to work with StoreConnect. Installing it does not connect any store.
- The MCP connection gives the agent the live tools to act in one specific store.
Because the endpoint belongs to your store, an agent you connect only ever works in that store’s Salesforce org. Connecting a different store means using that store’s own endpoint.
This is deliberate. A per-store endpoint keeps ownership of your data inside your own org: there is no shared gateway that several customers’ stores sit behind, so a connection made for one store cannot reach another store’s data. A single shared endpoint would make every connection a potential path into other customers’ data.
Access and permissions
- A StoreConnect administrator grants and revokes access. The agent signs in as a StoreConnect user and inherits that user’s permissions — record sharing, object and field-level security, and store scope all still apply.
- The agent authenticates with an API token generated on your Salesforce User record. You can revoke it at any time. See Get your API token.
- Where an agent signs in through a browser page served by StoreConnect, your token goes into that page, not into the agent or a chat window.
- Sign-in sessions expire after about eight hours. When a session expires, sign in again through your agent.
- Only give an agent the access it needs for the task to be done.
Which agents you can use
There is no tool lock-in. The StoreConnect skills toolkit ships as native packages for a range of AI products, and any MCP-capable client can connect to the same endpoint even without a native package.
Packages are available for Claude (web, desktop, and Claude Code), Codex, Gemini CLI, GitHub Copilot CLI, Cursor, Google Antigravity, Kiro, and Grok Build, plus an experimental recipe for Agentforce Vibes. More products are added as their MCP support matures, so check the StoreConnect AI repository for the current list.
Support for each product is managed in the StoreConnect skills toolkit. Your administrator can tell you which agent is set up for your store.
Before you connect
You need four things:
- Your store’s MCP URL, in the form
https://<your-store-domain>/mcp, from your StoreConnect administrator. - A Store Role of type Content Changes on your Salesforce user, scoped to the store you want to work on. Editor level lets an agent create and stage changes; Final Approver level is also needed to approve and publish them. See Store roles.
- Your API token, generated on your Salesforce User record. See Get your API token below.
- An AI agent or coding assistant that supports MCP.
The StoreConnect skills toolkit installed in that agent is optional but recommended, since it gives the agent the StoreConnect know-how to work well.
Get your API token
Your API token is how an agent proves it is acting as you. You generate it on your own Salesforce User record, and you do not type the value yourself.
- Open your User record in Salesforce.
- Select the API Token Active checkbox.
- Save the record. Saving generates the API Token value automatically.
- Copy the API Token value.
:::note If API Token Active and API Token are not visible on your User record, ask your Salesforce administrator to add them to the User page layout. They are custom fields and are not on the standard layout by default. :::
The token carries your permissions, not extra ones. An agent using it can only do what your Store Role allows, on the stores that role covers.
:::warning Treat the API Token value like a password. Anyone who has it can act as you, within your Store Role permissions, on every store that role covers. Do not paste it into a chat message, a support ticket, or a file you commit to source control. :::
Bearer token format
Agents that connect with a header (rather than through a sign-in page) need a three-part bearer token, separated by colons:
org_id:store_sfid:api_token
| Part | Where to find it |
|---|---|
org_id |
Setup, then Company Information, then Salesforce Organization ID |
store_sfid |
The Id of the Store record, also visible in the record URL |
api_token |
The API Token value you copied above |
Revoke or expire a token
- Clear the API Token Active checkbox on your User record to revoke access immediately. The token stops working on the next request.
- Set API Token Expires At to have the token stop working automatically after a given date and time.
- If a token is exposed, clear API Token Active first, then clear the API Token field and select API Token Active again to generate a fresh one.
For the underlying field definitions, see User object reference.
Connect and verify
The exact steps depend on your agent, but the flow is the same everywhere:
- Add a remote MCP server named “storeconnect” using your store’s
/mcpURL. Do not include a credential in the URL. - Give the agent your token, using whichever method it supports (see below).
- Confirm the connection shows as active in your agent.
- Ask the agent to run a read-only check to confirm it is connected to the intended store and environment.
- Only after that check, ask the agent to make a change.
Agents take the token one of two ways:
- Through a sign-in page. The agent opens a Connect to StoreConnect page served by your store, where you paste the API Token value on its own. Your token goes into a StoreConnect page, never into the agent or a chat window.
- As a header. The agent sends
Authorization: Bearer org_id:store_sfid:api_tokenon the connection. Use the three-part format described above.
:::tip
In Claude web or desktop, open Settings, then Connectors, then Add custom connector, enter your store’s /mcp URL, and complete sign-in. Enable the connector only in conversations that need it. In Claude Code, add the server with the token as a header:
```bash
claude mcp add –transport http storeconnect https://
Where to set a header differs by product and changes over time, so check your agent’s current MCP documentation for the exact field.
A successful connection is not approval to make changes. Always verify the store and environment first.
How changes are made safely
By default, a person approves every change an agent makes to themes and design. Changes are staged, so you can review exactly what an agent will do before anything reaches your live store:
- The agent confirms which store and environment it is connected to.
- It reads the current records it needs, rather than guessing.
- It stages one related change at a time.
- It shows you a summary of what will be added, updated, or removed.
- It shows a preview where one is available.
- You approve the change explicitly.
- The agent submits the staged change.
- It rechecks the result, because publishing can finish in the background.
- It confirms the live storefront reflects the approved change.
Treat all changes as high-impact and review them closely before approving: deletions, bulk edits, price changes, activating a theme, and any change to navigation or checkout.
:::note Keeping a person in the loop is the default, not a hard limit. A Store Role at Final Approver level lets an agent publish records live as you, and most agent clients can be set to approve tool calls automatically. Combine the two only where you intend an agent to publish without a review step, and keep that setup out of your live store while you are still learning how an agent behaves. :::
If something isn’t available
If an agent cannot perform an action, it is usually a permissions boundary rather than a fault. Ask your administrator to review the access for that store instead of looking for a workaround.
:::warning Try agent-driven changes in a test store or Salesforce sandbox before you run them against your live store. See Set up your test store and Move data from sandbox to production. :::
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.