claude-code - 💡(How to fix) Fix claude.ai Shopify MCP: token-expired loop after multi-shop switch, unrecoverable from client side

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • But every actual tool call (e.g. get-shop-info) returns the token-expired error and triggers a triggered; the client surfaces the revoked-token error as fatal disconnect+reconnect cleanly. Instead, the client treats the revoked token as a fatal error and

Error Messages/Logs

Code Example

MCP server "claude.ai Shopify" requires re-authorization (token expired)
  (plus, immediately after each failed call, a system event:)
  The following MCP servers have disconnected: claude.ai Shopify
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Using the claude.ai-managed Shopify MCP connector with two Shopify stores on the same Shopify account (BetterTan Swim and Anelie Cosmetics). After invoking the connector's switch-shop tool to move between the two stores, every subsequent Shopify MCP tool call returns "MCP server claude.ai Shopify requires re-authorization (token expired)" and the server disconnects after the failed call.

The connector enters a state where it cannot be recovered from the client side:

  • claude mcp list reports the server as ✓ Connected
  • The tool list enumerates correctly (~30 Shopify tools visible)
  • But every actual tool call (e.g. get-shop-info) returns the token-expired error and triggers a server disconnect
  • The switch-shop tool's own description states it "revokes the current store's access token so the next tool call will prompt authorization for a new store" — but no authorization prompt is ever triggered; the client surfaces the revoked-token error as fatal

Other claude.ai-managed MCPs on the same account (Klaviyo, Canva, Higgsfield, Adobe, Vercel, Google Drive) work fine throughout — issue is Shopify-specific.

What Should Happen?

After switch-shop is called, the MCP client should detect the deliberately-revoked token and trigger a fresh OAuth prompt for the new shop (as the tool's own description promises), OR disconnect+reconnect cleanly. Instead, the client treats the revoked token as a fatal error and leaves the connector in an unrecoverable state.

Separately, the recovery paths exposed in the UI should actually recover the connector. Disconnecting the connector at claude.ai/settings/connectors and clicking Connect again silently re-uses the broken server-side connector record — it never shows Shopify's OAuth consent screen. This makes the bug unrecoverable from the client side.

Error Messages/Logs

MCP server "claude.ai Shopify" requires re-authorization (token expired)
  (plus, immediately after each failed call, a system event:)
  The following MCP servers have disconnected: claude.ai Shopify

Steps to Reproduce

  1. Sign in to claude.ai on an account that owns two or more Shopify stores under the same Shopify identity.
  2. In claude.ai Settings → Connectors, add the Shopify connector. Complete the OAuth flow for store A.
  3. In Claude Code, call any Shopify MCP tool (e.g. get-shop-info). It works.
  4. Call switch-shop to move to store B. The tool reports success.
  5. Call any Shopify MCP tool. → Returns: MCP server "claude.ai Shopify" requires re-authorization (token expired). Server disconnects.
  6. Try every recovery path. All fail: a. Full Claude Code restart (quit + relaunch) → tool calls still fail. b. /mcp reconnect → reports "Authentication successful. Connected to claude.ai Shopify." Tools enumerate. First call still fails with token-expired. c. In claude.ai Settings → Connectors, disconnect the Shopify connector, then click Connect again. The connect flow auto-completes without ever showing Shopify's OAuth consent screen ("Your connector was connected" appears immediately). Tool calls still fail. d. In each Shopify store admin → Settings → Apps and sales channels, uninstall the Claude app. Then retry (c). Connect flow still auto-completes without consent screen. Tool calls still fail. e. Open a fresh browser (different vendor, no cookies). Log into claude.ai. Add Shopify connector. Connect flow STILL auto-completes without consent screen.

The broken connector record appears to be persisted on claude.ai's backend and cannot be purged from any client-side action.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.146

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • Account: Anthropic Work workspace, [email protected]
  • Two Shopify stores on the same Shopify identity: BetterTan Swim, Anelie Cosmetics
  • macOS Darwin 25.3.0, zsh, Claude Code 2.1.146
  • System clock drift vs time.apple.com: +20ms (negligible — clock skew ruled out)
  • Other claude.ai MCP connectors on the same account (Klaviyo, Canva, Higgsfield, Adobe, Vercel, Google Drive) work normally in the same Claude Code session — issue is Shopify-specific
  • The connector record on claude.ai's backend appears stuck; needs server-side purge before a clean OAuth round-trip is possible
  • This blocks all Shopify MCP-driven work on these two stores

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix claude.ai Shopify MCP: token-expired loop after multi-shop switch, unrecoverable from client side