AI agents can already find products in your store. This tutorial shows how to let them actually buy — completing a full guest checkout in Magento 2 through the Model Context Protocol (MCP), with no browser automation.
We'll use angeo/module-mcp-checkout, an open-source MIT module, and walk through the tool sequence, the payment problem, and how to install it.
What you'll build
A Magento 2 store that exposes checkout as six MCP tools, so an AI agent (Claude, ChatGPT, or any MCP client) can:
- Search products
- Create a cart and add items
- Get shipping methods
- Set the shipping address
- Place a real order — after user confirmation
Every checkout runs the same sequence. Each call maps directly to a Magento service-layer operation — no browser, no session, no cookies.
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 SKU
get_shipping_methods() → estimate delivery options
set_shipping_information() → apply address + method
place_order() → submit cart → order_number
Step 1 — Install the module
composer require angeo/module-mcp-checkout
bin/magento module:enable Angeo_McpCheckout
bin/magento setup:upgrade
bin/magento cache:flush
This exposes a JSON-RPC MCP endpoint at https://your-store.com/mcp with Bearer auth, rate limiting, and logging built in.
Step 2 — Connect an AI agent
In Claude: Settings → Connectors → Add custom connector, then paste your endpoint URL. In ChatGPT: enable Developer Mode, then add it as a custom app. The same endpoint works with Perplexity, Grok, and Mistral too — MCP is an open standard.
Step 3 — Run a checkout
Ask the agent: "Find me a backpack and help me check out." It will call search_products, then walk through cart, shipping, and confirmation. Here's the response from a real place_order call:
{
"order_number": "000000005",
"status": "pending",
"grand_total": 69,
"currency": "USD"
}
The order lands in your Magento admin like any other.
The payment problem (important)
MCP agents can't process card payments directly. Card tokenization needs a PCI-compliant browser form — incompatible with a server-side MCP tool call. This is exactly what forced OpenAI to pull its native agentic checkout.
The workaround: the agent places the order with a deferred payment method (status pending), and payment is handled separately — a merchant invoice, a Stripe/Mollie/Adyen payment link, or a redirect to the store's normal checkout page. The whole agent flow stays outside PCI scope. No extra fees beyond standard gateway rates.
Security notes
- Bearer authentication on every request
- Configurable rate limiting
- Operates within Magento's standard ACL
- HTTPS only
place_order never fires without explicit user confirmation
Current scope (v1.0.0)
- Guest checkout only (registered customer support planned)
- Configurable products added by child SKU
- Deferred payment / payment link handoff
- Optional agent order limit in admin
Wrapping up
That's a full agentic checkout in Magento 2 — no Selenium, no Playwright, no scraping. The module is MIT-licensed and part of the open-source angeo.dev Agentic Readiness Suite for Magento 2 / Adobe Commerce.
Have you tried building MCP tools for commerce? I'd be curious how others are handling the payment handoff — drop a comment.