Tell your AI agent what you want, such as “Add Category, Colour and Price filters to my shop”, and it will create your query and filters in Search & Filter. You can then add them to your page using the Search & Filter block or a shortcode.
In this guide, we’ll walk you through the full process from start to finish – by connecting Claude to a WooCommerce store and asking it to add filters to the shop.
Requirements
- WordPress 6.9 or newer
- Search & Filter Pro 3.3 or newer
- Administrator user
- The MCP Adapter plugin (free, from WordPress)
- An AI agent that supports MCP, e.g. Claude Desktop, Claude Code, Cursor, Gemini or Codex
- Node.js on your computer (used by the connection in Step 1)
- Your site must use HTTPS
Step 1: Connect your AI agent to your site
Install the MCP Adapter
Go to Plugins → Add New, search for MCP Adapter and click Install Now, then Activate. It’s the free MCP Adapter plugin by WordPress.org. For more information, see the official page.
Create an application password
Go to Users → Profile and scroll to Application Passwords. Enter a name like AI agent and click Add New Application Password. Copy the password; WordPress only shows it once.
Add your site to your AI app
Option 1: Ask your AI agent to set it up
Copy the text below, replace the three highlighted values with your own, and paste it into your AI agent. It updates its own settings and tells you when it’s done. This works in AI apps that can edit files on your computer, such as Claude Code, Claude Cowork and Cursor.
Note: If you choose this option, you will be pasting your application password in plain text to your agent.
Replace yoursite.com with your own site’s address, and your-admin-username / your-application-password with the username and application password from the step above.
Set up an MCP connection to my WordPress site so you can use its abilities.
Use the @automattic/mcp-wordpress-remote package (run it with npx) and these details:Server name: my-wordpress-site
WP_API_URL: https://yoursite.com/wp-json/mcp/mcp-adapter-default-server
WP_API_USERNAME: your-admin-username
WP_API_PASSWORD: your-application-passwordAdd it to your MCP settings without removing any existing servers, then tell me when it’s ready and whether I need to restart the app.
Option 2: Edit the config file yourself
Choose your app and add the following to its MCP settings.
Note: Replace yoursite.com with your own site’s address, and your-admin-username / your-application-password with the username and application password from the step above.
If you already have other MCP servers set up, add this one alongside them rather than replacing them. We recommend saving a copy of your config before you change it.
Go to Settings → Developer → Edit Config, add the following, then restart Claude Desktop.
{
"mcpServers": {
"my-wordpress-site": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
"env": {
"WP_API_URL": "https://yoursite.com/wp-json/mcp/mcp-adapter-default-server",
"WP_API_USERNAME": "your-admin-username",
"WP_API_PASSWORD": "your-application-password"
}
}
}
}Go to Settings → Tools & MCP → Add Custom MCP and add the following.
{
"mcpServers": {
"my-wordpress-site": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
"env": {
"WP_API_URL": "https://yoursite.com/wp-json/mcp/mcp-adapter-default-server",
"WP_API_USERNAME": "your-admin-username",
"WP_API_PASSWORD": "your-application-password"
}
}
}
}Open ~/.gemini/settings.json and add the mcpServers section below to it. Keep the settings that are already in the file. Then restart Gemini CLI.
{
"mcpServers": {
"my-wordpress-site": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
"env": {
"WP_API_URL": "https://yoursite.com/wp-json/mcp/mcp-adapter-default-server",
"WP_API_USERNAME": "your-admin-username",
"WP_API_PASSWORD": "your-application-password"
}
}
}
}Run this in your terminal:
claude mcp add my-wordpress-site \
-e WP_API_URL=https://yoursite.com/wp-json/mcp/mcp-adapter-default-server \
-e WP_API_USERNAME=your-admin-username \
-e WP_API_PASSWORD=your-application-password \
-- npx -y @automattic/mcp-wordpress-remote@latestAdd the following to ~/.codex/config.toml, then restart Codex. In the Codex IDE extension, you can open this file from the gear menu under MCP settings → Open config.toml.
[mcp_servers.my-wordpress-site]
command = "npx"
args = ["-y", "@automattic/mcp-wordpress-remote@latest"]
[mcp_servers.my-wordpress-site.env]
WP_API_URL = "https://yoursite.com/wp-json/mcp/mcp-adapter-default-server"
WP_API_USERNAME = "your-admin-username"
WP_API_PASSWORD = "your-application-password"Step 2: Check what your AI agent can see
Ask your AI agent:
-> What can you do with Search & Filter on my site?
It should list the Search & Filter abilities: queries, fields, styles, settings and integrations, plus the indexer.
-> List my Search & Filter queries and the fields in each one.
You’ll get a list like “Shop (enabled): Search, Category, Price”. This only reads your setup. Nothing changes.
-> What product categories and attributes does my shop have that I could filter by?
Your AI agent lists your categories, tags and attributes (like Colour and Size), with the values in each, and suggests which ones make useful filters for shoppers.
Step 3: Ask your AI agent to create filters for your shop
Ask: “Set up a Search & Filter query for my WooCommerce shop page.” Your AI agent starts from Search & Filter’s suggested settings, creates the query and tells you what it set up.
Ask: “Add three filters to my shop query: a Category checkbox filter, a Colour filter and a Price range slider.” Your AI agent creates the fields, connects them to the query and rebuilds the search index.
Add the new fields to your shop page like any other field, with the Search & Filter block (Load field) or its shortcode. Your AI agent can’t place them on the page for you.
Visit your shop. Tick a category or a colour, or move the price slider, and watch the products update.
💡Tip: Check the result on your shop page. If something looks off, tell your AI agent what you see and it should fix it.
More things you can ask
Note: Replace https://domain.com with a real website.
| Prompt | What happens |
|---|---|
| Turn on the WooCommerce integration. | Enables the integration |
| Look at my products and suggest the 3 filters shoppers would use most. | Checks your categories and attributes and suggests the most useful ones. Ask it to create the ones you want. |
| Check the brand colours on https://domain.com and create a matching style for my filters. | Creates a new style preset with your brand colours and applies it to your filters (colours, borders and corner radius, not fonts) |
| Compare my shop filters with https://domain.com ’s and tell me what I’m missing. | Looks at their filter sidebar, matches it to your product data, and tells you which filters you could add and which ones your products don’t have the data for. Ask it to create the ones you want. |
| My Category filter has 30 options. Make it easier to use on mobile. | Switches it to a dropdown or a searchable list. |
What your AI agent can and can’t do
| Area | Your AI agent can… |
|---|---|
| Queries | List, view, create, edit and delete queries, and suggest settings for a location (e.g. your WooCommerce shop) |
| Fields (filters) | List, view, create, edit and delete fields, suggest fields for a query, and look up the options a field can show |
| Styles | List, view, create, edit and delete style presets |
| Settings | View and change Search & Filter settings |
| Integrations | See which integrations are available and turn them on or off |
| Search index | Check its status, rebuild it, and pause or resume it |
| It can’t | Place filters on your pages, change your theme or page layout, or see your site’s code and error logs |
Troubleshooting
My AI agent doesn’t see any Search & Filter abilities.
Check that you’re on WordPress 6.9+ and Search & Filter 3.3+, and that the MCP Adapter plugin is active. Restart your AI app after changing its settings.
My AI agent says it doesn’t have permission.
The username in your settings must be an administrator. If it is, create a new application password and update your settings.
The new filter doesn’t show on my page.
Add it to the page with the Search & Filter Load field block or shortcode; your AI agent can’t place it for you. If it shows but has no options, ask your AI agent to rebuild the index.
If you have any questions or issues, contact our support team, and we’ll take a look!