Skip to content

Guides

Agents and MCP

The 3Commerce MCP server gives an agent your shop as 116 tools, with the same keys and scopes as REST. Agents read freely and ask you before every change.

The endpoint

The server speaks streamable HTTP and authenticates with a shop key in the Authorization header. Give an agent a key with only the scopes it needs: a read-only key cannot change anything.

MCP URL
https://3commerce.com/api/mcp

Claude Code

Add the server once, then ask Claude about your shop in any session.

Terminal
claude mcp add --transport http 3commerce https://3commerce.com/api/mcp --header "Authorization: Bearer 3c_live_…"

Claude Desktop and Cursor

Clients that support remote servers take the URL and headers directly. Others run mcp-remote as a local bridge. In Claude Desktop the file is claude_desktop_config.json; in Cursor it is .cursor/mcp.json.

{
  "mcpServers": {
    "3commerce": {
      "url": "https://3commerce.com/api/mcp",
      "headers": {
        "Authorization": "Bearer 3c_live_…"
      }
    }
  }
}

Keys, roles, and approval

A key belongs to 1 shop, and its scopes are all it may do. Only a member whose role holds developers.manage can make one, and only with scopes that role holds, so an agent never outranks the person who set it up. Every tool that changes something is marked, so your client asks you first; every create takes an idempotency_key, so a retried call never makes 2 of anything. Sending a campaign, inviting staff, and paying out stay in the dashboard.

Resources and prompts

The shop://overview resource is a good first read: the shop, its last 30 days, and what waits on it: orders to fulfill, returns, refunds, and open conversations. read it first. It only includes what the key's scopes allow. The server also offers these prompts, which most clients show as slash commands:

  • daily_briefing: Summarize how the shop is doing and what needs attention today.
  • triage_inbox: Draft replies to open conversations, and send none without approval.
  • process_returns: Review open returns against the policy and propose a decision for each.

Tools

Each API operation is 1 tool, named after its id with _ for .. 60 of 116 are read-only; the rest are marked as mutating, so your client asks before running them.

Shop

Products

Collections

Orders

Returns

Customers

Income

Engagement

Marketing

Discounts

Email

Library

Analytics

Team

Sites

SEO

Social

Blog

Catalog

Checkout

Webhooks

Example prompts

  • “Which 5 products sold best this month, and which of them are low on stock?”
  • “Draft replies to every open conversation. Show me each one before you send it.”
  • “Find orders older than 3 days that are still unfulfilled and list them by customer.”
  • “Review the open returns against our policy and propose a decision for each.”
  • “Run the SEO audit and list the 5 fixes that matter most.”
  • “Create a paused 15% discount code for knitwear that ends on Sunday.”
  • “Draft an email campaign for repeat customers about the new arrivals. Do not send it.”
  • “Search the product library for linen shirts under $20 and import the 2 best.”

The built-in assistants

3Commerce runs 2 agents of its own on the same data. The shopping assistant, on the marketplace and on every shop site that keeps it on, answers shoppers: products, collections, shipping to their country, gift card balances, and where an order or a return stands once they give its number and email. On a shop's site it speaks for that shop only. The merchant assistant, in the dashboard, reads the shop for a signed-in member within their role, and only drafts changes, such as a paused discount or an email draft, for the member to approve.