# MCP server

> For AI agents: the index of these docs is at https://shippified.net/docs/llms.txt (every page it lists has a Markdown version like this one).

Connect Claude or any MCP client to your Shippified workspace with mcp-shippified and its 49 tools.

`mcp-shippified` is a [Model Context Protocol](https://modelcontextprotocol.io) server that exposes the Shippified API as tools. Once it's connected, Claude Desktop, Claude Code or any other MCP client can list and create orders, check tracking, manage bots and email sources, and set up webhooks in your workspace.

It's a thin layer over the [TypeScript SDK](https://shippified.net/docs/sdk): each tool call becomes one REST request authenticated with your API key. It talks over **stdio**, so the MCP client starts it as a local program. The current version is **0.2.2**. Source: [github.com/Shippified/mcp-shippified](https://github.com/Shippified/mcp-shippified).

## Before you start

- Node 18 or newer (for `npx`).
- A Shippified API key made for this purpose. Create it under **Settings → Developer** (see [Authentication](https://shippified.net/docs/authentication#create-an-api-key-in-the-dashboard)) and name it after the client, such as `Claude Desktop`, so you can revoke it on its own. Choose **Read-only** if the assistant should only look things up, or **Read & write** if it should add or change orders, bots, costs or webhooks.

:::hint{style="danger"}
A **Read & write** key lets the assistant delete orders and bots and create webhook subscriptions. Connect only clients you trust, and review tool calls before approving them.
:::

## Install

Run it straight from GitHub with `npx`. The repository ships the built, self-contained `dist/index.js`, so there's nothing to build:

```bash
SHIPPIFIED_TOKEN=sk_… npx -y mcp-shippified --help
```

It's on npm as [`mcp-shippified`](https://www.npmjs.com/package/mcp-shippified). To run the latest `main` instead, use `npx -y github:Shippified/mcp-shippified`.

The server accepts two flags: `--help` / `-h` (usage and environment variables) and `--version` / `-v` (prints `0.2.2`). With no flags it waits for JSON-RPC on stdin; run by hand it looks like it hangs, which is expected.

### What changed in 0.2.2

Published to npm (`npx -y mcp-shippified`). No code changes from 0.2.1.

### What changed in 0.2.1

- `create_api_key` takes an optional `scope` (`read` or `write`, default `write`), and `list_api_keys` shows each key's scope.
- `create_api_key` and `revoke_api_key` need a session token; with an API key they return a `403`.
- Built on SDK 0.2.1: orders have `createdAt`, rebuilds report `status`, intake outcomes include `skipped` and `test`.

## Configure

| Variable | Required | Default | Description |
| --- | --- | --- | --- |
| `SHIPPIFIED_TOKEN` | For every tool except `get_landing_stats`, `get_health` and `get_public_profile` | none | Your [API key](https://shippified.net/docs/authentication) (`sk_…`). A session token also works but expires after 14 days. |
| `SHIPPIFIED_BASE_URL` | No | `https://shippified.net` | Instance origin, without `/api`. |

With a **Read-only** key, only tools that read (`list_…`, `get_…`) work; anything that creates, changes, deletes, polls, syncs, re-parses or tests gets `Shippified API 403: This API key is read-only. Use a read & write key for this request.`

:::tabs
::tab{title="Claude Code"}
```bash
claude mcp add shippified -e SHIPPIFIED_TOKEN=sk_… -- npx -y mcp-shippified
```

Replace `sk_…` with your key, then run `claude mcp list` to check it connects.
::
::tab{title="Claude Desktop"}
Edit `claude_desktop_config.json` (in `~/Library/Application Support/Claude/` on macOS, `%APPDATA%\Claude\` on Windows), then restart Claude Desktop.

```json
{
  "mcpServers": {
    "shippified": {
      "command": "npx",
      "args": ["-y", "mcp-shippified"],
      "env": { "SHIPPIFIED_TOKEN": "sk_…" }
    }
  }
}
```
::
::tab{title="Other clients"}
Any client that launches stdio servers works:

- **Command:** `npx`
- **Arguments:** `-y`, `mcp-shippified`
- **Environment:** `SHIPPIFIED_TOKEN` and, optionally, `SHIPPIFIED_BASE_URL`
::
:::

:::hint{style="success"}
Desktop clients often start servers with a minimal `PATH`; if the client can't find `npx`, give its full path (for example the output of `which npx`).
:::

To debug outside a client, run the official MCP Inspector:

```bash
SHIPPIFIED_TOKEN="$SHIPPIFIED_API_KEY" \
  npx @modelcontextprotocol/inspector \
  npx -y mcp-shippified
```

## Tools

The server exposes **49 tools**. Each returns the API's JSON response as formatted text.

### Public and status (4)

| Tool | Arguments | API call |
| --- | --- | --- |
| `get_landing_stats` | none | `GET /api/landing-stats` (no token) |
| `get_health` | none | `GET /api/healthz` (no token) |
| `get_public_profile` | `username` | `GET /api/profile/:username` (no token) |
| `get_carrier_status` | none | `GET /api/carrier-status` (needs a token) |

### Workspace and orders (10)

| Tool | Arguments | API call |
| --- | --- | --- |
| `get_state` | none | `GET /api/state` |
| `list_orders` | `status` (`ordered`, `canceled`, `shipped`, `delivered`, `issue`), `store`, `source`, `carrier`, `hasTracking`, `from`, `to`, `q`, `limit`, `offset` | `GET /api/orders` |
| `get_order` | `id` | `GET /api/orders/:id` |
| `create_order` | `itemSummary` (required), `store`, `storeLabel`, `orderNumber`, `trackingNumber`, `carrier`, `total`, `costCents`, `salePriceCents`, `quantity`, `productUrl`, `imageUrl`, `sku`, `size`, `receivedAt`, `emailSourceId`, `eventType` | `POST /api/orders` |
| `update_order` | `id`, plus `salePriceCents` (a number, or `null` to clear), `costCents`, `estimatedDelivery`, `trackingNumber`, `carrier`, `orderNumber`, `itemSummary`, `quantity` | `PATCH /api/orders/:id` |
| `delete_order` | `id` | `DELETE /api/orders/:id` |
| `get_order_tracking` | `id` | `GET /api/orders/:id/tracking` |
| `refresh_order_tracking` | `id` | `POST /api/orders/:id/tracking/refresh` |
| `sync_tracking` | none | `POST /api/orders/sync-tracking` |
| `reparse_orders` | none | `POST /api/orders/reparse` |

### Bots (5)

| Tool | Arguments | API call |
| --- | --- | --- |
| `list_bots` | `limit`, `offset` | `GET /api/bots` |
| `get_bot` | `id` | `GET /api/bots/:id` |
| `create_bot` | `name` (required), `templateId`, `avatar`, `templateHint`, `outputWebhook`, `samplePayload`, `type` (`monitor`, `dropship`, `generic`) | `POST /api/bots` |
| `update_bot` | `id`, `name`, `slug`, `avatar`, `templateId`, `templateHint`, `outputWebhook`, `samplePayload`, `type` | `PATCH /api/bots/:id` |
| `delete_bot` | `id` | `DELETE /api/bots/:id` |

### Email (5)

| Tool | Arguments | API call |
| --- | --- | --- |
| `list_email_sources` | `limit`, `offset` | `GET /api/email-sources` |
| `get_email_source` | `id` | `GET /api/email-sources/:id` |
| `poll_email_source` | `id` | `POST /api/email-sources/:id/poll` |
| `rebuild_email_source` | `id` (required), `sinceDays` (1 to 365, default 30) | `POST /api/email-sources/:id/rebuild` |
| `import_email` | `raw`, `emailSourceId` (both required), `from` | `POST /api/email/import` |

### Templates (3)

| Tool | Arguments | API call |
| --- | --- | --- |
| `list_templates` | none | `GET /api/templates` (built-in shapes only) |
| `list_custom_templates` | none | `GET /api/templates/custom` |
| `detect_template` | `source` (`email` or `webhook`) and `sample` (both required), `draft` | `POST /api/templates/custom/detect` |

### Recurring costs (4)

| Tool | Arguments | API call |
| --- | --- | --- |
| `list_subscriptions` | `limit`, `offset` | `GET /api/subscriptions` |
| `create_subscription` | `name`, `costCents` (required), `currency`, `frequency` (`weekly`, `monthly`, `quarterly`, `yearly`), `startDate` (defaults to today), `endDate`, `category`, `notes`, `active` | `POST /api/subscriptions` |
| `update_subscription` | `id`, plus any of the fields above | `PATCH /api/subscriptions/:id` |
| `delete_subscription` | `id` | `DELETE /api/subscriptions/:id` |

### Share cards (3)

| Tool | Arguments | API call |
| --- | --- | --- |
| `list_shares` | none | `GET /api/shares` |
| `create_share` | `timeframe` (`7d`, `30d`, `90d`, `ytd`, `all`; default `30d`), `includeStats`, `includeCheckouts` | `POST /api/shares` |
| `delete_share` | `slug` | `DELETE /api/shares/:slug` |

### Billing and account settings (4)

| Tool | Arguments | API call |
| --- | --- | --- |
| `get_billing_usage` | none | `GET /api/billing/usage` |
| `create_billing_checkout` | `plan` (`monthly`, `yearly`), `successUrl`, `cancelUrl` | `POST /api/billing/checkout` |
| `create_billing_portal` | `returnUrl` | `POST /api/billing/portal` |
| `set_timezone` | `timezone` (IANA name, such as `America/New_York`) | `POST /api/account/timezone` |

### API keys (3)

| Tool | Arguments | API call |
| --- | --- | --- |
| `list_api_keys` | none | `GET /api/account/api-keys` (each key has `scope`) |
| `create_api_key` | `name` (required), `scope` (`read` or `write`, default `write`) | `POST /api/account/api-keys` (the response has the raw key). Session token only. |
| `revoke_api_key` | `id` | `DELETE /api/account/api-keys/:id`. Session token only. |

When `SHIPPIFIED_TOKEN` is an API key, `create_api_key` and `revoke_api_key` fail with `Shippified API 403: API keys can't manage API keys — use the dashboard.` Create and revoke keys in **Settings → Developer**.

### Outbound webhooks (6)

| Tool | Arguments | API call |
| --- | --- | --- |
| `list_webhook_subscriptions` | `limit`, `offset` | `GET /api/webhook-subscriptions` |
| `create_webhook_subscription` | `url`, `eventTypes` (required), `active` | `POST /api/webhook-subscriptions` (the response has the secret) |
| `update_webhook_subscription` | `id`, `url`, `eventTypes`, `active` | `PATCH /api/webhook-subscriptions/:id` |
| `delete_webhook_subscription` | `id` | `DELETE /api/webhook-subscriptions/:id` |
| `test_webhook_subscription` | `id`, `eventType` (default `order.created`) | `POST /api/webhook-subscriptions/:id/test` |
| `rotate_webhook_secret` | `id` | `POST /api/webhook-subscriptions/:id/rotate-secret` |

### Intake log (2)

| Tool | Arguments | API call |
| --- | --- | --- |
| `list_webhook_logs` | `limit` (1 to 500, default 100) | `GET /api/webhook-logs` |
| `clear_webhook_logs` | none | `DELETE /api/webhook-logs` |

## How the tools behave

The tool descriptions give the assistant these rules, so it can explain them to you:

- **Status can't be set.** It comes from parsing and carrier tracking. `list_orders` offers only the real status values, so a status filter always filters.
- **`update_order` is fill-missing-only.** `salePriceCents` can always change (`null` clears it). Every other field is written only if empty, and `itemSummary` only while the order is "Unparsed order". Adding a tracking number to an `ordered` order moves it to `shipped`.
- **`reparse_orders`** re-runs parsing on stored messages with the current shapes and your templates, keeping hand-entered values and carrier data, and returns `{ reparsed, changed, merged, removed, skipped }`. Use it after changing a template.
- **`rebuild_email_source` is destructive.** It re-reads the mailbox and replaces the orders that source produced in the window. It refuses up front, changing nothing, for forwarding sources and for sources that need reconnecting or are paused. It returns immediately; check `rebuilding` and `lastRebuild` with `get_email_source`. Edited orders and ones that also came from Discord or manual entry are kept.
- **`detect_template` is read-only.** It shows which template would win, whether an email would be ignored, and the order it would produce. Pass `draft` to test an unsaved template.
- **`import_email` creates real orders**, through the same pipeline as live mail (allowed senders, Message-ID dedup, plan limit).
- **`sync_tracking`** refreshes up to 50 in-flight orders on carriers with live tracking and uses carrier quota. A background tracker already does this, so it's rarely needed.
- **`create_webhook_subscription`** rejects private or internal URLs. The secret is in the response once. A subscription listed with `needsSecretRotation: true` gets no deliveries until `rotate_webhook_secret` runs.

## What the tools don't cover

These need the REST API or the dashboard:

- Saving custom templates (create, update, delete) and the `preview` / `match-preview` helpers. The assistant can dry-run with `detect_template` but not save.
- Creating, editing or deleting email sources, and connecting Gmail or Microsoft.
- One bot's log (`GET /api/bots/:id/logs`), the inbox, insights (profitability, calendar, leaderboard), workspace settings, username and profile visibility.
- Account export and deletion, which need a signed-in session and refuse API keys.
- Pausing or resuming an email source.

## Errors

API errors come back as tool errors (`isError: true`) with the text `Shippified API <status>: <message>`, followed by the full JSON error body when there is one, so fields such as `blockedSender` or `reason` reach the assistant. A missing or revoked key gives `Shippified API 401: Not authenticated`; a request the key's scope doesn't allow gives `Shippified API 403: …`. If `SHIPPIFIED_TOKEN` isn't set, authenticated tools fail before sending anything, with `ShippifiedClient: token required for …`.

:::expandable{title="The client says the server failed to start"}
Run `npx -y mcp-shippified --version` in a terminal. The first run downloads it from npm, so it needs network access. If `npx` isn't found, use its absolute path in the client config.
:::

:::expandable{title="Tools that change things return 403"}
The key is **Read-only**. Create a **Read & write** key, put it in `SHIPPIFIED_TOKEN` and restart the client. Creating or revoking API keys returns `403` with any API key; do that in the dashboard.
:::

:::expandable{title="Every tool returns 401"}
The key in `SHIPPIFIED_TOKEN` is wrong, revoked, or an expired session token. Create a fresh API key and restart the client.
:::

## Example prompts

- "List my orders from the last 7 days that still have no tracking number."
- "Add a manual order: Example Console Bundle from Best Buy, order BBY01-000000000001, cost $499.99."
- "Refresh tracking on order ord_mpvu9uim_aeh5t and tell me the latest carrier scan."
- "I just fixed my Hayha template. Re-parse my orders and tell me what changed."
- "Which template would parse this email? Don't import it."
- "Create a webhook subscription to [https://hooks.example.com/shippified](https://hooks.example.com/shippified) for order.shipped and order.delivered, then send it a test event."

:::cards
::card{title="TypeScript SDK" href="./sdk"} What the server is built on.
::card{title="Authentication" href="./authentication"} Key scopes, and creating and revoking the key it uses.
::card{title="Orders" href="./orders"} The rules behind the order tools.
:::

---

## For AI agents

- This page for a human reader: https://shippified.net/docs/mcp-server
- The whole space as one Markdown file: https://shippified.net/docs/llms-full.txt
- Live search + fetch over MCP: https://shippified.net/docs/_api/public/orgs/5b8789b1-481a-41f5-8e5a-5f30d11f5151/spaces/ae0c5af4-cc84-4899-9078-2faf8e7a6fc5/mcp
  - Install (Claude CLI): `claude mcp add api-docs --transport http https://shippified.net/docs/_api/public/orgs/5b8789b1-481a-41f5-8e5a-5f30d11f5151/spaces/ae0c5af4-cc84-4899-9078-2faf8e7a6fc5/mcp`

This Markdown is the same content the page renders — safe to quote and to ground answers in.
