This guide explains how to connect a supported WooCommerce extension to Claude or Codex using the Model Context Protocol (MCP).
After connecting, an authorized store manager can use natural-language requests to inspect and manage the features exposed by the extension through MCP. The exact tools and actions available depend on the extension and the permissions configured for the connection.
Values used in this guide
↑ Back to topReplace the following example values with the values provided by your extension:
| Example | Replace with |
|---|---|
| https://yourwebsite.com | Your WooCommerce store URL without a trailing slash |
| mcp_store_user | The WordPress username used for the MCP connection |
| xxxx xxxx xxxx xxxx xxxx xxxx | The WordPress Application Password generated for the MCP user |
| [MCP Endpoint] | The MCP endpoint displayed by your extension |
| [MCP Connection Name] | A friendly name for the connection, such as addify-store |
Your extension will provide an MCP endpoint similar to:
https://yourwebsite.com/wp-json/[mcp-endpoint]/mcp
Use the endpoint displayed in your extension’s MCP settings. Do not use your normal WordPress login password in the MCP connection settings.
Part 1: Prepare the WooCommerce store
↑ Back to topStep 1: Check the permalinks
↑ Back to top- Sign in to WordPress Admin.
- Go to Settings → Permalinks.
- Select any permalink structure except Plain. Post name is a suitable option.
- Click Save Changes, even if the correct structure is already selected.
Step 2: Check the MCP Adapter
↑ Back to topThe extension uses the shared WordPress/WooCommerce MCP Adapter. It does not need to install a separate copy.
Use one of the following methods:
- Download the latest release from the official WordPress MCP Adapter releases page, then install and activate the plugin ZIP; or
- Enable WooCommerce’s MCP integration if your WooCommerce version includes the shared MCP Adapter.
Step 3: Enable the extension’s MCP server
↑ Back to top- Open the extension’s settings in WordPress Admin.
- Open the AI Assistant or Model Context Protocol (MCP) settings provided by the extension.
- Turn on Enable MCP tools.
- Leave Allow MCP write requests turned off for the initial connection test.
- If execution modes are available, select Approval Mode for the initial setup.
- Configure any available feature or permission controls to determine which extension features the MCP client can access.
- Save the settings and reload the page.
- Confirm that MCP is enabled and copy the MCP endpoint displayed by the extension.
The AI provider used by an extension’s built-in AI Assistant is separate from MCP. Claude or Codex uses its own model and calls the tools exposed by the extension through MCP.
Step 4: Create an Application Password
↑ Back to top- Go to Users → Add New User to create a dedicated MCP user, or select an appropriate existing WordPress user.
- Open Users → Profile for the MCP user.
- Scroll to Application Passwords.
- Enter a descriptive name, such as Claude MCP or Codex MCP.
- Click Add New Application Password.
- Copy the generated password immediately and store it securely.
Application Passwords are separate from the user’s normal WordPress login password and can be revoked without changing the login password.
Step 5: Check the WordPress REST API
↑ Back to topOpen the following address in your browser:
https://yourwebsite.com/wp-json/
You should see a JSON response. If the address returns a normal website 404 page, check your permalink and server rewrite configuration before continuing.
Do not expect the MCP endpoint itself to display a normal web page. Depending on the request, an authentication error, method error, or MCP protocol response may be expected.
Part 2: Connect Claude
↑ Back to topYou can connect using Claude Desktop or Claude Code. You only need to configure one method.
Method 1: Claude Desktop
↑ Back to topStep 1: Open the Claude configuration
- Open Claude Desktop.
- Go to Claude → Settings → Developer.
- Under Local MCP servers, select Edit Config.
Step 2: Add the server
Add the following entry to the mcpServers object. Replace the endpoint, username, Application Password, and connection name with your own values.
{
"mcpServers": {
"[MCP Connection Name]": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
"env": {
"WP_API_URL": "https://yourwebsite.com/wp-json/[mcp-endpoint]/mcp",
"WP_API_USERNAME": "mcp_store_user",
"WP_API_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
}
}
}
}
If the configuration already contains other MCP servers, add the new connection inside the existing mcpServers object. Do not remove the existing entries, and ensure the JSON syntax remains valid.
Step 3: Restart Claude Desktop
- Save the configuration file.
- Fully quit Claude Desktop.
- Open Claude Desktop again.
- Return to Settings → Developer and confirm that your MCP connection shows a running or connected status.
Step 4: Perform a read-only test
Start a new conversation and enter a read-only request appropriate for the extension. For example:
Use the connected WooCommerce extension tools to show me the information available through this extension. This is a read-only request. Do not make any changes.
Claude may ask for permission before calling a tool. Review the request before allowing it.
Method 2: Claude Code
↑ Back to topOpen a terminal on the computer where Claude Code is installed. Replace the connection name, endpoint, username, and Application Password, then run:
claude mcp add [MCP Connection Name] \
--scope user \
--transport stdio \
--env 'WP_API_URL=https://yourwebsite.com/wp-json/[mcp-endpoint]/mcp' \
--env 'WP_API_USERNAME=mcp_store_user' \
--env 'WP_API_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx' \
-- npx -y @automattic/mcp-wordpress-remote@latest
To confirm the connection, run:
claude mcp list
Your MCP connection should show Connected. Inside Claude Code, you can also use:
/mcp
Part 3: Connect Codex
↑ Back to topYou can add the MCP server using Codex CLI. Replace the connection name, endpoint, username, and Application Password with your own values.
codex mcp add [MCP Connection Name] \
--env 'WP_API_URL=https://yourwebsite.com/wp-json/[mcp-endpoint]/mcp' \
--env 'WP_API_USERNAME=mcp_store_user' \
--env 'WP_API_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx' \
-- npx -y @automattic/mcp-wordpress-remote@latest
To confirm that the server has been added, run:
codex mcp list
If the Codex desktop app or IDE extension was already open, restart it after adding or modifying the MCP connection. You can also use /mcp in supported Codex interfaces to inspect connected servers.
Part 4: Safely test store changes
↑ Back to topComplete a successful read-only test before enabling MCP write requests.
- Return to the extension’s MCP or AI Assistant settings in WordPress Admin.
- If available, keep Approval Mode selected.
- Turn on Allow MCP write requests.
- Save the settings and reload the page.
- Ask Claude or Codex to perform a small, reversible action supported by the extension.
- If approval is required, review the proposed action in WordPress before approving it.
- Confirm the result in the appropriate extension screen.
Always review the exact target and proposed values before approving a write request.
Execution and write controls
↑ Back to topSome extensions may provide execution modes or additional MCP safety controls. The exact options can vary by extension.
| Mode | Typical behavior |
|---|---|
| Suggestion / Advisory Mode | Provides instructions or recommendations without modifying the store. |
| Approval Mode | Requires an administrator to review and approve supported write requests before they are applied. Recommended for production stores. |
| Automatic / Auto-Apply Mode | Applies supported write requests without individual administrator approval. Use only after testing the integration. |
If the extension provides an Allow MCP write requests setting, this acts as an additional safety control. Keep it disabled when you want the MCP connection to remain read-only.
Example requests
↑ Back to topRead-only requests
↑ Back to topShow me the information available through this WooCommerce extension.
List the records available through the connected extension. Do not make any changes.
Summarize the current configuration exposed by this extension.
Write requests
↑ Back to topThe exact write actions depend on the tools exposed by the extension. When supported, you can use requests such as:
Create a new test record using this extension and submit the change for approval.
Update this setting to the specified value. Show me the proposed change before applying it.
Update this record and submit the change for administrator approval. Do not apply it automatically.
Troubleshooting
↑ Back to topThe REST API or MCP endpoint returns 404
↑ Back to top- Go to Settings → Permalinks and select any structure except Plain.
- Click Save Changes.
- Test
https://yourwebsite.com/wp-json/again. - If it still returns a normal website 404 page, contact your hosting provider to check WordPress rewrite rules and REST API access.
MCP Adapter not detected
↑ Back to top- Confirm that your WordPress and WooCommerce versions meet the requirements of the extension and MCP Adapter.
- Install and activate the required WordPress MCP Adapter, or enable the WooCommerce MCP integration if it provides the shared adapter.
- Reload the extension’s MCP settings.
Claude or Codex reports “Failed to connect”
↑ Back to top- Confirm that Node.js and
npxare installed. - Check that
WP_API_URLcontains the complete MCP endpoint without trailing spaces. - Confirm that the WordPress username is correct.
- Generate a new Application Password if necessary.
- Restart Claude or Codex after modifying the connection configuration.
Authentication returns 401
↑ Back to top- Use the correct WordPress username.
- Use the generated Application Password rather than the user’s normal WordPress login password.
- Confirm HTTPS is working correctly.
- Check whether a security plugin, proxy, CDN, or web server is removing the HTTP Authorization header.
A tool returns 403
↑ Back to top- Confirm that MCP tools are enabled in the extension.
- Confirm that the MCP user has the permissions required by the extension.
- Check any feature-level permissions provided by the extension.
- For write requests, confirm that MCP write requests are enabled.
The server connects but extension tools do not appear
↑ Back to top- Confirm MCP is enabled in the extension.
- Check any feature or tool permissions provided by the extension.
- Save the settings and reload WordPress Admin.
- Restart Claude or Codex so it refreshes the MCP tool list.
- Use
/mcpin supported clients to inspect the connection.
Security recommendations
↑ Back to top- Use a dedicated WordPress user for MCP instead of a personal administrator account.
- Give the MCP user only the permissions required by the extension.
- Begin with MCP write requests disabled.
- Use Approval Mode when available on production stores.
- Enable only the extension features and tools that the MCP client needs.
- Test write operations on a staging store before enabling them in production.
- Review the extension’s activity or audit history regularly when available.
- Never share an Application Password in a support ticket, screenshot, chat message, or published configuration.
- Revoke unused Application Passwords under Users → Profile → Application Passwords.
- If a computer containing an MCP configuration is lost or compromised, revoke the associated Application Password immediately.
Disconnect the extension
↑ Back to topFrom WordPress
↑ Back to top- Open the extension’s MCP settings.
- Turn off Enable MCP tools and save the settings.
- Open the MCP user’s WordPress profile.
- Revoke the relevant Application Password.
From Claude Code
↑ Back to topclaude mcp remove [MCP Connection Name]
From Codex
↑ Back to topcodex mcp remove [MCP Connection Name]
For Claude Desktop, remove the corresponding entry from the mcpServers configuration and restart Claude Desktop.