Developer

Install and configure the Apex MCP server

Connect Claude Desktop, Claude Code, or Cursor to Apex experiments with the Drip MCP server.

The Apex MCP server lets model clients read and manage Apex experiments through the Model Context Protocol. Use it when you want Claude Desktop, Claude Code, Cursor, or another MCP client to list tests, inspect a draft, start or pause an experiment, read goals, pull brand context, or generate QA preview URLs.

Prerequisites

  • Node.js 18 or newer.
  • An Apex API key with the permissions needed for the tools you plan to call.
  • Either DRIP_API_KEY in the MCP process environment or a saved CLI credential at ~/.drip/credentials.json.

The server reads configuration in this order:

SettingRequiredDefaultNotes
DRIP_API_KEYYes, unless CLI credentials existNoneTakes priority over saved credentials.
DRIP_BASE_URLNohttps://app.drip-apex.comUse only for non-production Apex environments.
~/.drip/credentials.jsonFallbackNoneShared with apex login; used when DRIP_API_KEY is not set.

Install

Run the packaged server with npx:

bash
npx -y @drip/mcp-server

For local monorepo development, build the package and run the compiled server:

bash
npm --prefix packages/mcp-server install
npm --prefix packages/mcp-server run build
node packages/mcp-server/dist/server.js

Claude Desktop

Add this to claude_desktop_config.json:

json
{
  "mcpServers": {
    "drip-ab-testing": {
      "command": "npx",
      "args": ["-y", "@drip/mcp-server"],
      "env": {
        "DRIP_API_KEY": "apx_your_key_here",
        "DRIP_BASE_URL": "https://app.drip-apex.com"
      }
    }
  }
}

If you already authenticated with apex login on the same machine, you can omit env and let the server read ~/.drip/credentials.json:

json
{
  "mcpServers": {
    "drip-ab-testing": {
      "command": "npx",
      "args": ["-y", "@drip/mcp-server"]
    }
  }
}

Claude Code

Use a project .mcp.json or user-level MCP config with the same server block:

json
{
  "mcpServers": {
    "drip-ab-testing": {
      "command": "npx",
      "args": ["-y", "@drip/mcp-server"],
      "env": {
        "DRIP_API_KEY": "apx_your_key_here",
        "DRIP_BASE_URL": "https://app.drip-apex.com"
      }
    }
  }
}

For a local checkout:

json
{
  "mcpServers": {
    "drip-ab-testing": {
      "command": "node",
      "args": ["./packages/mcp-server/dist/server.js"],
      "env": {
        "DRIP_API_KEY": "apx_your_key_here",
        "DRIP_BASE_URL": "https://app.drip-apex.com"
      }
    }
  }
}

Cursor

Add this to .cursor/mcp.json or Cursor's global MCP config:

json
{
  "mcpServers": {
    "drip-ab-testing": {
      "command": "npx",
      "args": ["-y", "@drip/mcp-server"],
      "env": {
        "DRIP_API_KEY": "apx_your_key_here",
        "DRIP_BASE_URL": "https://app.drip-apex.com"
      }
    }
  }
}

Verify

Restart the MCP client, then ask it to list Apex experiments. A valid setup can call list_experiments. If the server exits immediately with "No API key found", set DRIP_API_KEY for that MCP client or run:

bash
apex login

Troubleshooting

  • No API key found: set DRIP_API_KEY in the MCP config or create ~/.drip/credentials.json with apex login.
  • HTTP 401: the key is missing, expired, revoked, or not in the apx_ key family.
  • HTTP 403: the key exists but does not have permission for the requested API endpoint.
  • Non-production testing: set DRIP_BASE_URL to the target Apex base URL and keep production credentials out of that config.