View Categories

How to Connect Claude Code to Your WooCommerce Store

4 min read

You will have: Claude Code connected to your store, able to do what you allowed on the Permissions tab.
Time: About 5 minutes
You need: Claude Code installed on your computer, your role turned on under Access & Roles (click Save Changes), and at least one permission turned on for your role on the Permissions tab. Not set up yet? Follow How to Turn On Your Role and Choose What the AI Can See.

Claude Code is Claude’s app for your computer’s terminal (the window where you type commands). AI Gateway gives you a ready-made message to paste into it. Claude Code then connects itself to your store. The message also tells it not to change any settings on your site.

Step 1: Open the AI coding agent guide #

Go to 1TeamSoftware → AI Gateway → Connection. Under Connect an AI client, click anywhere on the AI coding agent row to open it. It covers Claude Code, Cursor and Windsurf.

Step 2: Click Copy agent prompt #

Click Copy agent prompt.

AI Gateway Connection tab with the AI coding agent guide open and the Copy agent prompt button highlighted

The button changes to Copied! for a moment.

Please note: Claude Code runs on your computer, so your store does not need to be public on the internet. There is no tunnel to set up.

Step 3: Paste the prompt into Claude Code #

Open Claude Code, paste the prompt and press Enter.

Claude Code adds a server called ai-gateway. If it asks for permission to run a command, allow it.

Please note: The copied prompt may tell you to use the “Access tab”. There is no tab with that name: the real tabs are Access & Roles and Permissions. The prompt may also say to sign in as an administrator; if you turned on the MCP Bot role instead, sign in with your MCP Bot user.

Please note: The first time you open Claude Code in a folder, it asks Is this a project you created or one you trust? Choose Yes, I trust this folder. It is asking about the folder you started Claude Code in, not about your store.

Please note: Would you rather run the command yourself? The prompt only runs one command. Run this in your terminal (inside Claude Code, start the line with !), with your own MCP Server URL (the row labelled MCP Server URL at the top of Connect an AI client):

claude mcp add --transport http ai-gateway 'https://your-store.com/wp-json/ai-gateway/mcp'

Step 4: Restart Claude Code #

Close Claude Code and open it again.

Step 5: Start the sign-in #

Type /mcp and press Enter. Choose ai-gateway, then choose Authenticate.

Your web browser opens a page from your store.

Please note: If no browser opens, Claude Code prints a web address in the terminal. It is broken over several lines; copy all of it into your browser.

Step 6: Approve Claude Code on your store #

Sign in with the WordPress user whose role you turned on under Access & Roles, then click Authorize.

The page says Signed in as with the name of the WordPress user you are signed in as. If that is not the user whose role you turned on, log out in another tab (Howdy → Log Out), then type /mcp, choose ai-gateway, Authenticate, and sign in as that user.

Please note: The page may say the app is not verified by this site. That is normal: Claude Code registered itself with your store a moment ago, so your store has not seen it before. The page also lists exactly what the app may do, such as Products with Read.

Step 7: Check that Claude Code can see your store #

Type /mcp, choose ai-gateway and open View tools.

You should now see the tools Claude Code can use, listed under ai-gateway. Press Esc until the menus close, then give it a quick test, like “How many products do I have?”

If it did not work #

  • Claude Code connects but shows no tools: the role you signed in with has nothing turned on yet. Go to AI Gateway → Permissions, turn on at least Read for something, click Save access policy, then type /mcp, choose ai-gateway and sign in again. Still no tools? Check that Integrations has the parts of your store you want switched on. How to Choose Which Parts of Your Store the AI Can Use
  • “MCP access not granted” instead of the sign-in page: go to AI Gateway → Access & Roles, turn on your role, click Save Changes, and try again. How to Fix Common Problems
  • Claude Code still says an MCP server needs authentication: type /mcp first and look at ai-gateway. If it says Connected, you are done and the warning on the start-up screen is out of date. If it does not, choose ai-gateway, then Authenticate, and approve it again.
  • Claude Code says you have hit a usage limit: that is your Claude subscription’s own limit, not your store or AI Gateway. Check /mcp as above; if it says Connected, the store side is done. Try again when the limit resets, or ask from another AI app.

Questions people ask #

Is this the same as connecting Claude Desktop or claude.ai? #

No. Claude Code runs in your terminal and is set up with the agent prompt from the Connection tab. For claude.ai or Claude Desktop, follow How to Connect Claude.

Can I add my store to Claude Code by typing the command myself? #

Yes. Add --scope user to the command in Step 3 to make your store available in every folder, not only the one you ran it in; the copied agent prompt leaves that out:

claude mcp add --transport http --scope user ai-gateway 'https://your-store.com/wp-json/ai-gateway/mcp'

Can Claude Code change my store? #

Only what your role allows on the Permissions tab. Out of the box, everything is switched off.

Next step #

How to See What the AI Changed in Your Store

Get AI Gateway: the free version is on the AI Gateway product page. Choose Free Version under License Type.

Leave a Reply

1TeamSoftware
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.