Skip to content

Connect an MCP client ​

CommerceAI speaks the Model Context Protocol over Streamable HTTP, so most MCP clients can connect with a URL and a header.

SettingValue
Server URLhttps://commerceai.ai/mcp/
TransportStreamable HTTP
Auth headerAuthorization: Bearer <your key>

Client configuration ​

Claude Desktop uses the mcp-remote bridge to connect to the remote server. Add its configuration to claude_desktop_config.json, then restart Claude Desktop. For Cursor, use ~/.cursor/mcp.json or your project's .cursor/mcp.json.

json
{
  "mcpServers": {
    "commerce-ai": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://commerceai.ai/mcp/",
        "--header",
        "Authorization: Bearer ${COMMERCEAI_API_KEY}"
      ],
      "env": {
        "COMMERCEAI_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
json
{
  "mcpServers": {
    "commerce-ai": {
      "url": "https://commerceai.ai/mcp/",
      "headers": {
        "Authorization": "Bearer <YOUR_API_KEY>"
      }
    }
  }
}
bash
claude mcp add --transport http commerce-ai \
  https://commerceai.ai/mcp/ \
  --header "Authorization: Bearer <YOUR_API_KEY>"

For the Python MCP SDK example and the complete response object, see Quickstart.

Verify the connection ​

Ask your agent something that needs product data:

Find me a stainless steel French press under $40 and compare the top three.

The client should show a shopping_agent tool call followed by a list of products.

Prompting tips

Include a budget, a category and one or two must-have attributes. Specific queries return tighter results and use fewer tokens in the agent's context.