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_KEYin the MCP process environment or a saved CLI credential at~/.drip/credentials.json.
The server reads configuration in this order:
| Setting | Required | Default | Notes |
|---|---|---|---|
DRIP_API_KEY | Yes, unless CLI credentials exist | None | Takes priority over saved credentials. |
DRIP_BASE_URL | No | https://app.drip-apex.com | Use only for non-production Apex environments. |
~/.drip/credentials.json | Fallback | None | Shared with apex login; used when DRIP_API_KEY is not set. |
Install
Run the packaged server with npx:
npx -y @drip/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/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:
{
"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:
{
"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:
{
"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:
{
"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:
apex loginTroubleshooting
No API key found: setDRIP_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
DRIP_BASE_URLto the target Apex base URL and keep production credentials out of that config.