Skip to content
OmniRetailConnect Docs

Commerce · MCP

Connect Claude Code

Add the Commerce MCP server to Claude Code with one command.

View as Markdown

Before you start

Ask the shop administrator for two things. They create the token in the shop admin under Settings (Instellingen) > API tokens (API-tokens):

  • the MCP endpoint URL, for example https://<your-shop-domain>/mcp/commerce;
  • a token, ocm_<token>, with the access level you need (Read, or Read incl. customer details only if really needed) and the channel AI agents (MCP). The token is shown only once when it is created. See Authentication and tokens.

Add the server

Run these commands once, replacing the URL and the token. The token is read from an environment variable so it does not end up in your shell history:

Claude Code
export COMMERCE_MCP_TOKEN='ocm_<token>'

claude mcp add --transport http commerce 'https://<your-shop-domain>/mcp/commerce' \
  --header "Authorization: Bearer $COMMERCE_MCP_TOKEN"

Keep the token private

The command contains your token. Do not paste it into a shared chat or commit it to a repository, and do not put it in client-side code. Use a token that has only the scopes you need.

With --header "Authorization: Bearer $COMMERCE_MCP_TOKEN" your shell expands the variable and Claude Code stores the literal token in its own configuration. The variable only keeps the token out of your shell history.

Use it

Once the server is added, ask Claude Code questions that need shop data, for example "How many orders did we place last week, and what was the net sales figure?". Claude can call the read tools to answer. With a read token nothing in the shop can be changed through this server. With a write token Claude Code also sees the write tools and can change the catalogue: keep Claude Code's permission prompts on for this server, so you approve every write, and read Write tokens first.

If it does not work

Common problems
Symptom What to check
401 The token is wrong, expired or revoked, or it was not sent in the Authorization: Bearer header. Ask the shop administrator for a new token.
403 The request was not made over HTTPS. Use an https:// URL. If you already use https, ask the shop operator to check the reverse-proxy configuration.
404 The MCP server is switched off for this shop, or the path is different from the one you used. A GET then answers the shop's normal 404 and a POST answers 405 with Allow: GET, HEAD: ask the shop administrator for the URL from the Connection details panel and whether MCP is enabled.
429 A rate limit was reached. Wait the number of seconds in the Retry-After header.

All status codes are described in Errors and status codes.