# How to Connect Magento 2 to ChatGPT and Claude (2026)

> Connect Magento 2 to ChatGPT and Claude: make the store readable, add it as an MCP connector, or connect your code to Claude Code. Steps and limits.

Source: https://angeo.dev/connect-magento-to-chatgpt-claude/
Updated: 2026-10-09

**"Connecting Magento to ChatGPT or Claude" means one of three different things.** You can make your store readable so the assistants find and cite it. You can connect your live store to an assistant as a connector, so a shopper can search, build a cart and order in the chat. Or you can connect your Magento code to a coding agent such as Claude Code. Each needs different work. This guide covers all three.

*Checked on 7 October 2026. Assistant features and plans change often - check the vendor documentation before you build on a detail here.*

## The three ways at a glance

| | 1. Be found | 2. Store connector | 3. Coding agent |

| **Goal** | ChatGPT and Claude can read and cite your store | A shopper uses your store inside the assistant | A developer works on Magento with AI help |

| **Who uses it** | Anyone asking an assistant | Shoppers who add your connector | Your developers |

| **What you build** | robots.txt, Product JSON-LD, llms.txt, product feed | MCP server on Magento + OAuth 2.1 layer | A developer MCP server on your machine |

| **Effort** | Hours | Days | Under an hour |

| **Brings new customers?** | Yes, this is discovery | No - shoppers must already know you | No - it is a tool for your team |

## Way 1: Make ChatGPT and Claude able to read your store

There is no button that "connects" a store to ChatGPT or Claude. They find stores the way search engines do: their crawlers read your pages. ChatGPT can also read a product feed you send to OpenAI.

1. **Allow the search crawlers in robots.txt.** OAI-SearchBot decides if you can appear in ChatGPT search. Claude-SearchBot indexes for Claude. ChatGPT-User and Claude-User open a page when a person asks about it. Blocking GPTBot or ClaudeBot only stops training - it does not remove you from answers. Remember: a named group in robots.txt does not inherit your `User-agent: *` rules, so repeat your Disallow lines. See [robots.txt for AI crawlers in Magento 2](https://angeo.dev/magento-2-robots-txt-chatgpt-gemini-ai-bots/).

2. **Publish Product JSON-LD on the server.** With `offers.availability` as a full URL such as `https://schema.org/InStock`. Not through Google Tag Manager - most AI crawlers do not run JavaScript. See [Product JSON-LD for AI search](https://angeo.dev/magento-2-product-schema-json-ld-ai-search/).

3. **Add llms.txt.** A short map of your key pages. No AI vendor has promised to read it, but it costs little. See [llms.txt](https://angeo.dev/llms-txt-definition/).

4. **For ChatGPT shopping results, send an ACP product feed.** Apply at chatgpt.com/merchants. As of September 2026 there is a waitlist, and shopping is live for US users. A feed is not required - OpenAI says a store can also appear through crawling - but it gives you control over price and stock. See [ChatGPT Shopping for Magento 2](https://angeo.dev/magento-2-chatgpt-shopping-registration/).

Check the result with the [free AEO scan](https://angeo.dev/ai-magento-audit/) or `bin/magento angeo:aeo:audit`.

## Way 2: Connect your store to ChatGPT or Claude as a connector

A connector uses the **Model Context Protocol (MCP)**. Your store runs an MCP server with tools such as `search_products`, `add_to_cart` and `place_order`. The assistant calls those tools with live data. Claude and ChatGPT both support remote MCP servers.

### Step 1: Install an MCP server on Magento

```
composer require angeo/module-mcp-server angeo/module-mcp-checkout
bin/magento module:enable Angeo_McpServer Angeo_McpCheckout
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
```

Start with the read-only server only. Add `mcp-checkout` when you want orders, and set its limits first: maximum order value, item count and a rate limit. Under **Agent presentation**, set "Store name for agents" to the name your customers use. Check the setup with `bin/magento angeo:mcp:tools`. Other Magento MCP projects exist - see the [comparison of 17 projects](https://angeo.dev/magento-mcp-servers-compared/).

### Step 2: Put an OAuth 2.1 layer in front

Claude and ChatGPT connect to custom connectors through OAuth. With `angeo/module-mcp-server`, the store's own `/mcp` path uses a bearer token and has no OAuth flow, so you cannot paste it into Claude or ChatGPT - the attempt fails with an unclear error. You put an OAuth 2.1 layer in front: it checks the shopper's token and calls Magento with its own credential. See [authentication and exposure](https://angeo.dev/docs/mcp/). Some other Magento MCP modules build OAuth 2.1 into the module itself - compare them in the [MCP server comparison](https://angeo.dev/magento-mcp-servers-compared/). A bearer token is fine for Claude Code (Way 3).

### Step 3a: Add it to Claude

1. Open **Settings -> Connectors** and click **Add custom connector**.

2. Name it after the store and paste the OAuth-capable URL.

3. Leave the advanced Client ID and Secret fields empty if your endpoint supports dynamic registration.

4. Complete the consent step. Set read-only tools to "Always allow" so a search does not stop for a click.

Custom connectors work on Free, Pro, Max, Team and Enterprise plans. The free plan allows one custom connector.

### Step 3b: Add it to ChatGPT

1. In **Settings**, turn on **Developer Mode** (Plus, Pro, Business, Enterprise or Edu; not the free plan).

2. Go to **Apps & Connectors -> Add custom app**, enter the URL and complete the OAuth flow.

3. In a chat, open the tools menu and switch the app on.

### What to expect

The connector wins every question about your store: what you sell, your return policy, shipping to a postcode, the cart. It often loses a cold request that names no shop, such as "find me a grey backpack" - the assistant uses its own product search. A connector is not a discovery channel. It helps people who already know you. Payment never happens in the chat: the order comes back with a payment link to your own gateway. See the [MCP checkout documentation](https://angeo.dev/docs/mcp-checkout/) and [a real order placed by Claude](https://angeo.dev/ai-agent-checkout-in-magento-2-claude-places-a-real-order-via-mcp/).

## Way 3: Connect Magento code to Claude Code

Claude Code is Anthropic's coding agent in the terminal. It can use MCP servers too, so it can read Magento-specific data while it works on your code.

Developer-side options documented by their projects:

- **Magento 2 and Adobe Commerce PhpStorm plugin** - exposes MCP tools from the IDE.

- **n98-magerun2** - includes an MCP server since version 9.3.0, for CLI and database tasks.

- **Adobe Commerce Developer MCP** - Adobe's tooling for Adobe Commerce as a Cloud Service.

Add a server with the `claude mcp add` command, then check it:

```
# an HTTP server
claude mcp add --transport http my-store https://shop.example/mcp --header "Authorization: Bearer YOUR_TOKEN"

# a local command (stdio) server
claude mcp add --transport stdio my-tool -- <command> [args]

claude mcp list      # list servers
# inside Claude Code, type /mcp to see connected servers and tools
```

Use `claude mcp add --help` for all options, and each project's README for its exact start command.

**Be careful with write access.** Developer MCP servers can run CLI commands, edit files and query the database. Point them at a local or staging copy, not production. Treat product descriptions and code comments as data, not instructions - they can carry prompt injection. One project, elgentos magento2-dev-mcp, is marked abandoned and has a published security advisory.

## Which one should you do first?

For most stores: **Way 1 first**. It is the only one that can bring new customers, and it is cheap. Way 2 makes sense when you have customers who would add your store to their assistant, or for internal use - for example merchandisers asking "which in-stock products have no images?". Way 3 is a developer choice and does not change what shoppers see.

## Questions

**Can I connect Magento to ChatGPT without coding?** For Way 1, mostly yes: free Composer modules handle robots.txt, schema, llms.txt and the feed, and a developer can install them in an afternoon. A store connector (Way 2) needs an OAuth layer, which is real engineering work.

**Is there an official Magento app in ChatGPT or Claude?** No built-in one. You use crawling, a product feed, or your own MCP connector.

**Can a shopper pay inside ChatGPT?** Normally not. Since March 2026, purchases that start in ChatGPT finish on the merchant's own site. With an MCP connector, the order comes back with a payment link.

**Is it safe to let an assistant place orders?** Only with limits enforced in Magento, not in the prompt: authentication, order value and quantity caps, rate limits, guest checkout only, and a confirmation before every order.

**Does it cost anything?** The angeo modules are free and MIT-licensed. Discovery in ChatGPT has no fees. Your costs are engineering time and, for a connector, hosting the OAuth layer.

## Related

- [MCP for Magento 2: what an MCP server does](https://angeo.dev/magento-mcp-server/)

- [MCP checkout for Magento 2](https://angeo.dev/docs/mcp-checkout/)

- [Claude Commerce Agents on Magento 2](https://angeo.dev/claude-commerce-agents-magento/)

- [How Gemini and Google AI Mode find Magento products](https://angeo.dev/gemini-google-ai-mode-magento/)

- [GPTBot vs OAI-SearchBot](https://angeo.dev/gptbot-vs-oai-searchbot/)

## Sources

- [OpenAI: overview of OpenAI crawlers](https://developers.openai.com/api/docs/bots)

- [OpenAI: Powering product discovery in ChatGPT (24 March 2026)](https://openai.com/index/powering-product-discovery-in-chatgpt/)

- [Claude Code: MCP documentation](https://docs.claude.com/en/docs/claude-code/mcp)

- [MCP specification 2026-07-28](https://modelcontextprotocol.io/specification/2026-07-28)

Checked 7 October 2026. Disclosure: we build the open-source angeo MCP modules referenced above.
