AI assistants (MCP)
Shipping Zones by Drawing Premium 3.4.0 and newer can let an AI assistant read and change your delivery setup: drawn zones, shipping origins, the store location, WooCommerce shipping zones and Shipping Zones by Drawing shipping methods. The assistant can also test which shipping methods a delivery address gets. It works through the WordPress Abilities API and the MCP Adapter plugin.
The assistant acts as a WordPress user and can only do what that user is allowed to do. Every change is logged.
Requirements
Section titled “Requirements”- Shipping Zones by Drawing Premium 3.4.0 or newer
- WordPress 6.9 or newer (the Abilities API is part of WordPress core from 6.9)
- WooCommerce 8.0 or newer and PHP 7.4 or newer
- The MCP Adapter plugin, installed and active
- An AI client that supports MCP, for example Claude Desktop, Cursor or VS Code
On older WordPress versions the plugin works as before; the AI functions are simply not available.
Turn it on
Section titled “Turn it on”The function is off by default. Turn on AI assistant access (MCP) in the Advanced settings of the plugin. Turning it off again removes all AI functions immediately.
Who can do what
Section titled “Who can do what”- Users who can manage WooCommerce (Shop Manager and Administrator) can read the setup and make changes.
- Moving zones or origins to the trash and replacing the regions of a WooCommerce shipping zone also need a site Administrator.
- Reading the plugin’s logs and turning on logging of Google requests also need a site Administrator.
- All changes are a preview by default (
dry_run). The assistant shows what would change, and nothing is saved until it asks again withdry_runset to false. Ask the assistant to show you the preview before it saves. - New zones, origins and shipping methods are saved as drafts or disabled unless you ask for them to be published or enabled.
- The assistant creates new shipping methods rather than changing the ones your customers use today. Changing the area or price of an enabled method is refused unless the assistant confirms that you asked for exactly that.
- Trashed zones and origins can be restored from the trash in the admin. A zone or origin that a shipping method uses can not be trashed.
- Every change is logged under WooCommerce > Status > Logs with the source
szbd-mcp.
The assistant never sees your Google API keys and can not change them. Outside shipping (shipping zones, shipping methods and Local Pickup) it can not change WooCommerce settings such as the shop currency. Shipping methods from other plugins can only be enabled or disabled.
Connect an AI assistant
Section titled “Connect an AI assistant”1. Choose a WordPress user
Section titled “1. Choose a WordPress user”Use a user that can manage WooCommerce. A separate user for the assistant makes it easy to see its changes and to remove its access later.
2. Create an Application Password
Section titled “2. Create an Application Password”- In the WordPress admin, go to Users > Profile (or edit the user).
- Under Application Passwords, enter a name, for example “AI assistant”, and click Add New Application Password.
- Copy the password. WordPress shows it only once.
Application Passwords need HTTPS on a live site.
3. Add the server to your AI client
Section titled “3. Add the server to your AI client”The MCP endpoint of your site is:
https://example.com/wp-json/mcp/mcp-adapter-default-serverReplace https://example.com with the Site Address (URL) from Settings > General.
Most desktop clients connect through the @automattic/mcp-wordpress-remote helper, which needs Node.js. Example configuration for Claude Desktop (Settings > Developer > Edit Config) or Cursor (.cursor/mcp.json):
{ "mcpServers": { "my-shop": { "command": "npx", "args": ["-y", "@automattic/mcp-wordpress-remote@latest"], "env": { "WP_API_URL": "https://example.com/wp-json/mcp/mcp-adapter-default-server", "WP_API_USERNAME": "your-username", "WP_API_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx" } } }}Never share the Application Password in support tickets or chats. More connection options are described in the MCP Adapter documentation.
4. Test the connection
Section titled “4. Test the connection”Restart the client and ask the assistant to “get the Shipping Zones by Drawing status”. A reply with the plugin version means it works.
- 401 / not allowed: wrong username or Application Password, or the user can not manage WooCommerce.
- 404 or no route: MCP Adapter is not active or the URL is wrong.
- No Shipping Zones by Drawing functions: AI assistant access (MCP) is turned off, or WordPress is older than 6.9.
How the assistant learns the plugin
Section titled “How the assistant learns the plugin”The assistant starts with szbd/get-guide. It explains how WooCommerce chooses a shipping zone, how WooCommerce’s own shipping methods work, how the plugin’s zones, origins and methods work, step-by-step recipes for common setups, and how to solve common problems. It links to this documentation and to WooCommerce’s guides for shipping zones, Flat rate, Free shipping and Local pickup. Error messages and setup problems include a link to the matching section of the documentation.
The guide tells the assistant to change only what you ask for, to create new methods rather than change existing ones, and to tell you about every side effect before saving.
szbd/get-setup-overview checks the whole setup without calling Google and lists problems, for example a WooCommerce shipping zone that catches all addresses above your other zones, or a method that uses a draft zone. Ask the assistant to run it before and after changes.
Example requests
Section titled “Example requests”- “Explain my current delivery setup.”
- “Create a delivery zone with a 5 km radius around the store, with free delivery from 500 and 49 below that.”
- “Which shipping methods does Storgatan 1, Stockholm get?”
- “Import the zones from this KML file from Google My Maps.” (paste the file content)
- “Why do customers in my zone see no shipping options?”
- “Check the logs: why did Google reject the last addresses?”
Abilities
Section titled “Abilities”All names start with szbd/.
| Ability | Type | What it does |
|---|---|---|
get-guide |
Read | How WooCommerce and the plugin work, recipes and documentation links. |
get-status |
Read | Version, server mode, route provider, whether Google keys are set, store location, currency, counts, the last error from Google and whether request logging is on. |
get-setup-overview |
Read | Checks the setup and lists problems with documentation links. |
get-settings |
Read | Plugin settings the assistant may change. |
list-zones / get-zone |
Read | Drawn delivery zones, optionally with their points. |
list-origins |
Read | The store location and additional shipping origins. |
list-shipping-methods |
Read | WooCommerce shipping zones in check order and their methods. |
list-categories |
Read | Product categories, for category restrictions. |
describe-wc-method |
Read | The settings of WooCommerce’s Flat rate, Free shipping or Local pickup on your site. |
get-local-pickup |
Read | Local Pickup of the Checkout block: settings and pickup locations. |
list-shipping-classes |
Read | Shipping classes, for extra costs per shipping class. |
check-address |
Read | Which methods and rates an address or coordinates get, optionally for a test cart with items. |
geocode-address |
Read | Coordinates for an address. |
make-circle |
Read | Points of a circle, without saving. |
set-store-location |
Change | Sets the store location. |
create-zone / update-zone / set-zone-status |
Change | Creates, changes, publishes or unpublishes a drawn zone. |
combine-zones |
Change | Creates a new zone from two zones, circles or polygons: union, intersection or difference (for example “within 5 km but not in the city centre”). |
import-kml |
Change | Creates zones from pasted KML text (no URLs, at most 50 polygons). |
import-geojson |
Change | Creates a zone from a GeoJSON outline, for example a district or municipality from OpenStreetMap. Holes and several parts are kept, and the outline is simplified. |
create-origin / update-origin |
Change | Creates or changes a shipping origin. |
create-wc-shipping-zone / update-wc-shipping-zone |
Change | Creates a WooCommerce shipping zone, or changes its name or order. |
create-shipping-method / update-shipping-method |
Change | Adds or changes a Shipping Zones by Drawing method. |
set-shipping-method-enabled |
Change | Enables or disables a shipping method. |
create-wc-method / update-wc-method |
Change | Adds or changes WooCommerce’s Flat rate, Free shipping or Local pickup (legacy). |
reorder-shipping-methods |
Change | Sets the order of the methods in a WooCommerce shipping zone. The first one is selected by default. |
update-local-pickup |
Change | Turns Local Pickup of the Checkout block on or off and sets its cost and pickup locations. |
update-settings |
Change | Changes selected plugin settings. |
trash-zone / trash-origin |
Administrator | Moves an unused zone or origin to the trash. |
replace-wc-zone-regions |
Administrator | Replaces all regions of a WooCommerce shipping zone. |
read-logs |
Administrator | Reads the plugin’s logs for troubleshooting: Google server requests with Google’s answer, changes made by the assistant, and PHP fatal errors in the plugin. API keys are always hidden. |
set-google-request-logging |
Administrator | Turns Log Google Server Requests on for a set number of hours (1–72), after which it turns itself off, or turns it off. |
Troubleshooting with logs
Section titled “Troubleshooting with logs”Ask the assistant why something fails, for example “why do customers get no shipping options?”. It starts with get-status, which shows the last error from Google, such as a rejected key, a missing API or an exceeded quota. If it needs more, it asks you before it turns on Log Google Server Requests for a few hours, lets you or check-address repeat the problem, and reads the log with read-logs. Logging turns itself off when the time is up. If you change the setting yourself in the admin, the time limit is removed.
Drawing zones
Section titled “Drawing zones”For a named place, such as a district, a municipality or “the east side of the river”, the assistant is told to fetch the real outline from OpenStreetMap and import it with import-geojson, and to cut along roads or rivers with combine-zones. It should not guess a circle. Map data from OpenStreetMap is © OpenStreetMap contributors (ODbL).
The preview of a new zone shows its area and its distance from the store, and warns if latitude and longitude look swapped, if the zone is far from the store, or if a zone with the same name already exists. Zones are saved as drafts until you publish them. Check the outline on the map before you use a zone, especially along coastlines and roads.
Weaker AI models can still approximate a place instead of fetching its outline. Always look at a new zone on the map before you use it.
Combined zones
Section titled “Combined zones”combine-zones creates a new drawn zone with set algebra, for example “within 5 km of the store but not in the city centre”. The new zone can have holes and separate parts, and the checkout handles them exactly. On the map, holes and parts are joined by thin lines.
The new zone is a copy computed at that moment. If you change one of the zones it was made from, the combined zone does not follow; get-setup-overview then warns, and the assistant can combine the zones again. Don’t edit the shape of a combined zone by hand in the admin.
Pickup
Section titled “Pickup”If your checkout page uses the Checkout block, the assistant uses WooCommerce’s Local Pickup for the Checkout block with pickup locations. It is offered to every customer, regardless of shipping zone. The legacy Local pickup shipping method is only used when pickup must be limited to certain shipping zones.
Google usage
Section titled “Google usage”check-address with coordinates and get-setup-overview do not call Google. geocode-address, check-address with an address, and rates by driving distance or time use your server key and its quota, just like the checkout. Driving distance and time need server mode and a working server key.