# AI assistants (MCP)

> Connect Claude, ChatGPT or Cursor to your NinjaBuy Business account, and every tool they can use.

Source: https://www.ninjabuy.com/business/docs/mcp

Connect Claude, ChatGPT or Cursor to your NinjaBuy account and ask in plain words: where an order is, what is on your shelf, whether a listing is worth selling, and put it on your store.

## Connect

One server address for every assistant. You sign in with your NinjaBuy account; there is no key to paste.

https\://www\.ninjabuy.com/mcp

### Claude

1. Open Settings › Connectors and choose Add custom connector.
2. Paste the address above and add it.
3. Sign in with your NinjaBuy phone number, then choose Allow access.

### ChatGPT

1. Turn on developer mode in Settings, then add a custom MCP server.
2. Paste the address above and choose OAuth as the sign-in.
3. Sign in with your NinjaBuy phone number, then choose Allow access.

### Cursor

Add the server under Cursor Settings › MCP, or in `~/.cursor/mcp.json`. Cursor opens the NinjaBuy sign-in in your browser the first time.

\~/.cursor/mcp.json

```json
{  "mcpServers": {    "ninjabuy": {      "url": "https://www.ninjabuy.com/mcp"    }  }}
```

### Claude Code and other command-line assistants

Terminal

```
claude mcp add --transport http ninjabuy https://www.ninjabuy.com/mcp
```

Menu names change as the assistants update; look for “custom connector” or “custom MCP server”.

## Sign-in and access

The assistant signs in with OAuth 2.1: it registers itself, sends you to ninjabuy.com, and you approve it on our own screen, which names the app and where it will send you back. Only allow an app you just asked to connect. You approve each app once.

- It acts as your account: the tools take no account id, and see only your orders, shelf and products.
- Access lasts an hour and renews for seven days; then the assistant asks you to sign in again.
- Remove the connector in your assistant to disconnect it.
- The tools that read a marketplace (product, price\_for\_marketplace) share the API's 30-a-minute window: [Rate limits](https://www.ninjabuy.com/business/docs/api.md#rate-limits).

* The API is open on request. Our team sets up your Business account and issues its API keys.

  [Contact sales](https://www.ninjabuy.com/business#contact)

## Money

No tool adds money. Topping up your balance and paying by card or PayPal happen on the page the answer names, like checkout from the cart and shipping from your warehouse page. The auto-buy tools spend your team's NinjaBuy balance, as their buttons do: turn\_on\_auto\_buy, buy\_anyway and try\_again, and stock\_up where stock is open, for an owner or admin only. push\_to\_shopify lists a product as a draft, so nothing goes on sale until you publish it.

## Teams and roles

The assistant signs in as you. It acts for your personal team, else the team you joined first, unless it passes team, an id from my\_teams; when you are on more than one team, a change always names the team. Every answer names the team it acted for, and your role there decides what it may do, exactly as on the website:

| Role   | Its assistant may                                                                        |
| ------ | ---------------------------------------------------------------------------------------- |
| owner  | Everything: channels, listings, rules, orders, auto-buy, webhooks and the team.          |
| admin  | Everything the owner may, except handing the team over.                                  |
| staff  | Read everything, price products, list and push, check, resume and change the sync rules. |
| viewer | Read listings, rules, orders and the team.                                               |

Only an owner or admin sees the balance. Inviting someone, changing a role and removing a member stay on the Team page: invite\_teammate, change\_teammate\_role and remove\_teammate check your role and answer that page.

## Tools

Every answer carries requestId (quote it when you write to us) and warnings, things worth knowing that did not stop the call. A long answer is cut at about 6,000 tokens with truncated: true; lists then take a smaller limit.

| Tool                    | What it does                      |
| ----------------------- | --------------------------------- |
| list\_orders            | List my NinjaBuy orders           |
| order                   | One NinjaBuy order                |
| warehouse               | My NinjaBuy warehouse             |
| product                 | Read a product's variants         |
| add\_to\_cart           | Add to my NinjaBuy cart           |
| search\_products        | Search products                   |
| price\_for\_marketplace | Price a product for a marketplace |
| push\_to\_shopify       | Push to Shopify                   |
| store\_listings         | My synced listings                |
| set\_sync\_rules        | Change my sync rules              |
| store\_orders           | My store orders                   |
| try\_again              | Try a stopped store order again   |
| stock\_levels           | My stock in the warehouse         |
| stock\_up               | Stock up a variant                |

The rest of the Business tools, each answered the same way: my\_teams and team\_members; my\_channels (your eBay accounts and Shopify stores); check\_listings\_now and resume\_listing; sync\_rules and reset\_sync\_rules; auto\_buy\_settings, turn\_off\_auto\_buy and dont\_buy; ebay\_listing\_plan, fill\_ebay\_specifics, ebay\_listing\_check and list\_on\_ebay; my\_webhooks, webhook\_deliveries and send\_test\_webhook; and store upkeep's find\_stale\_listings, preview\_listing\_changes, apply\_listing\_changes, undo\_listing\_changes and listing\_changes, which preview a bulk change before it is applied by its id. Webhook endpoints are added, deleted and their secrets rolled on the webhooks page, so no answer ever holds a secret.

### `list_orders` read-only

The account's orders, newest first: status, payment status, what is still owed, the items and each order's page. Follow cursor while has\_more is true.

- `cursor` string?

  From the previous answer; leave out for the first page.

- `limit` number?

  1 to 25. 25 when left out.

list\_orders answers

```json
{  "orders": [    {      "id": "j57a9x2b",      "number": 1012,      "kind": "procurement",      "total": "¥57.00",      "orderStatus": { "status": "ordered" },      "paymentStatus": { "status": "paid" },      "amountDue": null,      "itemCount": 1,      "items": [        {          "id": "P1012-1",          "title": "Heavyweight washed hoodie",          "quantity": 1,          "options": ["Black", "M"],          "status": "ordered"        }      ],      "url": "https://www.ninjabuy.com/me/orders/j57a9x2b"    }  ],  "cursor": "eyJvIjoyNX0",  "has_more": true,  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `order` read-only

One order by id: its lines and prices, each item's status and how many arrived, and the shipment with tracking. order is null for an id that is not this account's.

- `id` string required

  An id from list\_orders.

order answers

```json
{  "order": {    "id": "j57c4k1m",    "number": 1019,    "kind": "shipout",    "orderStatus": { "status": "ready" },    "paymentStatus": { "status": "paid" },    "shipment": {      "state": "shipped",      "destinationCountry": "US",      "weightGrams": 176,      "trackingNumbers": ["YT2630812345678"],      "shippedAt": 1793685600000    },    "url": "https://www.ninjabuy.com/me/orders/j57c4k1m"  },  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `warehouse` read-only

Everything that arrived at our warehouse: photos, how many arrived, can ship or are in a shipment, weight, declared value, whether it is paid for, and when free storage ends.

No inputs.

warehouse answers

```json
{  "items": [    {      "id": "P1012-1",      "order": 1012,      "title": "Heavyweight washed hoodie",      "photos": [        {          "type": "image",          "url": "https://media.ninjabuy.com/qc/P1012-1/1.webp"        }      ],      "received": 1,      "availableToShip": 1,      "inShipment": 0,      "unitWeightGrams": 176,      "declaredUnitValue": "¥38.00",      "paid": true,      "freeStorageUntil": "2026-12-02T03:20:11.000Z"    }  ],  "warehouseUrl": "https://www.ninjabuy.com/me/warehouse",  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `product` read-only

Reads a listing from any product link (another shopping agent's link, a short link or a NinjaBuy product page works too): title, pictures, seller, and every variant with its skuId, label, CN¥ price and stock.

- `link` string required

  A product link, up to 2,048 characters.

product answers

```json
{  "product": {    "handle": "weidian-7750970856",    "title": "重磅水洗连帽卫衣",    "seller": "Ruoyi Studio",    "variants": [      {        "skuId": "5187209554",        "label": "Black / M",        "priceMinor": 3800,        "price": "¥38.00",        "inStock": true      },      {        "skuId": "5187209555",        "label": "Black / L",        "priceMinor": 3800,        "price": "¥38.00",        "inStock": false      }    ],    "url": "https://www.ninjabuy.com/products/weidian-7750970856"  },  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `add_to_cart` writes

Puts variants of one listing in the cart, to buy ahead and keep on your shelf. Nothing is bought: the answer is the cart page, where you check out.

- `handle` string required

  From product.

- `lines` { skuId, quantity }\[] required

  1 to 100 lines; quantity 1 to 9,999. A variant already in the cart adds to it.

add\_to\_cart answers

```json
{  "added": 1,  "cartUrl": "https://www.ninjabuy.com/cart",  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `search_products` read-only

Keyword search on Taobao or 1688, the same search as ninjabuy.com. A pasted link answers that product.

- `query` string required

  2 to 120 characters, or a link.

- `provider` string?

  taobao or 1688. taobao when left out.

- `page` number?

  0 to 20.

search\_products answers

```json
{  "kind": "products",  "products": [    {      "handle": "taobao-781204556120",      "title": "Heavyweight cotton hoodie, washed",      "price": { "amount": "45.00", "currency": "CNY" },      "marketplace": "taobao",      "url": "https://www.ninjabuy.com/products/taobao-781204556120"    }  ],  "page": 0,  "totalCount": 1840,  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `price_for_marketplace` read-only

What one sale of each variant costs landed at the buyer's door, and the price that keeps your margin on your marketplace. Nothing is saved. Same figures as the [importer](https://www.ninjabuy.com/business/docs/importer.md).

- `link` string required

  A product link.

- `marketplace` string required

  ebay, shopify, amazon or tiktok.

- `country` string required

  The buyer's two-letter country.

- `weight_grams` number?

  Packed weight of one unit. 500 when left out.

- `margin_percent` number?

  The margin to price for. 30 when left out.

- `team` string?

  A team id from my\_teams. Your own team when left out.

price\_for\_marketplace answers

```json
{  "team": { "id": "k17f2m9qx8", "name": "Acme Goods", "role": "admin" },  "handle": "weidian-7750970856",  "analysis": {    "title": "重磅水洗连帽卫衣",    "country": "US",    "lane": "saver",    "covered": true,    "marketplace": "ebay",    "margin_percent": 30,    "variants": [      {        "sku_id": "5187209554",        "label": "Black / M",        "in_stock": true,        "landed_usd": 27.71,        "minimum_price_usd": 49.71,        "suggested": {          "price_usd": 49.99,          "marketplace_fee_usd": 7.2,          "profit_usd": 15.08,          "margin_percent": 30.16        }      }    ]  },  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `push_to_shopify` writes

Lists a product on your Shopify store as a draft, stocked at the Fulfilled by NinjaBuy location, at the US$ prices you give. Pushing again updates it. Your assistant asks you first.

- `handle` string required

  From price\_for\_marketplace.

- `variants` { sku\_id, price\_usd }\[] required

  Which to keep and at what US$ price.

- `shop` string?

  Needed when several stores are linked.

- `team` string?

  A team id from my\_teams. Your own team when left out.

push\_to\_shopify answers

```json
{  "team": { "id": "k17f2m9qx8", "name": "Acme Goods", "role": "admin" },  "shop": "acme-goods.myshopify.com",  "product_id": "gid://shopify/Product/8812042",  "admin_url": "https://admin.shopify.com/store/acme-goods/products/8812042",  "created": true,  "pushed": [    {      "sku_id": "5187209554",      "label": "Black / M",      "price_usd": 49.99    }  ],  "skipped": [    {      "sku_id": "5187209555",      "label": "Black / L",      "reason": "sold_out"    }  ],  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `store_listings` read-only

Your eBay listings and Shopify products with their price, cost, stock, state, why one paused and when it was last checked. With listing\_id, that listing's recent changes.

- `channel` string?

  ebay or shopify.

- `state` string?

  active, paused or removed.

- `listing_id` string?

  One listing, with its change log.

- `team` string?

  A team id from my\_teams. Your own team when left out.

store\_listings answers

```json
{  "team": { "id": "k17f2m9qx8", "name": "Acme Goods", "role": "admin" },  "listings": [    {      "channel": "shopify",      "store": "acme-goods.myshopify.com",      "listing_id": "n97d1c4t",      "title": "Canvas Tote",      "variant": "Natural",      "price_usd": 18.99,      "cost_usd": 8.42,      "stock": 100,      "state": "paused",      "paused_reason": "cost_rise",      "last_checked_at": "2026-11-12T02:10:00.000Z",      "next_check_at": null,      "last_change": {        "at": "2026-11-12T02:10:00.000Z",        "kind": "paused",        "from": null,        "to": null,        "reason": "The cost rose 24%, past your 20% limit."      }    }  ],  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `set_sync_rules` writes

Changes the rules every synced listing follows; the ones you leave out stay as they are. Same rules as [Sync rules](https://www.ninjabuy.com/business/docs/api/sync-rules.md). Your assistant asks you first.

- `auto_reprice_limit_percent` number?

  A cost rise up to this reprices without asking.

- `above_limit` string?

  pause, reprice or keep.

- `cost_falls` string?

  keep or lower.

- `min_margin_percent` number?

  Below this margin over landed cost, the listing pauses.

- `team` string?

  A team id from my\_teams. Your own team when left out.

set\_sync\_rules answers

```json
{  "team": { "id": "k17f2m9qx8", "name": "Acme Goods", "role": "admin" },  "rules": {    "auto_reprice_limit_percent": 15,    "above_limit": "pause",    "cost_falls": "keep",    "sold_out": "zero",    "variant_gone": "zero",    "min_margin_percent": 40  },  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `store_orders` read-only

Your eBay orders and every store order auto-buy took, with its state, why one stopped and the NinjaBuy orders it made. The buyer's city and country only.

- `channel` string?

  ebay or shopify.

- `team` string?

  A team id from my\_teams. Your own team when left out.

store\_orders answers

```json
{  "team": { "id": "k17f2m9qx8", "name": "Acme Goods", "role": "admin" },  "orders": [    {      "channel": "ebay",      "store_order": "12-34567-89012",      "state": "received",      "ship_to": { "city": "Austin", "countryCode": "US" },      "auto_buy": {        "autobuy_id": "q81p3s0v",        "state": "held_funds",        "stop": {          "kind": "funds",          "step": "buy",          "needs": "¥480.00",          "short_by": "¥120.00",          "balance_is_yours": true        },        "goods_order": null,        "shipment": null      }    }  ],  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `try_again` writes

Runs a stopped store order's auto-buy step again now, buying or shipping it from your team's NinjaBuy balance. buy\_anyway and turn\_on\_auto\_buy spend the balance the same way. Owner or admin only.

- `autobuy_id` string required

  From store\_orders.

- `team` string?

  A team id from my\_teams. Your own team when left out.

try\_again answers

```json
{  "team": { "id": "k17f2m9qx8", "name": "Acme Goods", "role": "admin" },  "done": true,  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `stock_levels` read-only

Your held stock per variant: units in stock at our warehouse, reserved for a parcel, on the way, shipped and bought, the low-stock alert, and the handling time your eBay listing promises because of it. See [Ship from stock](https://www.ninjabuy.com/business/docs/stock.md).

- `team` string?

  A team id from my\_teams. Your own team when left out.

stock\_levels answers

```json
{  "team": { "id": "k17f2m9qx8", "name": "Acme Goods", "role": "admin" },  "open": true,  "auto_buy_on": true,  "items": [    {      "product_handle": "tb-8841",      "sku_id": "tb-8841-black-straight",      "title": "Studio headphones",      "variant": "Black, straight cable",      "listed_on": ["ebay"],      "in_stock": 7,      "reserved": 2,      "on_the_way": 0,      "shipped": 1,      "bought": 10,      "low_stock_alert_at": 3,      "low": false,      "ebay_handling": { "mode": "stock", "business_days": 2 }    }  ],  "products_page": "https://www.ninjabuy.com/business/products",  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

### `stock_up` writes

Buys units of one variant into your stock at our warehouse from your team's NinjaBuy balance, as an ordinary order. Store orders for it then ship from stock until it runs out. Spends the balance like try\_again. Owner or admin only.

- `product_handle` string required

  From stock\_levels or store\_listings.

- `sku_id` string required

  The variant.

- `quantity` number required

  1 to 500 units.

- `team` string?

  A team id from my\_teams. Your own team when left out.

stock\_up answers

```json
{  "team": { "id": "k17f2m9qx8", "name": "Acme Goods", "role": "admin" },  "done": true,  "requestId": "5f7c2a1e-3b8d-4c61-9a0f-2e4d6b8c1a37",  "warnings": []}
```

## What to ask
