Back to Developer

MCP Integration

Connect your WhaleTools store to external AI clients through the Model Context Protocol. Use Claude Desktop, Cursor, or any MCP-compatible client to manage your business.

Connect Claude Desktop

Add the following to your claude_desktop_config.json file. On macOS, this is located at ~/Library/Application Support/Claude/claude_desktop_config.json.

{
  "mcpServers": {
    "whaletools": {
      "command": "npx",
      "args": ["-y", "whale-code", "mcp", "--store", "your-store-id"],
      "env": {
        "WHALETOOLS_API_KEY": "your-api-key"
      }
    }
  }
}

Connect Cursor

In Cursor, open Settings and navigate to the MCP section. Add a new server with the following configuration in your .cursor/mcp.json file.

{
  "mcpServers": {
    "whaletools": {
      "command": "npx",
      "args": ["-y", "whale-code", "mcp", "--store", "your-store-id"],
      "env": {
        "WHALETOOLS_API_KEY": "your-api-key"
      }
    }
  }
}

Available Tools

The MCP server exposes the following tool categories. Each tool maps to a WhaleTools API endpoint and can be called by any connected AI client.

Orders

listgetcreateupdatecancel

Inventory

listgetadjusttransfer

Customers

listgetcreateupdateenrich

Products

listgetcreateupdate

Analytics

salesinventorycustomers

Email

sendtemplates

Workflows

listtriggerstatus

Authentication

The MCP server authenticates using a WhaleTools API key. Generate one from your dashboard.

1

Go to your API Keys dashboard

Navigate to Dashboard → API Keys to manage your credentials.

2

Create a new API key

Give it a descriptive name like “MCP Server” and copy the key immediately. It will only be shown once.

3

Set the environment variable

Add the key to your MCP configuration or export it in your shell.

export WHALETOOLS_API_KEY="wt_live_..."}