HomeeCommerceSpeak to your retailer prefer it's your AI assistant

Speak to your retailer prefer it’s your AI assistant


Speak to your retailer prefer it’s your AI assistant

That is half one in every of a three-part collection on WooCommerce MCP. This put up covers what MCP is, the way it works, and tips on how to get began with the built-in Talents. Half two covers constructing your first Customized Talents. Half three goes deeper with superior demos and manufacturing issues.

I’ve been deep diving into one thing actually thrilling in WooCommerce: the Mannequin Context Protocol integration (MCP). MCP first shipped as a beta in 10.3 and has been maturing throughout releases. Now, with WooCommerce 10.7 and WordPress 6.9+, the stack is strong sufficient to construct some critically helpful issues on high of it. So, I went forward and did precisely that.

Image this: we’re chatting with an AI assistant, and we are saying one thing like “Present me my low-stock merchandise” or “Create a product referred to as Winter Hoodie for $39.99.” Our WooCommerce retailer responds, does the work, and offers again the outcomes. No clicking by the WordPress Dashboard, no handbook REST API calls. Simply pure dialog turning into actual retailer actions.

That’s what MCP allows. All through this put up, I’ll be utilizing Claude Code because the AI assistant, however MCP works with any suitable shopper: Cursor, VS Code, or the rest that speaks the MCP protocol. Use no matter works greatest for you.

Let’s discover it collectively!

Consider MCP as a common translator between AI instruments and our WooCommerce retailer. Usually, if we would like AI to work together with our retailer, we’d must:

  • Construct customized REST API integrations.
  • Deal with authentication ourselves.
  • Write a bunch of code to parse responses.

MCP modifications all that. It’s an open-source customary that lets AI assistants like Claude, Cursor, or VS Code discuss on to techniques like WooCommerce utilizing pure language.

With MCP:

  • AI can uncover what our retailer can do.
  • AI can carry out these actions safely.
  • All the pieces works inside our current permissions.

So after we say, “Listing all merchandise underneath $20 USD,” MCP interprets that into one thing WooCommerce understands, runs it securely, and brings again the outcomes.

Three items work collectively to make this occur, they usually all construct on current WooCommerce safety.

The constructing blocks

WordPress Talents API

The WordPress Talents API is a manner for WordPress plugins to register “Talents”, principally issues they’ll do. Consider it like a menu: WooCommerce tells WordPress, “Right here’s all the pieces I can do”, and AI assistants can learn that menu and choose what they want. Every skill has a reputation like:

  • woocommerce/products-list: checklist all merchandise
  • woocommerce/orders-create: create a brand new order

The Talents API shipped in WordPress 6.9 as a core characteristic. It offers a standardized registry that any plugin can hook into, so WooCommerce now not must bundle it individually. For these constructing Customized Talents, they’re registered on the wp_abilities_api_init hook (extra on this within the half two of the collection).

WordPress MCP Adapter

The MCP Adapter is the translator. It takes MCP messages from AI assistants and converts them into one thing WordPress understands. Consider it because the intermediary that speaks each “AI protocol” and “WordPress.”

WooCommerce REST API

The present MCP Talents bridge to current REST API endpoints. This implies the prevailing REST API permissions nonetheless management all the pieces, and the safety stays precisely the identical.

Sooner or later, Talents may transcend REST and do much more highly effective issues. However for now, this provides us a strong, safe basis.

The move of communication

After we sort “checklist all merchandise” in Claude Code, right here’s what occurs step-by-step:

AI Consumer (Claude, and so on.)

    ↓ (MCP protocol over stdio/JSON-RPC)

Native MCP Proxy (mcp-wordpress-remote)

    ↓ (HTTP/HTTPS requests with authentication)

Distant WordPress MCP Server (mcp-adapter)

    ↓ (WordPress Talents API)

WooCommerce Talents

    ↓ (REST API calls or direct operations)

WooCommerce Core

In plain phrases, Claude Code sends a message to a small proxy device operating on our machine. The proxy converts it to a safe internet request and sends it to our WordPress web site’s MCP endpoint. The MCP Adapter seems up which skill to run, the flexibility’s callback executes (querying orders, merchandise, and so on.), and the outcome flows again the identical manner.

The native proxy (@automattic/mcp-wordpress-remote) is a small Node.js device we set up as soon as throughout setup after which neglect about. Its job is to translate between the best way AI shoppers talk (stdio) and the best way WordPress works (HTTP).

MCP landed as a beta in WooCommerce 10.3 with product and order Talents. The replace since then was the MCP Adapter v0.3.0 migration in 10.4, which up to date the transport layer. Since then, the MCP floor has been secure by 10.5, 10.6, 10.6.1, and 10.7, which is what we’re constructing on.

MCP remains to be in developer preview, so the built-in Talents are restricted to product and order CRUD (create, learn, replace, delete). However the basis is strong, and that’s the place Customized Talents are available.

Out of the field, WooCommerce ships with 9 MCP Talents:

Merchandise: woocommerce/products-list, products-get, products-create, products-update, products-delete

Orders: woocommerce/orders-list, orders-get, orders-create, orders-update

That is already highly effective sufficient to construct some actually cool workflows. However the place it will get actually fascinating is Customized Talents, and that’s what we’ll dive into partly two of this collection.

Conditions

  • A staging web site (WooCommerce MCP is in developer preview)
  • WooCommerce 10.7 (or 10.3+)
  • WordPress 6.9+ (for the core Talents API)
  • Node.js 22+ (required by the newest mcp-wordpress-remote)
  • REST API key with read_write permissions
  • An MCP shopper (I’ll use Claude Code). Notice: Claude Code requires a Claude Professional or Max plan ($20/mo+) or Anthropic API credit. It’s not obtainable on the free tier.

Enabling MCP

Choice 1: Head over to WordPress DashboardWooCommerceSettingsSuperiorOptions and allow WooCommerce MCP.

Choice 2: Allow by way of WP-CLI

wp possibility replace woocommerce_feature_mcp_integration_enabled sure

Organising the connection

Create an API key

  • Go to WordPress DashboardWooCommerceSettingsSuperiorREST API.
  • Click on “Add Key.”
  • Set permissions to “Learn/Write.”
  • Save the patron key and secret.

Configure Claude Code

Open the Terminal and run:

claude mcp add woocommerce_mcp 

  --env WP_API_URL=https://yourstore.com/wp-json/woocommerce/mcp 

  --env CUSTOM_HEADERS='{"X-MCP-API-Key": "YOUR_CONSUMER_KEY:YOUR_CONSUMER_SECRET"}' 

  -- npx -y @automattic/mcp-wordpress-remote@newest

Essential:

  • Substitute yourstore.com with the precise staging web site URL.
  • Substitute the YOUR_CONSUMER_KEY:YOUR_CONSUMER_SECRET half with the precise API credentials.
  • Restart Claude Code to load the brand new configuration.

For native growth with HTTP: For testing regionally with out HTTPS, add this filter:

add_filter( 'woocommerce_mcp_allow_insecure_transport', '__return_true' );

Let’s discover the default Talents that include WooCommerce. These work immediately with zero customized code.

Listing all merchandise

Ask AI shopper: Listing all merchandise within the retailer.”

What occurs behind the scenes:

  • MCP calls the flexibility: woocommerce/products-list
  • Returns product information with names, costs, inventory standing, and so on.

Create a product

Do that: Create a product named ‘Demo Hoodie’ priced at $29.99.”

MCP calls:

  • Potential: woocommerce/products-create
  • Consequence: A brand new product seems within the retailer!

Replace a product

Say: Replace the Demo Hoodie worth to $39.99.”

MCP calls:

  • Potential: woocommerce/products-update
  • The worth modifications immediately!

Create an order

Strive:Create an order for product ID 56 with amount 2.”

MCP calls:

  • Potential: woocommerce/orders-create
  • A brand new order is created!

Fairly superb, proper? These built-in Talents make AI-assisted retailer administration really feel pure. And that is only the start!

Partly two, we’ll transcend the built-ins and construct Customized Talents from scratch — together with a At this time’s Gross sales Analytics dashboard, a Low Inventory Alert, and a Buyer Lookup device. See you there!

Get your business started on WooCommerce
Kamlesh Vidhani Avatar

Kamlesh is a Happiness Engineer at WooCommerce. He loves serving to prospects get essentially the most out of WordPress and WooCommerce — the extra he sees what’s attainable for them, the extra excited he will get. Outdoors of Woo, you’ll discover him exploring new tech or a gadget, touring with no mounted plans, or watching cricket with unreasonable depth.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments