# Connect with AI

Chat with a Data Store from Claude, Codex, ChatGPT, or Cursor.

## See it work

Example chat with Store MCP:

- **You:** How many records are in my store?
  - **Agent:** Count: 1,248 records in Partner Demo Guests.
- **You:** Show me the latest 3 records.
  - **Agent:** Returned 3 rows (alice@…, bob@…, cara@…).
- **You:** Update alice@example.com score to 100.
  - **Agent:** Upserted 1 record.

## MCP endpoint

```text
https://dev.niftyimages.com/store_mcp
```

## Three steps

1. **Get a Store API Key** from store details in the NiftyImages UI (`store-…`). Safest for demos.
2. **Add the MCP server** in Codex or Claude Code (below).
3. **Chat** once tools load.

## 1. Get a Store API Key

Open a store → copy the **Store API Key** from store details.

Screenshot: `/images/store_mcp/store_api_key.png`

Prefer a Store key for demos. Never put the key in the URL—use the Authorization header only.

## Codex (step 2)

Configured in the Codex app (not the terminal).

1. Open **Settings → Plugins → MCP → Add Server**.
2. Fill in:
   - **Name** — e.g. `store-mcp` (local label only; rename freely)
   - **URL** — `https://dev.niftyimages.com/store_mcp`
   - **HTTP headers** — add key `Authorization`, value `Bearer <your UI key>` (prefer a Store key)

Do not put the key in the URL.

Screenshot: `/images/store_mcp/codex_store_mcp.png`

## Claude Code

```bash
claude mcp add --transport http store-mcp https://dev.niftyimages.com/store_mcp \
  --header "Authorization: Bearer $YOUR_TOKEN"
```

- **Name is yours to choose.** The label `store-mcp` is only a local name in Claude Code—you can change it (e.g. `nifty-store`).
- **Replace the token.** Swap `$YOUR_TOKEN` for your real NiftyImages API key (prefer a Store key). Do not commit or share the key.

## Try these

- “What store can I use?”
- “How many VIP guests are in California?”
- “Update alice@example.com score to 100.”
- “Import this CSV into the store.”

