cd /news/artificial-intelligence/ai-agent-checkout-in-magento-2-claud… Β· home β€Ί topics β€Ί artificial-intelligence β€Ί article
[ARTICLE Β· art-52931] src=dev.to β†— pub= topic=artificial-intelligence verified=true sentiment=↑ positive

AI Agent Checkout in Magento 2: Claude Places a Real Order via MCP

A developer built an open-source Magento 2 module, angeo/module-mcp-checkout, that enables AI agents like Claude to place real orders via the Model Context Protocol (MCP) without browser automation. The module exposes six MCP tools that map directly to Magento's service layer, allowing an agent to search products, create a cart, set shipping, and place an order after user confirmation. A live demo showed Claude successfully purchasing a Fusion Backpack for $69, with payment handled separately via a deferred method to maintain PCI compliance.

read3 min views1 publishedJul 9, 2026

AI agents can already find products. But can they actually buy them β€” placing a real order in a live Magento 2 store, without browser automation or scraping?

I built angeo/module-mcp-checkout

to answer that, and the short version is: yes. This post walks through the full flow, the architecture, and the one problem everyone asks about β€” payments.

User (Claude.ai)
      ↓
  MCP Client
      ↓
Magento MCP Endpoint  ←  Bearer auth + rate limiter
      ↓
Magento Service Layer
      ↓
  Quote / Cart
      ↓
    Order βœ“

Every checkout runs the same tool sequence. Each call maps directly to a Magento service layer operation β€” no browser, no session, no cookies.

Claude
  ↓
search_products()          β€” find product by keyword
  ↓
get_product()              β€” verify SKU, price, stock
  ↓
create_cart()              β€” open guest cart, get cart_id
  ↓
add_to_cart()              β€” add item by child SKU
  ↓
get_shipping_methods()     β€” estimate delivery options
  ↓
set_shipping_information() β€” apply address + method
  ↓
[User confirms total]
  ↓
place_order()              β€” submit cart β†’ order_number

The module exposes these as six MCP tools over a JSON-RPC endpoint:

create_cart

β€” opens a new guest cartadd_to_cart

β€” adds a product by SKUget_cart

β€” reads current items and totalsget_shipping_methods

β€” estimates available delivery optionsset_shipping_information

β€” sets address, email, and chosen methodplace_order

β€” submits the order after user confirmationNo browser automation, no scraping. The agent talks directly to the Magento backend through a secure, rate-limited MCP endpoint.

place_order

is never called autonomouslyReal session against demo.angeo.dev. The prompt: "I want to buy a Fusion Backpack."

Step 1 β€” Product discovery. Claude called search_products

, then get_product

. It identified the Fusion Backpack (SKU: 24-MB02

), in-stock at $59.

Step 2 β€” Cart. create_cart

returned a fresh cart_id

. add_to_cart

confirmed the item β€” subtotal $59.

Step 3 β€” Shipping. get_shipping_methods

returned Flat Rate β€” Fixed at $10.

Step 4 β€” Address. set_shipping_information

applied name, street, postcode, city, country, phone, email. Total: $69.

Step 5 β€” Confirm & place. After explicit user confirmation, place_order

submitted the cart:

{
  "order_number": "000000005",
  "status": "pending",
  "grand_total": 69,
  "currency": "USD"
}

A real order, in a real Magento store, placed entirely by an AI agent through MCP β€” with the user in control at every step.

This is the question everyone asks, and it deserves an honest answer.

MCP agents can't process card payments directly. Card tokenization requires a PCI-compliant browser form (Stripe.js / Payment Element) β€” fundamentally incompatible with a server-side MCP tool call. This is the same constraint that killed OpenAI's native agentic checkout: collecting card details through an agent violates PCI scope.

My approach sidesteps this by design. The agent places the order with a deferred payment method (status pending

). Payment happens separately:

No extra platform fees β€” only standard gateway rates apply. A dedicated get_payment_link

tool (Stripe, Mollie, Adyen) is planned for v2.0.0.

Is browser automation required? No. JSON-RPC MCP endpoint β€” no headless browser, no Selenium, no Playwright.

Is MCP faster than browser automation? Significantly. No page rendering, no DOM parsing. A full checkout completes in under 5 seconds.

Does this work with Adobe Commerce? Yes β€” Magento Open Source and Adobe Commerce 2.4.x.

Does the agent act autonomously? No. place_order

only fires after explicit user confirmation.

composer require angeo/module-mcp-checkout
bin/magento module:enable Angeo_McpCheckout
bin/magento setup:upgrade

MIT-licensed, part of the open-source angeo.dev Agentic Readiness Suite for Magento 2.

Disclosure: I built this module. It's open-source MIT. Genuinely curious what other Magento devs think about agentic checkout as a direction β€” happy to answer anything about the architecture or MCP tool design in the comments.

── more in #artificial-intelligence 4 stories Β· sorted by recency
── more on @angeo 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/ai-agent-checkout-in…] indexed:0 read:3min 2026-07-09 Β· β€”