> ## Documentation Index
> Fetch the complete documentation index at: https://aiodapp.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AIOD MCP server

> Connect AIOD Discount & Gift to Claude, ChatGPT, Cursor, VS Code, or any AI agent so it can read, build, and report on your Shopify discounts.

The AIOD MCP server lets an AI assistant work with the discounts on your Shopify store.

Once it is connected, you can just ask. "What discounts am I running?" "How much did the BOGO make last month?" "Set up 20% off the Summer collection for July." The assistant reads your real discounts, builds new ones against AIOD's actual rules, and hands you a link to review and save.

<Info>
  **Using Claude?** AIOD is in the connector directory — open the [**AIOD Discounts & Free Gift** listing](https://claude.ai/directory/aiod-discounts-free-gift) and click **Connect**.

  **ChatGPT, Cursor, VS Code or anything else?** Paste `https://aiod-automatic-discount.com/mcp` into your client. The [Quickstart](/docs/mcp-server/quickstart) has the steps for each one.
</Info>

## What it feels like to use

<CodeGroup>
  ```text You theme={null}
  Which of my discounts made the most money in June?
  ```
</CodeGroup>

The assistant lists your discounts, pulls the numbers for each one, and answers — with real order counts and revenue from the same data as your AIOD **Analytics** tab.

<CodeGroup>
  ```text You theme={null}
  Set up a free tote bag for anyone spending over $75.
  ```
</CodeGroup>

The assistant reads AIOD's gift rules, builds the offer, checks it against a simulated cart, and gives you a link. You open it, look it over, and save. **Nothing goes live until you say so.**

## What it can do

Five things it can read:

|                         |                                                                                                                 |
| ----------------------- | --------------------------------------------------------------------------------------------------------------- |
| **List your discounts** | Every AIOD discount on the store, with its name, status, and type.                                              |
| **Read one in detail**  | Exactly what a discount requires and what it gives. This is what answers "why isn't this applying at checkout?" |
| **Report performance**  | Orders, revenue, and margin given away, for any date range.                                                     |
| **Read AIOD's rules**   | The templates and field shapes a discount has to be built against.                                              |
| **Search these docs**   | Setup, widgets, stacking, POS, and troubleshooting.                                                             |

Two things it can write:

|                         |                                                                               |
| ----------------------- | ----------------------------------------------------------------------------- |
| **Draft a discount**    | Builds the offer and gives you a link. **Creates nothing in Shopify.**        |
| **Create in test mode** | Creates a real Shopify discount that only applies to your test email address. |

Full detail in the [tool reference](/docs/mcp-server/tools).

## What it cannot do

This matters more than the list above, so it is worth being blunt.

* **It cannot make a discount live.** Everything it creates stays in test mode until you open it in AIOD and switch it on yourself. There is no tool that flips that switch.
* **It cannot delete a discount.**
* **It cannot see your orders, customers, or products.** Performance figures come back as totals only — never individual orders or customer records.
* **It only reaches the one store you connected.** Connect each store separately.
* **It only covers AIOD's automatic discounts.** Discount codes, and discounts you made directly in Shopify or with another app, are invisible to it.

## Is it safe?

Short version: yes, and here is why.

**You approve it inside your own Shopify admin.** The connection is not established by anything you type into your AI client. It is established when you log into Shopify and approve it there. That is the only thing that decides which store gets connected.

**Read the approval screen.** It shows the name of the app asking *and* the web address your access will be sent to. The name is chosen by whoever built the client and is not verified by anyone. The address is checked against a registered list and cannot be faked. If you did not just start this from your AI client, or you do not recognise the address, close the page.

**Access expires.** Sign-in tokens last an hour and are refreshed automatically. Nothing is ever stored in a readable form.

**Uninstalling AIOD ends it.** So does asking support to revoke your store's access.

The [Claude connector page](/docs/mcp-server/claude) has the full detail on what data leaves your store, what is stored, and for how long.

## Get started

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/docs/docs/mcp-server/quickstart">
    Connect Claude, ChatGPT, Cursor, or VS Code. About five minutes.
  </Card>

  <Card title="Claude connector" icon="message-circle" href="/docs/docs/mcp-server/claude">
    The Claude-specific walkthrough, plus data handling and security in full.
  </Card>

  <Card title="What you can build" icon="sparkles" href="/docs/docs/mcp-server/use-cases">
    Free gifts, BOGO, volume breaks, conditional offers — and how to ask for each.
  </Card>

  <Card title="Examples" icon="terminal" href="/docs/docs/mcp-server/examples">
    Real requests, and exactly what the assistant does with them.
  </Card>
</CardGroup>

<Note>
  Building your own agent or MCP client? The [Agent guide](/docs/mcp-server/agent-guide) is the workflow to follow, and the [tool reference](/docs/mcp-server/tools) has every parameter and response shape.
</Note>

## Technical summary

For anyone wiring this up by hand:

|                    |                                                           |
| ------------------ | --------------------------------------------------------- |
| Server URL         | `https://aiod-automatic-discount.com/mcp`                 |
| Transport          | Streamable HTTP, stateless — `POST` only                  |
| Authentication     | OAuth 2.1 with PKCE (`S256`), dynamic client registration |
| Scope              | `aiod:discounts`                                          |
| Protocol revisions | `2025-06-18`, `2025-03-26`, `2024-11-05`                  |
| Tool timeout       | 60 seconds                                                |

Your client can discover everything else on its own from `/.well-known/oauth-protected-resource` and `/.well-known/oauth-authorization-server`. You should not need to configure anything beyond the server URL.

A few things that trip people up: `GET /mcp` returns `405` because the server never opens an event stream, and JSON-RPC batched requests (a JSON array) are rejected. Both are expected.
