# Storag.ai API

OpenAPI 3.1 spec: https://storag.ai/api/v1/storag/openapi.json

Product search over your own catalog. Send your API key as `Authorization: Bearer <key>` (or `X-API-Key`). Every key searches only its own project. Each key has a per-minute rate limit; over it the API answers 429. The limit is kept by each API instance on its own (two at most today), so a burst can pass up to twice it before the 429; plan for the stated limit. Each plan includes a number of queries a month, counted per project from the 1st (UTC); every search answer shows the count in the X-Storag-Quota-Limit, -Used and -Reset headers. Search never stops at your quota on a paid plan. Free and Trial searches over the quota skip the LLM judge until the 1st (meta.fallback "quota"); Starter and Scale searches past 2 times their quota skip it the same way. Trial is a plan we assign; it is not on the pricing page and has 2,000 queries a month.

How /search answers: a full-text search finds up to 120 candidates inside the query's price, stock and word limits, products that match by meaning are added, and an LLM judge keeps the ones that fit the query, best match first (meta.judged true). Price, stock and sort phrases in the query ("under 150 EUR", "in stock", "cheapest") are applied as filters and taken out of the text the judge reads; every limit of the query holds on judged and unjudged answers alike. If the judge is down, slow or over a limit, the search still answers and meta.fallback says why. /search/text is never judged. /api/v1/storag/health checks.judge says whether the judge is up.

Try it without a key: the /api/v1/storag/demo/* routes search a fictional demo catalog with the same response shapes, and /api/v1/storag/demo/mcp (public URL https://mcp.storag.ai/demo/mcp) is the same as an MCP server. 30 requests a minute and 500 a day per IP.

Product search API for e-commerce, over your own catalog.

Connect your Google Shopping feed (XML, CSV or TSV) by URL and search it through the REST API or the MCP server.

**What search does:** `/search` takes full-text candidates from your catalog, adds products that match by
meaning, and an LLM judge keeps the ones that fit, best match first (`meta.judged: true`). Price, stock and sort
phrases in the query ("under 150 EUR", "in stock", "cheapest") are applied as filters. `/search/text` is plain
full-text, never judged. What `total`, paging and `meta.fallback` mean on a judged answer:
[How /search answers](/docs/api#description/how-search-answers).

**Try it without a key:** the `/api/v1/storag/demo/*` routes search a fictional demo catalog with the same
response shapes, and `https://mcp.storag.ai/demo/mcp` is the same as an MCP server.

```bash
curl 'https://storag.ai/api/v1/storag/demo/search?q=waterproof+hiking+boots+under+150+in+stock&page_size=2&src=docs'
```

**Have a project key?** Your own catalog's MCP server is `https://mcp.storag.ai/mcp`, with your `pk_` key as a Bearer
token: see **4. Connect your AI agent (MCP)** under Getting Started. The recipes below use the demo catalog.

## Try it in your tool (no key)

The demo searches a fictional product catalog. You need no sign-up and no key. Each recipe ends with the first
result you should see. Prefer a browser? [Search the demo catalog on storag.ai](https://storag.ai/demo?src=docs).

- Demo MCP server (Streamable HTTP): `https://mcp.storag.ai/demo/mcp`
- Demo REST search: `https://storag.ai/api/v1/storag/demo/search`

### curl

Search the demo catalog over REST:

```bash
curl 'https://storag.ai/api/v1/storag/demo/search?q=running+shoes&page_size=3&src=docs'
```

With `jq`, print only rank, ID, title and price:

```bash
curl -s 'https://storag.ai/api/v1/storag/demo/search?q=running+shoes&page_size=3&src=docs' \
  | jq '.results[] | {rank, id: .product.id, title: .product.title, price: .product.price.amount}'
```

The same search as one MCP tool call. The server is stateless, so you need no session first:

```bash
curl -s -X POST 'https://mcp.storag.ai/demo/mcp' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_products","arguments":{"q":"running shoes","page_size":3}}}'
```

**First result:** rank 1 is `DEMO-1986`, Granite Owl Alder Waterproof Women's Trail Running Shoes, Olive, 65 EUR.
The MCP call returns the same JSON as text in `result.content[0].text`.

### Claude Code

Add the server from the command line:

```bash
claude mcp add --transport http storag-demo https://mcp.storag.ai/demo/mcp
claude mcp list
```

`claude mcp list` should show `storag-demo: https://mcp.storag.ai/demo/mcp (HTTP) - ✔ Connected`.

Or put it in `.mcp.json` in your project folder, to share it with your team:

```json
{
  "mcpServers": {
    "storag-demo": {
      "type": "http",
      "url": "https://mcp.storag.ai/demo/mcp"
    }
  }
}
```

Keep `"type": "http"`. Without it, Claude Code skips the server. The first time you run `claude` in that
folder, it asks you to approve the server. Until you do, `claude mcp get storag-demo` shows `Pending approval`.

Then ask Claude:

```text
Use the storag-demo search_products tool to find "running shoes". Reply with only the first result: id, title, price.
```

**First result:** `DEMO-1986, Granite Owl Alder Waterproof Women's Trail Running Shoes, Olive, €65`. The wording of
the reply can vary.

### Claude Desktop and claude.ai

In Claude Desktop or on claude.ai, open Connectors (Claude Desktop: Settings > Connectors; claude.ai: https://claude.ai/customize/connectors), then Add, then Add custom connector. Name it `Storag demo`, set the URL to
`https://mcp.storag.ai/demo/mcp`, click **Continue** and choose **No sign-in**. On the Free plan, Claude allows one custom
connector. Claude connects from Anthropic's cloud, so this works from any network.

Then ask Claude:

```text
Use the Storag demo connector to find "running shoes". Reply with only the first result: id, title, price.
```

**First result:** `DEMO-1986, Granite Owl Alder Waterproof Women's Trail Running Shoes, Olive, €65`. The wording of
the reply can vary.

### Cursor

Create `.cursor/mcp.json` in your project, or `~/.cursor/mcp.json` to use the server in every project:

```json
{
  "mcpServers": {
    "storag-demo": {
      "url": "https://mcp.storag.ai/demo/mcp"
    }
  }
}
```

Open **Customize** in the sidebar and check that `storag-demo` is enabled and lists its tools. Then ask the
Agent the same question as in the Claude Code recipe. By default, Cursor asks you to approve each tool call.

**First result:** `DEMO-1986`, Granite Owl Alder Waterproof Women's Trail Running Shoes, Olive, 65 EUR.

### n8n

**For an AI Agent:** add an **MCP Client Tool** node to the agent's Tool input, and set:

- Endpoint: `https://mcp.storag.ai/demo/mcp`
- Server Transport: **HTTP Streamable**
- Authentication: **None**
- Tools to Include: **All**

The demo has no SSE endpoint, so pick HTTP Streamable. An older MCP Client Tool node that has only an
**SSE Endpoint** field cannot connect.

**As a plain workflow step:** add an **MCP Client** node, and set:

- Server Transport: **HTTP Streamable**
- MCP Endpoint URL: `https://mcp.storag.ai/demo/mcp`
- Authentication: **None**
- Tool: `search_products`
- Input Mode: **JSON**, with `{"q": "running shoes", "page_size": 3}`

**Without MCP:** add an **HTTP Request** node with Method **GET** and this URL:

```text
https://storag.ai/api/v1/storag/demo/search?q=running+shoes&page_size=3&src=docs
```

**First result:** `results[0].product.id` is `DEMO-1986`, Granite Owl Alder Waterproof Women's Trail Running Shoes,
Olive, 65 EUR.

## Getting Started

Get up and running with Storag.ai in four steps. Want to try it first? Run the keyless demo curl above,
no sign-up needed.

### 1. Create a project and get your API key

[Sign up for a free account](https://storag.ai/signup?src=docs) and create your first project in the [Storag.ai Dashboard](https://storag.ai/dashboard?src=docs).
Each project has its own product catalog and API keys. Your API key (it starts with `pk_`) is made in the [API Keys](https://storag.ai/dashboard/api?src=docs) section. It is shown in full only once, when you create or regenerate it: copy it then. Storag keeps only a hash of it.

### 2. Upload your products

Connect your product catalog via a Google Shopping feed URL (XML, CSV or TSV) in the [Product Feed](https://storag.ai/dashboard/feed?src=docs) settings.
We import and index your products automatically, and keep them in sync with the feed.

### 3. Make your first search

Search your own catalog with words that appear in your product titles or descriptions:

```bash
curl 'https://storag.ai/api/v1/storag/search?q=trail+running+shoes' \
  --header 'Authorization: Bearer pk_your_api_key'
```

An empty `results` list with `total: 0` means nothing in your catalog fits the query.

### 4. Connect your AI agent (MCP)

Point Claude Code, Cursor or any MCP client at your own catalog with the same `pk_` key. Put this in
`.mcp.json` in your project folder:

```json
{
  "mcpServers": {
    "storag": {
      "type": "http",
      "url": "https://mcp.storag.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${STORAG_API_KEY}"
      }
    }
  }
}
```

Set `STORAG_API_KEY` to your key in your environment, so the key is not committed. Or add it from the terminal:

```bash
claude mcp add --transport http storag https://mcp.storag.ai/mcp \
  --header "Authorization: Bearer pk_your_api_key"
```

The [API Keys](https://storag.ai/dashboard/api?src=docs) page shows both with your key filled in. Tools and
clients: [MCP Server](/docs/mcp#description/mcp-server).

### Empty answer or no catalogue

An empty `results` list means one thing only: your catalogue has no match for the query. A keyed search answer
that did not search your own products says so in the `catalogue` field and the `X-Storag-Catalogue` header.
Without them, your own imported products answered. The keyless demo never sends them.

- `sample`: the 2,000-product sample catalogue a new project starts on, until your own import is live. These are
  demo products, not your shop's, so never show them to shoppers as your stock.
- `none`: the project has nothing to search yet (sample products off, no import live). The answer is `200` with
  an empty page and a `notice` saying what to do next: add a feed, or turn on sample products. Check this field
  before you tell a user "no products found".

Over MCP a `none` answer is a tool error with the same next step, so an agent never reads it as "nothing matched".

## Your first week

Your dashboard's Overview has a card with three steps: import your catalogue, search it, connect your app or agent. This page covers the same three steps with the exact commands, what "done" looks like for each one, and what to do when a step fails.

Your first week counts as live when your API key makes **100 searches on your own products, on at least 2 different days, within 7 days of sign-up**. Searches from the dashboard search box and the Playground do not count. Searches from your key on the sample catalogue do not count either.

All commands below use `$STORAG_API_KEY`. Set it once in your shell:

```bash
export STORAG_API_KEY="<your key from Dashboard → API keys>"
```

### Step 1: Import your catalogue

The import runs from the dashboard. There is no API route for it.

1. Open **Overview**.
2. Paste your feed URL in **Google Shopping feed URL**. It must be the full URL, starting with `https://` or `http://`.
3. Click **Import feed**.

On the **Feed** page the same field is called **Feed URL** and the button **Save feed URL**. Saving starts the import,
and **Sync now** imports again.

No feed at hand? Click **No feed at hand? Import our 2,000-product demo feed**. It imports `https://storag.ai/api/v1/storag/demo/feed.xml`, a fictional outdoor-gear catalogue.

#### Before you import: check the feed from your terminal

Storag fetches the feed from the public internet, so it has to work without a login or VPN:

```bash
curl -sI "https://your-store.com/feed.xml"          # expect HTTP 200
curl -s "https://your-store.com/feed.xml" | head -c 400
```

The first lines should be one of the formats Storag reads:

- Google Merchant RSS or Atom (`<rss ... xmlns:g="http://base.google.com/ns/1.0">` or `<feed>`)
- Google Merchant CSV/TSV, with a header row that includes `id` and `title`
- SHOP XML (SAIMON, Heureka, Zboží.cz), with a `<SHOP>` root element

Limits: 200 MB per feed and 120 seconds to download it.

#### While it runs

The card shows four stages, **Queued → Downloading the feed → Reading products → Searchable**, plus a count of the products read so far. The page checks the import every 3 seconds while the tab is open. You can leave the page and connect your agent (step 3) while you wait.

#### Done looks like

The step turns green and shows **Catalogue imported**, e.g. `2,000 products from storag.ai/…/feed.xml · imported in 14 s`.

To confirm from your terminal, count your products:

```bash
curl -s "https://storag.ai/api/v1/storag/products?page_size=1" \
  -H "Authorization: Bearer $STORAG_API_KEY" | jq .total
```

```
2000
```

If the answer has `"catalogue": "sample"`, your key is still searching the sample catalogue and your own import is not live yet.

#### When the import fails

The card shows **Import failed.** with one of these reasons. Fix the cause, then click **Import again** (on the
**Feed** page: **Sync now**).

| Message on the card | What to do |
|---|---|
| Enter the full feed URL, starting with https:// or http:// | Paste the whole URL, including `https://` or `http://`. |
| The feed URL was not found (HTTP 404 or 410). | The URL is wrong or the file moved. Open it in a private browser window and copy the URL from the address bar. |
| The feed URL refused access (HTTP 401 or 403). | The feed is behind a login, an IP allowlist or a token that expired. Make it publicly readable. |
| The feed host name could not be resolved. | There is a typo in the domain, or the domain only exists on your internal network. |
| The feed URL points to a private network address, which is not allowed. | `localhost`, `10.x`, `192.168.x` and other internal addresses are refused. Publish the feed on a public host. |
| The file is not a Google Merchant (RSS or Atom) product feed. | The URL returns an HTML page, a ZIP file or another XML format. Check the first lines with the `curl` above. A compressed feed has to be served plain or with `Content-Encoding: gzip`. |
| The feed holds no products. | The file is valid but has no items. Check your shop's feed export settings. |
| The feed is larger than the allowed size. | The feed is over 200 MB or 5,000,000 items. Export only the products you sell. |
| The feed server was unavailable or rate limited. The import is retried. | Nothing to do. Storag retries after 5 minutes and again after 30 minutes. It marks the import failed after the third attempt. |
| Imports were paused after repeated failures. Fix the feed and sync again. | Fix the cause shown by the earlier failures, then click **Import again**. |

**Import again does nothing, or says to try later?** A manual import can be started once every 15 minutes and 24 times a day. While an import is queued or running, a second click returns that same import.

### Step 2: Search your catalogue

Once your products are searchable, the card opens a search box filled with a first query. Type a query the way a shopper would, e.g. `waterproof hiking boots under 150`, and click **Search**.

This box searches with your dashboard login, not your key, so it does not count toward the 100. It shows the same results your agent will get.

#### Done looks like

Three product cards with titles and prices, and a line such as `23 matches · 16 ms · your catalogue`. **Open in Playground →** opens the same query with more results.

#### When there are no results

| What you see | What to do |
|---|---|
| No products match "…". Try words from your product titles: | Click one of the suggested chips. Those words come from your own catalogue, so they should return results. Query in the language your product titles are written in. |
| Opens when your products are searchable. | The import has not finished. Go back to step 1. |
| The search did not answer. Try again in a moment. | Try again. If it keeps failing, ask us in chat. |

### Step 3: Connect your app or agent

Pick one way to connect. Searches from your key count toward the 100 from here on. The card has a tab for each option with your key already filled in; **Copy** puts the full key on your clipboard.

#### Claude Code

```bash
claude mcp add --transport http storag https://mcp.storag.ai/mcp \
  --header "Authorization: Bearer $STORAG_API_KEY"
```

The dashboard names the server after your project (`storag-<project-name>`), so two projects can be connected side by side.

#### .mcp.json (Claude Code, Cursor or any MCP client)

```json
{
  "mcpServers": {
    "storag": {
      "type": "http",
      "url": "https://mcp.storag.ai/mcp",
      "headers": {
        "Authorization": "Bearer <your key>"
      }
    }
  }
}
```

The server offers four tools: `search_products`, `text_search_products`, `list_products` and `get_product`. Ask your agent a shopping question, e.g. "find waterproof hiking boots under 150".

#### curl

```bash
curl "https://storag.ai/api/v1/storag/search?q=waterproof+hiking+boots+under+150&page_size=3" \
  -H "Authorization: Bearer $STORAG_API_KEY"
```

#### Done looks like

The REST answer is HTTP 200 with your products under `results[].product`:

```json
{
  "query": "waterproof hiking boots under 150",
  "results": [
    { "product": { "id": "DEMO-1937", "title": "Larchline Waterproof Men's Hiking Boots, Black",
                   "price": { "amount": 108.49, "currency": "EUR" }, "...": "..." }, "rank": "..." }
  ],
  "total": 23, "page": 1, "pageSize": 3, "processingTime": 16
}
```

Over MCP, `search_products` returns the same JSON as text.

Back on the dashboard, step 3 turns green: **App or agent connected** and `Your key has answered N searches.` The page updates itself; you do not need to reload.

To see the count yourself:

```bash
curl -s "https://storag.ai/api/v1/storag/usage" \
  -H "Authorization: Bearer $STORAG_API_KEY" | jq .total.search
```

```json
{ "calls": 136, "ok": 135, "errors": 1, "noCatalogue": 0 }
```

#### When it fails

| What you get | What to do |
|---|---|
| `401` `Missing API key: send Authorization: Bearer <key>` | Add the header exactly as `Authorization: Bearer <key>`. |
| `401` `Invalid API key` | The key was mistyped, cut short or revoked. Copy it again from the card or Dashboard → API keys. |
| MCP tool error `Invalid Storag API key: storag-api refused the key sent as 'Authorization: Bearer <key>'` on the first search | Same cause, in the `Authorization` header of your MCP config. The client still connects and lists the tools; the key is checked at the first tool call. Fix it and restart your MCP client. |
| `403` `This API key is not allowed from this origin` | The key has allowed domains and the request came from another origin. Add that domain to the key, or call from your server or terminal. |
| `429` `Rate limit of N requests per minute exceeded` | Slow down. The `X-RateLimit-Limit` and `X-RateLimit-Remaining` headers show your limit. |
| `429` `quota_exceeded` | The project used its plan's monthly searches several times over. The message gives the reset date and the upgrade link. |
| `200` with `"catalogue": "none"` and `notice.code` `no_catalogue` | Your project has no catalogue yet, so nothing was searched. Finish step 1. |
| `200` with `"catalogue": "sample"` | Your key searches the 2,000-product sample catalogue until your own import is live. These searches do not count toward the 100. |
| `200` with `"total": 0` | Nothing matched. Try words from your product titles, as in step 2. |

### After the first week

When your key reaches 100 searches on 2 days, the card switches to **You're live** and links to **Usage**. If the 7 days pass first, the card offers a chat with us and the Claude Code command again.

## Authentication

All API requests need your project's API key (it starts with `pk_`). Send it in the `Authorization` header:

```
Authorization: Bearer pk_your_api_key
```

`X-API-Key: pk_your_api_key` also works. The same key works for the REST API and the MCP server.
Get your API key from the [Storag.ai Dashboard](https://storag.ai/dashboard?src=docs).

> **Important:** Keep your API key secure and never expose it in client-side code.

## Rate limits and quotas

Each key has a per-minute rate limit, shown in the `X-RateLimit-*` headers; over it the API answers `429`.

Each plan includes a number of queries a month, counted per project from the 1st (UTC). Every `/search` and
`/search/text` answer shows the count in the `X-Storag-Quota-Limit`, `X-Storag-Quota-Used` and
`X-Storag-Quota-Reset` headers; other routes do not send them. Search never stops at your quota on a paid plan.
Free searches over the quota, and Starter and Scale searches past 2 times it, skip the LLM judge until
the 1st (`meta.fallback: "quota"`): full results, unjudged.

## Search parameters

`GET /search`, `GET /search/text` and the demo search routes take the same query parameters, and so do the
MCP tools `search_products` and `text_search_products`:

- `q` (required, 1 to 200 characters): the query in shopper language. Phrases such as "under 150", "in stock" and "cheapest" become filters and sort.
- `page` (from 1, default 1) and `page_size` (1 to 100, default 20). Aliases: `pageSize`, `limit`. A number above the cap (100 for both with a key, page 10 and page size 20 on the demo) is capped, never rejected: the answer's `page` and `pageSize` say what was used. Below 1 or not a whole number is 400.
- `min_price`, `max_price` (numbers). Aliases: `minPrice`, `maxPrice`.
- `availability`: `in stock` returns only products in stock; `any` applies no stock filter, even when `q` says "in stock". Leave it out to let `q` decide. Any other value (for example `out of stock`) is 400.
- `sort`: `relevance` (default), `price_asc` (cheapest first), `price_desc` (dearest first).

## How /search answers

`/search`, `/demo/search` and the MCP tool `search_products` answer in two steps. A full-text search finds
up to 120 candidates inside the query's price, stock and word limits; the search route adds products that match by
meaning, and an LLM judge keeps the ones that fit the query, best match first. `meta.judged: true` says the judge
ranked the answer. If the judge is down, slow or over a limit, the search still answers and `meta.fallback` says
why. `/search/text` is never judged.

### What the judge reads

Price, stock and sort phrases in `q` ("under 50 EUR", "in stock", "cheapest") are taken out of the text the judge
reads and applied as filters instead: the product facts the judge sees carry no price or stock, so it cannot check
them. Every price, stock and size limit of the query holds on judged and unjudged answers alike. A size ("size 42")
stays in the judge's text, as product facts name it. A query that names one product exactly (its ID or EAN) is
answered from full-text at once, never judged.

### What `total` means

The judge answers at most page × page_size products (at least 20 when `q` names a size, or a price in a currency),
and never more than 100.

| Answer | `total` |
|---|---|
| Judged, and the judge kept fewer products than it was asked for | Exactly the products kept, inside every limit of the query. A `total` under `page_size` is exactly the results shown. |
| Judged, and the judge kept as many as it was asked for | The full-text match count (more may fit), at most 100. |
| Not judged (`meta.judged: false`) | The full-text match count; a lower bound when `meta.timedOut` is true. |

### Paging judged results

A judged answer holds at most 100 products: a `/search` page past the 100th product comes back empty. Each page is
judged again for the larger window, so `total` can change from page to page, for example from the full-text count
on page 1 to the exact kept count on page 3. Page until a page returns fewer results than `page_size`, not by
`total` alone. To walk every keyword match, use `/search/text`.

### Price sorts

`sort=price_asc` or `price_desc` (or "cheapest" / "most expensive" in `q`) is judged like any search, so a
loose match does not lead a cheapest-first list. The judge keeps the products that fit, and those come back in price
order: cheapest or dearest first, in stock or not (filter stock with `availability`), products without a price last.
A judged price sort covers at most the 100 products the judge kept, and `total` is as in the table above. When the
judge is skipped (`judge=false`, a ceiling, or the judge could not answer), you get every full-text match in price
order with `meta.judged: false`, and `meta.fallback` says why (`null` for `judge=false`).

### `meta.fallback`: why an answer is not judged

| `fallback` | Why | What you get |
|---|---|---|
| `null` | Judged, or you sent `judge=false` or a query naming one product | The judged results, or unjudged ones when `meta.judged` is false |
| `text` | The search route was unreachable, failed or took over 2 s | Full-text results |
| `busy` | The search route was at its capacity | Full-text results |
| `timeout` | The judge's 1.5 s deadline passed | What it had not judged comes back unjudged, `complete: false` |
| `budget` | A judge spend ceiling was reached | Unjudged candidates (full-text results on the demo) |
| `quota` | A Free project at or over its monthly quota, or a Starter or Scale project past 2 times it | Unjudged candidates until the 1st (UTC) |
| `no-language` | The search had no language, so nothing was judged | Unjudged candidates |
| `error` | The judge could not run | Unjudged candidates |
| `relaxed`, `partial` | Few or no products matched every word: most of the words, or only the most specific one | Full-text's relaxed match, `complete: false` |

`meta.complete: false` also means not every candidate was judged in time. `meta.alternatives: true` means
nothing fitted and these are the closest products.

### Time and cost

- Judging adds time; past the 1.5 s deadline you get what was judged so far (`fallback: "timeout"`), not a slower answer.
- Each project has a daily number of judged searches set by its plan; past it, searches answer unjudged with
  `fallback: "budget"` until the next UTC day. Unpaid projects also share a free daily ceiling.
- A judged price sort judges the whole first batch of candidates, not only the first page, so it takes longer and
  uses more judge work than a relevance page of 20 results or fewer.
- `judge=false` skips the judge: no judge time, and the search does not count towards the judge ceilings.
- Every search counts as one query on your plan, judged or not.

## Errors

- 400 bad parameter, 401 no or wrong key, 403 no access, 404 not found, 429 over the key's per-minute rate limit (or the demo's 30 a minute / 500 a day per IP), 502 search backend unavailable. Error bodies are JSON.

Over the rate limit, wait for the `Retry-After` header before you call again.

## Plans

Pricing (USD per month; yearly billing price, monthly billing price in brackets):

- Free: $0, 5,000 queries a month, up to 5,000 products, no credit card
- Starter: $39 ($49), 10,000 queries a month, up to 10,000 products
- Grow: $99 ($149), 20,000 queries a month, up to 20,000 products
- Pro: $219 ($299), 50,000 queries a month, up to 30,000 products
- Scale: $359 ($499), 100,000 queries a month, up to 50,000 products
- Enterprise: custom price, unlimited queries and products, dedicated support & SLA; contact us
- Prices exclude VAT. CZ: +21 % VAT. EU businesses: reverse charge with a valid VAT ID. Outside the EU: no VAT.
- One search is one query. If a feed has more products than the plan allows, the first ones in feed order are indexed.
- Paid plans are bought in the dashboard after sign-up (Stripe checkout). Full table: https://storag.ai/pricing

## MCP Server

Connect any AI agent to your product catalog using the [Model Context Protocol](https://modelcontextprotocol.io).

### Connect your client

Your key works in the hosts that send it as an `Authorization: Bearer` header: Claude Code, Cursor, Windsurf,
VS Code and n8n. Copy the config for yours. Each config file adds two servers: `storag` searches your catalog with
your `pk_` key, and `storag-demo` searches the demo catalog without a key. The key is read from `STORAG_API_KEY` in
your environment (VS Code asks for it), so it is never written into the file.

**Claude Code**: Terminal; `export STORAG_API_KEY=pk_...` first.

```bash
claude mcp add --transport http storag https://mcp.storag.ai/mcp --header "Authorization: Bearer $STORAG_API_KEY"
claude mcp add --transport http storag-demo https://mcp.storag.ai/demo/mcp
```

**Cursor**: `~/.cursor/mcp.json` or `.cursor/mcp.json`; reads `STORAG_API_KEY` from your env.

```json
{
  "mcpServers": {
    "storag": {
      "url": "https://mcp.storag.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${env:STORAG_API_KEY}"
      }
    },
    "storag-demo": {
      "url": "https://mcp.storag.ai/demo/mcp"
    }
  }
}
```

**Windsurf**: `~/.codeium/windsurf/mcp_config.json`; reads `STORAG_API_KEY` from your env.

```json
{
  "mcpServers": {
    "storag": {
      "serverUrl": "https://mcp.storag.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${env:STORAG_API_KEY}"
      }
    },
    "storag-demo": {
      "serverUrl": "https://mcp.storag.ai/demo/mcp"
    }
  }
}
```

**VS Code**: `.vscode/mcp.json`; asks for the key once and stores it as a secret.

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "storag-api-key",
      "description": "Storag API key (pk_...)",
      "password": true
    }
  ],
  "servers": {
    "storag": {
      "type": "http",
      "url": "https://mcp.storag.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${input:storag-api-key}"
      }
    },
    "storag-demo": {
      "type": "http",
      "url": "https://mcp.storag.ai/demo/mcp"
    }
  }
}
```

**n8n**: MCP Client Tool node (for an AI Agent) or MCP Client node; there is no SSE endpoint.

```text
Endpoint: https://mcp.storag.ai/mcp
Server Transport: HTTP Streamable
Authentication: Bearer Auth
Bearer Token: your pk_ API key
```

`claude mcp list` shows `✔ Connected` even with a wrong key: connecting and listing the tools do not check it.
Your first tool call does. With a wrong key it fails with the tool error
`Invalid Storag API key: storag-api refused the key sent as 'Authorization: Bearer <key>'`
and tells you to copy your key from the dashboard. With no key it answers `No Storag API key: send it as 'Authorization: Bearer <key>'`.

`https://mcp.storag.ai/mcp` keeps a session. Claude Code, Cursor and other MCP clients handle it for you. With plain `curl`,
send `initialize` first, then the `Mcp-Session-Id` header it answers with on every later call. A `tools/call`
without it gets `400 Bad Request: Missing session ID`.

Prefer a project file in Claude Code? Put this in `.mcp.json`; Claude Code fills `${STORAG_API_KEY}` from your
environment and asks you to approve the server the first time you run `claude` in that folder:

```json
{
  "mcpServers": {
    "storag": {
      "type": "http",
      "url": "https://mcp.storag.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${STORAG_API_KEY}"
      }
    }
  }
}
```

No key yet? `https://mcp.storag.ai/demo/mcp` (the `storag-demo` entry above) has the same tools over the demo catalog, without a key and without a session.

### claude.ai, Claude Desktop and ChatGPT

Their connectors sign in with OAuth, which the Storag MCP server does not offer yet, so they cannot use your key.
To try the four tools on the demo catalog there, add `https://mcp.storag.ai/demo/mcp` as a custom connector with no sign-in
([steps for Claude](/docs/quickstart#description/claude-desktop-and-claudeai)). For your own catalog, use one of the
hosts above.

### Available tools

| Tool | Description | Arguments |
|------|-------------|-----------|
| `search_products` | Product search, best match first: full-text candidates judged for fit by an LLM, the same `total`, paging and `meta` as `/search` ([How /search answers](/docs/api#description/how-search-answers)). Price, stock and sort phrases in the query work as filters. | `q` (required), `page`, `page_size`, `min_price`, `max_price`, `availability` ("in stock" or "any"; any other value is an error), `sort` (`relevance`, `price_asc`, `price_desc`) |
| `text_search_products` | Keyword search for exact terms such as a brand, product type or ID. Never judged. | Same as `search_products` |
| `list_products` | List indexed products with pagination. | `page`, `page_size`, `search` (title, ID or brand) |
| `get_product` | Get a single product by ID with full details. | `product_id` (required) |

The search query argument is `q`, not `query`. Example call: `{"q": "trail running shoes", "max_price": 80}`.

### Compatible clients

The MCP server uses Streamable HTTP transport and works with:

- **Claude Code**: `claude mcp add --transport http` or a `.mcp.json` project config with `"type": "http"`
- **claude.ai, Claude Desktop and ChatGPT**: the keyless demo only, as a custom connector (they sign in with OAuth); Claude Desktop reaches your catalog only through the `mcp-remote` bridge below
- **Cursor**: `.cursor/mcp.json` (or `~/.cursor/mcp.json`) with the server's `url`
- **Windsurf**: `~/.codeium/windsurf/mcp_config.json` with the server's `serverUrl`
- **VS Code**: `.vscode/mcp.json` with `"type": "http"` under `servers`
- **n8n**: MCP Client Tool node (for an AI Agent) or MCP Client node, transport HTTP Streamable; there is no SSE endpoint
- **Custom agents**: Any client supporting the [MCP specification](https://modelcontextprotocol.io)

Authentication uses the same API key as the REST API. Rate limits and quotas match your plan.
The keyless recipes for each client are in [Try it in your tool (no key)](/docs/quickstart#description/try-it-in-your-tool-no-key).

### Claude Desktop with your key, through a bridge

Claude Desktop can run your keyed server as a local command through the `mcp-remote` bridge (needs Node.js 18 or
newer). Put this in `claude_desktop_config.json` (Settings > Developer > Edit Config) and restart Claude Desktop:

```json
{
  "mcpServers": {
    "storag": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.storag.ai/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer pk_your_api_key"
      }
    }
  }
}
```

### Setting it up from an agent

An AI agent can run the demo alone, but sign-up, the key and the feed are dashboard steps. [/docs/agents](https://storag.ai/docs/agents?src=docs) gives the agent the words to hand those steps to its user, and how to check each one.
