Solid Commerce Docs

Solid Commerce in Grok CLI

Value. Solid Commerce inside Grok CLI for teams that have standardized on xAI for their AI workflows.

Choose this when your team uses Grok / Grok CLI as the primary AI surface.

Install

1. Create an API key. In your Solid Commerce workspace, open Developer → API keys → New (the /developer/keys page) and copy the secret — it is shown only once.

2. Add the MCP server to Grok CLI over stdio by adding it to ~/.grok/user-settings.json, passing your key:

{
  "mcpServers": {
    "solidcommerce": {
      "command": "npx",
      "args": ["-y", "@solidcommerce/mcp-server@alpha"],
      "env": {
        "SOLIDCOMMERCE_API_KEY": "YOUR_KEY",
        "SOLIDCOMMERCE_API_BASE_URL": "https://api.takeoffcommerce.com"
      }
    }
  }
}

SOLIDCOMMERCE_API_BASE_URL is required — the server's built-in default points at a legacy host without the /v1 API, so tool calls fail without it.

A hosted remote server (https://mcp.solidcommerce.com/mcp) with per-user OAuth is coming for the non-terminal surfaces — once live, it will also back the hosted Grok connector (Settings → Connectors → Custom at grok.com/connectors).

Try it

Ask Grok in natural language — "list 5 products from my Solid Commerce catalog" — or script against the SDK directly:

1. List today's orders

A read-only call — safe to run the moment you connect.

import { SolidCommerceClient } from '@solidcommerce/sdk';

const client = new SolidCommerceClient({
  baseUrl: 'https://api.solidcommerce.com',
  auth: { kind: 'bearer', token: process.env.SC_TOKEN! },
});

const since = new Date(Date.now() - 86_400_000).toISOString();
const { data } = await client.raw.GET('/v1/orders/orders', {
  params: { query: { created_after: since, limit: 50 } },
});
console.log(`${data?.data.length ?? 0} orders in the last 24h`);

2. Reprice a listing

A write — the audited reason is captured even if you forget to mention it. In a conversational host this surfaces a confirmation prompt first (every write tool is annotated destructiveHint).

await client.raw.PATCH('/v1/listings/list-items/{listItemId}/automation', {
  params: { path: { listItemId: 'li_1234' } },
  body: { list_price: 19.99, metadata: { price_change_reason: 'competitor match' } },
});

3. Check inventory across warehouses

Another read — see stock for every warehouse in one call.

const { data } = await client.raw.GET('/v1/inventory/warehouses');
for (const wh of data?.data ?? []) {
  console.log(wh.name, wh.available_units);
}

Availability

Hosted custom connectors require a paid Grok account; the CLI configuration above is self-serve today. Review our Privacy Policy and Terms.