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
APEX_API_KEYin the MCP process environment or a saved user/shop CLI credential at~/.drip/credentials.json. User keys minted byapex loginare supported.
The server reads configuration in this order. Legacy DRIP_API_KEY and DRIP_BASE_URL names remain working fallbacks:
| Setting | Required | Default | Notes |
|---|---|---|---|
APEX_API_KEY | Yes, unless CLI credentials exist | None | Takes priority over saved credentials; apx_uk_… is treated as a user key. |
APEX_BASE_URL | No | https://app.drip-apex.com | Use only for non-production Apex environments. |
DRIP_ORG / DRIP_SHOP | For user-key context | Saved context | Override the org/shop selected by apex use. |
~/.drip/credentials.json | Fallback | None | Shared with apex login; the saved user key is preferred over a saved shop key. |
Install
Run the packaged server with npx:
npx -y @drip-apex/mcp-serverFor local monorepo development, build the package and run the compiled server:
npm --prefix packages/mcp-server install
npm --prefix packages/mcp-server run build
node packages/mcp-server/dist/server.jsClaude Desktop
Add this to claude_desktop_config.json:
{
"mcpServers": {
"drip-ab-testing": {
"command": "npx",
"args": ["-y", "@drip-apex/mcp-server"],
"env": {
"APEX_API_KEY": "apx_your_key_here",
"APEX_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: Resolution is APEX_API_KEY (with DRIP_API_KEY fallback), saved user key, then saved shop key. Set DRIP_ORG/DRIP_SHOP to override saved user-key context.
{
"mcpServers": {
"drip-ab-testing": {
"command": "npx",
"args": ["-y", "@drip-apex/mcp-server"]
}
}
}Claude Code
Use a project .mcp.json or user-level MCP config with the same server block:
{
"mcpServers": {
"drip-ab-testing": {
"command": "npx",
"args": ["-y", "@drip-apex/mcp-server"],
"env": {
"APEX_API_KEY": "apx_your_key_here",
"APEX_BASE_URL": "https://app.drip-apex.com"
}
}
}
}For a local checkout:
{
"mcpServers": {
"drip-ab-testing": {
"command": "node",
"args": ["./packages/mcp-server/dist/server.js"],
"env": {
"APEX_API_KEY": "apx_your_key_here",
"APEX_BASE_URL": "https://app.drip-apex.com"
}
}
}
}Cursor
Add this to .cursor/mcp.json or Cursor's global MCP config:
{
"mcpServers": {
"drip-ab-testing": {
"command": "npx",
"args": ["-y", "@drip-apex/mcp-server"],
"env": {
"APEX_API_KEY": "apx_your_key_here",
"APEX_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 APEX_API_KEY for that MCP client or run:
apex loginTroubleshooting
No API key found: setAPEX_API_KEYin the MCP config or create~/.drip/credentials.jsonwithapex login.HTTP 401: the key is missing, expired, revoked, or not in theapx_key family.HTTP 403: the key exists but does not have permission for the requested API endpoint.- Non-production testing: set
APEX_BASE_URLto the target Apex base URL and keep production credentials out of that config.