Direct answer
Never give an AI agent a Shopify staff login, a collaborator account or the store owner’s credentials. Give it a credential that is scoped to the job, expires on its own and can be revoked without touching anything else. For theme work that is a Theme Access password, used through the Shopify CLI against an unpublished theme. For data work it is a custom app created in the Dev Dashboard with the narrowest scopes that fit, read scopes first, authenticated with the client credentials grant so the token expires every 24 hours. Legacy custom apps created in the admin still work, but none can be created since 1 January 2026 and they only rotate by uninstall and reinstall. Keep the Dev MCP for documentation; it holds no store access at all.
Key takeaways
- An agent holds a credential, never a login. Staff and collaborator accounts cannot be scoped to a job.
- Theme work needs write_themes only. A Theme Access password gives exactly that and is revoked by deleting it.
- New custom apps live in the Dev Dashboard since 1 January 2026; their client-credentials tokens expire after 24 hours.
- Legacy admin-created apps rotate only by uninstall and reinstall, and can never be recreated. Migrate them.
- The Dev MCP gives an agent docs and schema, not store access. Confuse the two and you over-provision.
What an agent can actually hold
Our previous guide put the theme in Git and let the agent work a branch. This one answers the question that arrives the moment that works: what credential is in the agent’s environment when it runs shopify theme push or updates a price through the Admin API? Most stores answer it badly. The founder’s login gets pasted into a config file because it was quicker, and the agent now holds payouts, staff, domains and customer exports in order to change a Liquid file. This guide sits in our UK engineering and compliance work and extends the Git and preview-theme workflow rather than repeating it.
Shopify gives you three credentials that can be scoped, and one that cannot.
Created by store staff in the Theme Access app, viewed once, with a link that expires after seven days. It grants write_themes and nothing else, is passed to the CLI as --password or the SHOPIFY_CLI_THEME_TOKEN variable, and is revoked by deleting it.
Since 1 January 2026 every new custom app is created in the Dev Dashboard and installed on stores in the same organisation. Scopes are declared per app version, and the client credentials grant issues a token that expires after 24 hours.
npx @shopify/dev-mcp gives Claude Code or Cursor Shopify’s documentation, GraphQL schema and validation. It runs locally, needs no authentication and holds no store access. The right first rung, and the wrong reason to hand over a token.
The one that cannot be scoped is a login. A staff account, a collaborator account or the owner’s own credentials carry whatever the role allows, in the admin and through the CLI, and these are the things a theme edit never needs:
The access ladder
Think of access as a ladder and climb only as far as the job needs. The bottom rung is the Dev MCP: the agent can read every doc and validate every query with no credential at all, which is enough for a surprising amount of planning. The next rung is a read-only custom app, read_products and read_orders, so the agent can inspect the catalogue and reason about it without being able to change a thing. Theme work climbs one more rung, to a Theme Access password on an unpublished theme, where a mistake is a preview nobody sees. Only a job that genuinely writes data, a price sync or a metafield backfill, earns a write scope, and it earns exactly one. The top rung is a login, and no job earns that.
If the store already carries a pile of apps and tokens nobody remembers issuing, that inventory is the first job, before any agent is connected: a hardening pass over the store’s apps, tokens and staff permissions takes a day and removes the credentials that would otherwise become the agent’s by accident.
- Carries every permission the role has, in the admin and the CLI
- Two-factor prompts built for a person block an unattended job
- The store activity log shows a person, not the job
- Cannot expire on its own; revoking it removes a human too
- Scopes declared per app version, read first, one write per job
- Client credentials tokens expire after 24 hours
- The activity log shows the app by name
- Revoke by deleting a password or rotating a secret, nobody else affected
The activity log matters more than it looks. From Settings, General, the Store activity log lists recent actions with the name of the person or app that performed each one. It holds the 250 most recent actions and cannot be filtered or exported, so it is a review tool, not an audit trail; still, an agent that acts as a named app is visible there, and one acting as the founder is invisible. Shopify: activity logs in the admin
Tokens, scopes and rotation
| Credential | Reaches | Lifetime | Rotate or revoke | Give it to an agent? |
|---|---|---|---|---|
| Theme Access password | Themes only (write_themes) | Until deleted | Delete it in the Theme Access app | Yes, for theme work on an unpublished theme |
| Dev Dashboard custom app token | The scopes on the app version | 24 hours | Re-request; rotate the client secret in the Dev Dashboard | Yes, the default for data work |
| Legacy admin custom app token | The scopes set in the admin | Never expires | Uninstall and reinstall the app; never delete it | Only until migrated |
| Storefront API token | Public storefront data | Until revoked | Revoke in the admin | Not for writes; it is public by design |
| Staff, collaborator or owner login | Everything the role allows | Until the account is removed | Remove the account | Never |
Three details decide whether the middle lane is safe in practice. First, scopes come in read and write pairs, and you choose them per app version, so the agent’s token cannot reach a resource the version never declared. Shopify: access scopes. Second, rate limits are per app and store: the GraphQL Admin API restores 100 points a second on a standard plan, 200 on Advanced, 1,000 on Plus and 2,000 on Enterprise, and no single query may cost more than 1,000 points, so a badly written agent loop throttles itself rather than the store. Shopify: API limits. Third, versions: Shopify releases an API version every quarter and supports each for at least twelve months, so pin the version in every request and let the agent see the date in the URL. Shopify: API versioning
The pattern we ship is small. The client secret lives in a secrets manager, a short script exchanges it for a 24-hour token, and the agent’s environment receives only that token. Putting the exchange behind a small integration service that owns the secret and issues nothing longer-lived than the job is what turns rotation from a calendar reminder into a property of the system.
// token.mjs: a 24-hour token for a Dev Dashboard custom app, then one read.
// The client secret lives in your secrets manager, never in the agent's prompt.
const shop = process.env.SHOPIFY_SHOP; // your-store.myshopify.com
const grant = await fetch(`https://${shop}/admin/oauth/access_token`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
client_id: process.env.SHOPIFY_CLIENT_ID,
client_secret: process.env.SHOPIFY_CLIENT_SECRET,
grant_type: "client_credentials",
}),
});
const { access_token, expires_in } = await grant.json(); // expires_in: 86399
// Hand the agent only access_token. It dies in 24 hours and carries only the
// scopes on the app version, so read_products here cannot touch an order.
const res = await fetch(`https://${shop}/admin/api/2026-07/graphql.json`, {
method: "POST",
headers: { "Content-Type": "application/json", "X-Shopify-Access-Token": access_token },
body: JSON.stringify({ query: "{ products(first: 5) { nodes { id title } } }" }),
});
const { data, extensions } = await res.json();
console.log(data.products.nodes, extensions.cost.throttleStatus); // points left in the bucketOne more line of defence costs nothing: Shopify tokens carry recognisable prefixes, and GitHub’s secret scanning lists Shopify access tokens among its partner patterns, so a token that lands in a repository is flagged rather than sitting there quietly. Treat the flag as a rotation, not a false positive. GitHub: supported secret scanning patterns
What breaks in production
For this guide we went through our own Shopify delivery records. Client names are withheld. These are the access failures that actually cost time or trust, and the rule each one taught.
- Write the scope list before the prompt. If you cannot name the scopes a job needs, the agent is not ready to run it. Read scopes are the default; a write scope is a decision with an owner.
- Preview themes and dry runs are the safety net, not the token. A perfectly scoped write_products token will still overwrite two thousand prices if the job has no dry run. Scope limits the blast radius; preview and rollback limit the damage inside it.
- Rotation is a property of the credential, not a task for a person. Choose credentials that expire, and put the ones that do not on a migration list.
The Agent Blast Radius Score
The Agent Blast Radius Score is our triage model for access an agent already holds. It does not say whether the agent is any good. It says how much a bad afternoon could cost, and how urgently to re-key.
A theme agent on a Theme Access password against an unpublished theme, in a repository with Theme Check, scores one or two. The same agent given the founder’s login because it was quicker scores nine before it has done anything.
A real boundary: the app has to be born in the merchant’s organisation
Recommendations by business type
Your agent edits Liquid, sections and JSON templates. That needs write_themes and no data scope at all. One Theme Access password in CI, a preview theme per branch, and the founder’s login never leaves the founder.
Let the agent read the catalogue with read_products and propose the change as a diff. Only the job that applies it gets write_products, on a 24-hour token, with a dry run and an export of the before state.
Every legacy app token never expires and rotates only by reinstall. Recreate each integration as a Dev Dashboard app with the same or narrower scopes, move the callers, then uninstall the legacy app. Do not delete it until the replacement is proven.
Keep a human collaborator account for the humans and a scoped app for the agent. The client secret sits in your secrets manager against the client’s name, and rotating it on staff exit is a two-minute task, not an incident.
Frequently asked questions
- Can I give Claude Code my Shopify admin login so it can make changes?
- No. A staff, collaborator or store-owner login carries every permission the role has, cannot be scoped to one job, cannot expire on its own, and is protected by two-factor prompts built for a person. Give the agent a credential instead: a Theme Access password for theme work, or a custom app token with the narrowest scopes that fit for data work.
- What is the difference between a Theme Access password and a custom app token?
- A Theme Access password is created by store staff in the Theme Access app, is viewed once, grants write_themes and nothing else, and is revoked by deleting it. A custom app token carries whatever Admin API scopes the app version declares, from read_products up to write_orders, and for apps created in the Dev Dashboard it is issued through the client credentials grant and expires after 24 hours.
- Do custom apps still exist after January 2026?
- Yes, but they are created differently. Since 1 January 2026 you cannot create a new custom app in the Shopify admin under Develop apps. New custom apps are created in the Dev Dashboard and installed on stores in the same organisation. Existing admin-created apps keep working as legacy apps.
- How do I rotate a Shopify Admin API token?
- It depends on the app type. For a Dev Dashboard custom app, tokens from the client credentials grant expire after 24 hours, so rotation is a re-request, and the client secret itself can be rotated in the Dev Dashboard. For a legacy admin-created app the token never expires and the only rotation is to uninstall and reinstall the app, which issues a new token and breaks anything using the old one until it is updated. Never delete a legacy app: no replacement can be created.
- Does the Shopify Dev MCP give an AI agent access to my store?
- No. The Dev MCP server runs locally without authentication and gives the agent Shopify's documentation, GraphQL schema and validation tools. It does not hold a store credential. Anything that reads or writes real store data needs a separate, scoped token, and that token is the thing this guide is about.
Primary sources
- Shopify: manage theme access (Theme Access app)
- Shopify changelog: legacy custom apps can’t be created after January 1, 2026
- Shopify: admin-created custom apps (legacy)
- Shopify: get API access tokens for Dev Dashboard apps
- Shopify: create apps using the Dev Dashboard
- Shopify: API access scopes
- Shopify: API rate limits
- Shopify: API versioning
- Shopify: Dev MCP server
- Shopify: activity logs in the Shopify admin
- Shopify: collaborator accounts
- GitHub: supported secret scanning patterns
Technical and operational guidance, not legal advice.
UK topic cluster
Engineering & compliance
UK hosting, GDPR, access control, performance and delivery guidance.
Related guide
Shopify theme + Git + AI workflow
Put the theme under version control and let an agent ship through reviewed, reversible pull requests.
Case study
EU beauty brand on Shopify
Custom Liquid features shipped through scoped theme access, not a shared login.




Ritesh Agarwal







































