Connect an AI Assistant to OneCart with MCP

Connect an AI assistant such as Claude to your OneCart account through a single link, so you can ask about your orders, stock and sales, and make changes, in plain language.

Help Article Last updated Sep 23, 2026 3 min read

OneCart can be connected to an AI assistant such as Claude through MCP (the Model Context Protocol). Once connected, the assistant can work with your OneCart account for you: list your orders, check stock, update quantities, look at your sales, and more, all from a normal conversation. Every action still runs as you, so the assistant only ever sees your company’s data and can only do what you allow.

You connect using one link:

https://app.getonecart.com/mcp

There are two ways to connect. Signing in through your browser is the easiest and is recommended for most people. Using an API key is for scripts or tools that cannot open a browser.

Before you start

  • An AI client that supports MCP over HTTP, such as Claude Code.
  • Your normal OneCart login.
  1. In your AI client, add the OneCart connection. In Claude Code, run:

    claude mcp add --transport http onecart https://app.getonecart.com/mcp
    
  2. Your browser opens a OneCart sign-in page. Sign in as you normally would.

  3. Choose the company the assistant should work with. If your login has more than one company, pick the right one here.

  4. Choose the permissions to grant. Read permissions (viewing your data) are pre-selected. Tick a write permission only if you want the assistant to be able to make changes to that area, such as updating stock. Leave the rest off.

  5. Click Approve. The assistant is now connected.

That is all. Nothing is copied or pasted, and no key is stored on your computer.

If your machine has no browser, most clients offer a paste-back option (in Claude Code, claude mcp login onecart --no-browser) that prints a link you can open on any device.

Option 2: Connect with an API key

Use this for a script or a client that does not sign in through a browser.

  1. In OneCart, go to Settings → API Keys (app.getonecart.com) and create a key. Choose the access it should have.

  2. In your client, add the OneCart connection with that key in the Authorization header. In Claude Code:

    claude mcp add --transport http onecart https://app.getonecart.com/mcp --header "Authorization: YOUR_API_KEY"
    

The key belongs to one company and only ever sees that company’s data, exactly like the OneCart API.

What the assistant can do

Every OneCart operation becomes something the assistant can do for you, for example:

  • Look things up — “How many orders are still pending?”, “What is my stock for SKU ABC-123?”, “Show me this week’s top sellers.”
  • Make changes — “Set the quantity for SKU ABC-123 to 40”, “Cancel order 100045” — but only if you granted the matching write permission.

The assistant works within the permissions you chose. If it tries to do something you did not allow, OneCart refuses and tells it so.

Managing and removing access

A connection you approved shows up in Settings → API Keys with a name like “MCP: Claude Code”. To disconnect, delete that key. The assistant loses access immediately.

For developers

The full technical reference, including the list of tools and how they map to the OneCart API, is on the developer portal at developers.getonecart.com.