Skip to main content

MCP server for Claude, Cursor and ChatGPT

Connect Setpilot profit analytics to Claude, Cursor, or ChatGPT using the official MCP server.

Written by Tina
Updated today

Setpilot ships an official MCP (Model Context Protocol) server that exposes your profit analytics to AI tools like Claude Desktop, Cursor, and ChatGPT. Once connected, you can ask questions in plain English — "how did last week compare to the week before?" — and the AI pulls live data straight from your store.

What you can ask

  • "What was my CM4 profit last month?"

  • "Which 10 products had the highest marketing cost share last week?"

  • "Compare this month to the same month last year."

  • "Which SKUs are close to stocking out?"

  • "Pull the last 30 days of daily gross sales into a CSV."

The AI uses the same API v2 endpoints as any other integration — read-only, scoped per API key.

Available tools

The MCP server exposes the following tools. Each one maps to an API v2 endpoint.

Tool

What it returns

get_dashboard_summary

P&L summary for a year — revenue, CM1–CM4, costs.

get_daily_pnl

Daily revenue, cost, and CM breakdown for a date range.

get_cost_breakdown

Costs split by Product / Order Processing / Marketing / Other.

get_top_products

Top N products by revenue or CM.

get_customer_metrics

New vs returning, repeat rate, CLV-style metrics.

get_marketing

Ad spend per platform with ROAS.

get_orders

Paginated order list with search.

get_products

Paginated product list with cost data.

get_inventory

Inventory levels with low-stock flag.

Before you start

  1. Generate a store API key — see the API v2 article. Grant the scopes you want the AI to see (dashboard, orders, products, inventory).

  2. Install the AI tool you want to use — Claude Desktop, Cursor, or ChatGPT (plus a recent MCP-capable client).​

Connect Claude Desktop

  1. Open Claude Desktop and go to Settings → Developer → Edit Config.

  2. Add a new MCP server entry:

{"mcpServers": {"setpilot": {"command": "npx", "args": ["-y", "@setpilot/mcp-server"], "env": {"SETPILOT_API_KEY": "spa_sk_..."}}}}

  1. Save and restart Claude Desktop.

  2. Open a new conversation. The Setpilot tools appear in the tool picker.​

Connect Cursor

  1. Open Cursor Settings → MCP.

  2. Click Add new MCP server.

  3. Use npx -y @setpilot/mcp-server as the command and set SETPILOT_API_KEY in the environment.

  4. Save and start a new chat — the Setpilot tools become available.

Connect ChatGPT (Custom GPT)

For ChatGPT, use the HTTP mode of the MCP server through a Custom GPT Action. The server runs at https://mcp.setpilot.io/ and accepts the same Authorization: Bearer spa_sk_... header as API v2.

  1. In ChatGPT, create a new Custom GPT.

  2. Under Actions, import the OpenAPI spec from https://mcp.setpilot.io/openapi.json.

  3. Set the authentication to Bearer and paste your Setpilot API key.

Run the server yourself (Docker)

The MCP server is also published to GitHub Container Registry so you can host it yourself.

docker run -e SETPILOT_API_KEY=spa_sk_... -p 3000:3000 ghcr.io/setpilot/mcp-server:latest

The container exposes both stdio and HTTP transport modes. See the GitHub repo for full options.

Security notes

  • The MCP server is read-only — the AI cannot create, edit, or delete anything in your Setpilot account.

  • Scope the API key to only the data the AI should see.

  • Treat the API key the same as a password: keep it in an env var, do not paste it into chat.

  • Revoke the key from Setpilot Settings if the AI tool is compromised or uninstalled.​

Troubleshooting

Symptom

Likely cause

Fix

Tools not showing up in Claude

Config file path wrong or JSON invalid.

Validate the JSON, then fully restart Claude Desktop.

Authentication failed

API key revoked, expired, or pasted incorrectly.

Generate a new key in Setpilot and update the env var.

AI says no data for that scope

The API key lacks the scope the tool needs.

Edit the key in Setpilot and add the missing scope (for example, orders).

Rate limit errors

More than 120 requests per minute on a single key.

Split traffic across multiple keys or contact support for a limit increase.

Related articles

  • API v2: Store API keys — how to generate the key the MCP server needs.

  • Metrics overview — the definitions the AI will quote when answering.

Did this answer your question?