Integration · Statsig

Experiments and gates as MCP tools.

Statsig is the modern experimentation platform that combines feature flags, experiments, and product analytics in one.

The MCP exposes full CRUD across experiments, gates, dynamic configs, layers, and segments, plus CUPED-adjusted results. The same platform OpenAI, Notion, Brex, and Whatnot use for shipping at speed. The agent runs the platform end-to-end through prompts; the Statsig UI remains for stakeholders who prefer the dashboard.

Official MCPBuilt-in CUPED, holdouts, warehouse-native architecture.

What you can do via MCP

Example prompts the agent runs.

  • List all active experiments and rank by days remaining.

    Pulls running experiments via the Statsig MCP, sorts by remaining duration, and surfaces the ones nearest a decision.

  • Find feature gates marked stale and refactor my codebase to remove them.

    Cross-references stale gates with codebase grep results, then opens a PR removing the gate calls and the gate config in one pass.

  • Get experiment results for checkout-redesign with CUPED applied.

    Returns variance-reduced results plus confidence intervals; recommends ship/iterate/roll-back based on primary metric movement.

  • Create a 50/50 A/B experiment on the pricing page tracking purchase_completed.

    Sets up the experiment with the right targeting, primary metric, and CUPED config; returns the experiment ID and the integration snippet.

  • Brainstorm three experiment ideas based on past wins in the onboarding funnel.

    Reads past experiment results from the Statsig project, identifies winning patterns, and proposes follow-on experiments grounded in the data.

Statsig · MCP

Initial experiment creation from a brief. The agent populates the experiment config, sets CUPED on the primary metric, and returns the integration snippet for the SDK.

Statsig MCP
docs
# Statsig MCP, called via the agent runtime
mcp.statsig.create_experiment({
  name: "pricing-page-redesign",
  description: "Test new pricing page hierarchy vs control",
  primary_metric: "purchase_completed",
  cuped: { enabled: true, lookback_days: 30 },
  groups: [
    { name: "control", size: 50 },
    { name: "treatment", size: 50 }
  ],
  hypothesis: "New pricing card layout increases purchase completion."
})

# Returns experiment_id, embed snippet, and dashboard URL
One command sample showing how the agent talks to Statsig. The MCP exposes the platform's primitives as tools; the agent translates the prompt into the right call.

MCP integration

Statsig MCP server.

Server
Configured via the @statsig/mcp npm package; see Statsig docs
Auth
Statsig API key (Console > API Keys)
Hosting
Local (npx or installed package)
  • Full read and write across experiments, gates, dynamic configs, layers, segments
  • CUPED-adjusted results plus confidence intervals exposed as tools
  • Setup guides for ChatGPT, Cursor, Claude Code, Codex; agent-skills integration
  • Companion Statsig CLI for some operations; MCP is the primary AI interface

Statsig docs

Visual demonstration

What this looks like in practice.

Statsig/Experiment results
Ship treatment

pricing-page-redesign

Primary metric: purchase_completed (CUPED)

VariantMetricLift95% CIp
Controlcontrol12.40%baseline
Treatment13.71%+10.56%[4.20, 17.00]0.002
Running
14d
N
184,200

CUPED reduced variance by 31%. Effect held across mobile and desktop segments. Recommendation: ship treatment.

CUPED-adjusted results delivered via the MCP. Confidence interval excludes zero; the agent recommends ship.
Statsig· Experiments4 active
  • pricing-page-redesign

    Running
    Metric purchase_completedValue 13.71%Lift +10.56%Remaining 7d
  • checkout-button-color

    Decided · Ship
    Metric checkout_startedValue 31.4%Lift +4.20%
  • onboarding-skip-step

    Running
    Metric activation_d7Value 47.2%Lift +1.10%Remaining 3d
  • homepage-hero-copy

    Decided · Iterate
    Metric signup_completedValue 8.9%Lift -0.30%
The agent's view of the experiment portfolio. Sorted by days remaining; running experiments with lift highlighted for review.

CLI alternative

Statsig CLI for some operations; MCP for AI workflows.

Statsig ships a CLI for build-time gate evaluations and config codegen. For AI-driven experimentation work the MCP is the primary interface; the CLI fills in for CI integration and bulk operations the agent runtime is not the right place for.

Pairs with these skills

The PM-experimentation skill suite.

This integration pairs with the forthcoming experiment-design, experimentation-analytics skills. The skill landing pages and SKILL.md sources land in subsequent dispatches; cross-link hyperlinks are added when the skill pages ship.