npm package: @otterab/mcp
Description: Otter A/B Testing MCP server — manage projects, experiments, and results from any AI assistant
Latest version: 1.0.0

# Otter A/B MCP Server

> Use Otter A/B's API through the Model Context Protocol

A Model Context Protocol (MCP) server that connects AI assistants to [Otter A/B](https://www.otterab.com) for managing A/B tests, experiments, and results.

## Features

- Manage projects and experiments
- Create redirect, visual, and personalization tests
- Check experiment results and statistical significance
- Quick-create helpers for common experiment patterns
- Supports Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, and more

## Installation

Get your API key from [https://www.otterab.com](https://www.otterab.com) under **Settings → API & MCP**.

### Remote Hosted URL

```
https://www.otterab.com/mcp/{YOUR_API_KEY}/v2/mcp
```

### Running with npx

```bash
env OTTERAB_API_KEY=oab_live_... npx -y otterab-mcp
```

### Claude Code

```bash
# Remote hosted URL (recommended)
claude mcp add otterab --url https://www.otterab.com/mcp/YOUR_API_KEY/v2/mcp

# Or run locally via npx
claude mcp add otterab -e OTTERAB_API_KEY=oab_live_... -- npx -y otterab-mcp
```

### Claude Desktop

```json
{
  "mcpServers": {
    "otterab": {
      "url": "https://www.otterab.com/mcp/YOUR_API_KEY/v2/mcp"
    }
  }
}
```

Or run locally:

```json
{
  "mcpServers": {
    "otterab": {
      "command": "npx",
      "args": ["-y", "otterab-mcp"],
      "env": {
        "OTTERAB_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

### Cursor

```json
{
  "mcpServers": {
    "otterab": {
      "command": "npx",
      "args": ["-y", "otterab-mcp"],
      "env": {
        "OTTERAB_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

### VS Code

```json
{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "apiKey",
        "description": "Otter A/B API Key",
        "password": true
      }
    ],
    "servers": {
      "otterab": {
        "command": "npx",
        "args": ["-y", "otterab-mcp"],
        "env": {
          "OTTERAB_API_KEY": "${input:apiKey}"
        }
      }
    }
  }
}
```

## Available Tools

### Projects
- `list_projects` — List all projects
- `get_project` — Get project details
- `create_project` — Create a new project
- `update_project` — Update a project
- `delete_project` — Delete a project
- `get_project_stats` — Get project statistics
- `get_project_installation` — Get SDK snippet and status

### Experiments
- `list_experiments` — List experiments (with optional status filter)
- `get_experiment` — Get full experiment details
- `create_experiment_draft` — Create an experiment with variants, goals, and targeting
- `update_experiment_draft` — Update a draft experiment
- `delete_experiment` — Delete a draft experiment
- `start_experiment` — Start a draft experiment
- `pause_experiment` — Pause a running experiment
- `resume_experiment` — Resume a paused experiment
- `complete_experiment` — Complete an experiment
- `archive_experiment` — Archive a completed experiment

### Results
- `get_experiment_results` — Full results with segment filters
- `get_experiment_results_summary` — Quick summary for primary goal
- `get_experiment_timeseries` — Daily time series data

### Account
- `get_account` — Account details and plan info
- `get_account_members` — List team members
- `get_account_usage` — Plan limits and usage

### Capabilities
- `list_targeting_fields` — Available targeting fields and operators
- `list_goal_types` — Supported goal types
- `list_experiment_types` — Supported experiment types
- `list_visual_change_actions` — Available visual change actions

### Quick Create
- `quick_create_redirect_experiment` — One-step redirect test creation
- `quick_create_visual_experiment` — One-step visual test creation

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `OTTERAB_API_KEY` | Yes | Your Otter A/B API key |
| `OTTERAB_API_URL` | No | Custom API base URL (for self-hosted) |
| `HTTP_STREAMABLE_SERVER` | No | Set to `true` for HTTP transport |
| `PORT` | No | HTTP server port (default: 3000) |
| `HOST` | No | HTTP server host (default: 127.0.0.1) |

## License

MIT