# The MCP server

> Connect any MCP client to Commerce Orbit with OAuth sign-in, and the tools it gets for products, collections, orders and the shop's status.

Source: https://docs.bifrostorbit.com/commerce/developers/mcp/

Commerce Orbit has an MCP (Model Context Protocol) server, so AI assistants can look up products and orders and improve product text the way someone on the team does. The address is:

```text
https://app.bifrostorbit.com/commerce/mcp
```

It uses the Streamable HTTP transport. The same address, with install buttons, is on **AI assistants** under **Developers**. For what someone on the team sees, read [Connect an AI assistant](https://docs.bifrostorbit.com/commerce/everyone/ai-assistants/).

## Signing in

The server uses OAuth 2.1 with PKCE (S256) and dynamic client registration, so a client needs nothing but the address. An unauthenticated request gets `401` with a `WWW-Authenticate` header that points to the resource metadata.

| What | Where |
| --- | --- |
| Resource metadata | `/commerce/.well-known/oauth-protected-resource/mcp` |
| Authorisation server metadata | `/commerce/.well-known/oauth-authorization-server` |
| Register a client | `POST /commerce/oauth/register` |
| Authorise | `/commerce/oauth/authorize` |
| Token | `POST /commerce/oauth/token` |
| Revoke | `POST /commerce/oauth/revoke` |

Clients are public (`token_endpoint_auth_method` is `none`) and register redirect addresses that are `https`, or `http` on `localhost`, `127.0.0.1` or `[::1]`. The scope is `commerce`. The person signs in to Orbit, chooses the shop and allows the connection. An assistant works in that one shop. Access tokens last one hour; the client renews them with the refresh token, which changes each time.

Every request runs as the person who connected, with their current Commerce Orbit role. If they lose access, requests are refused. Requests over 1 MB get `413`. Tool errors come back as a tool result with `isError` and the message.

## Tools

| Tool | What it does | Role |
| --- | --- | --- |
| `list_products` | Products, most recently changed first, with status, vendor, type, tags, number of variants, units in stock and MAM part number. Filter by `status`, `query` (title, SKU or part number) and `stock` (`low` or `out`). Up to 200. | Everyone |
| `get_product` | One product with its summary, description, SEO text, options, and each variant's SKU, prices per currency, compare-at price, stock per location and when it last came from MAM | Everyone |
| `list_collections` | Collections with their kind, status and number of products | Everyone |
| `list_orders` | Orders, newest first, with reference, customer name and company, payment, sending and MAM status and total. Filter by `status` (`all`, `open`, `cancelled`, `unpaid`, `unfulfilled`, `mam`) and `query`. Up to 100. | Everyone |
| `get_order` | One order by reference, such as `NW1042`, or id, with lines, shipping, VAT mode and the last 10 history entries | Everyone |
| `shop_status` | What needs attention: orders to send, unpaid and overdue invoices, orders waiting for or refused by MAM, low stock, and the MAM connection's status and last syncs | Everyone |
| `update_product_text` | A product's `title`, `summary`, `description` (plain text with blank lines, or simple HTML) and `seoTitle`, `seoDescription`, in the main language | Editor |

Amounts are whole minor units, such as cents or øre, with the currency given.

## Limits

- No tool changes prices, stock, status, options or variants, creates or removes anything, refunds, cancels, sends orders, or touches Stripe, MAM, discount codes or settings. `update_product_text` keeps everything but the text as it was.
- Order tools return the customer's name and company only: never email addresses, phone numbers or addresses.
- Product text is written in the main language only.
- Every change is in the [audit trail](https://docs.bifrostorbit.com/commerce/everyone/audit-trail/) as the person and the client's name, such as "Kari via Claude".

## Try it

With Claude Code:

```bash
claude mcp add --transport http commerce-orbit https://app.bifrostorbit.com/commerce/mcp
```

Then ask, for example, "Which products are low on stock, and which orders are still to send?"
