Statsig logo
Analytics & MarketingAuth: OAuthHosting: Official hosted

Statsig MCP Server

Connect AI agents to Statsig experiments, feature gates, and metrics over its hosted MCP server.

Updated

What is Statsig MCP?

The Statsig MCP server is a Model Context Protocol server that lets AI agents and assistants work directly with your Statsig project — feature gates, experiments (A/B tests), dynamic configs, layers, metrics, and more — using natural language instead of the Statsig Console UI.

It is a remote, vendor-hosted server operated by Statsig at https://api.statsig.com/v1/mcp. Connecting clients authenticate over OAuth, which Statsig recommends over long-lived API keys because it supports scoped access and is easier to manage as you add more agents. Read-only access lets an agent explore your project; write-capable access lets it make changes such as creating gates or experiments.

Because the server supports both reads and writes, an agent can answer questions like "which feature gates are stale?" and also take action — for example creating a new gate or updating an experiment — within the permissions granted to it. The exact actions available to a given agent depend on the OAuth scopes and the permissions of the connected account.

Tools the Statsig MCP server exposes

ToolWhat it does
GatesList, inspect, and manage feature gates (feature flags).
ExperimentsList, inspect, and manage experiments / A/B tests.
Dynamic ConfigsRead and manage dynamic configuration objects.
LayersAccess layer definitions and their parameters.
AutotunesInspect and manage autotune (bandit-style optimization) configurations.
Metrics and Metric SourcesQuery metrics and their underlying metric sources.
Parameter StoresRead and manage parameter store entries.
SegmentsInspect and manage user segments.
Audit LogsRetrieve audit log history for the project.

Connect the Statsig MCP server

Claude Code

  1. 1

    Add the Statsig MCP server

    Add the remote server to your MCP config (e.g. via `claude mcp add`) pointing at the URL `https://api.statsig.com/v1/mcp`.

  2. 2

    Authenticate with OAuth

    On first use, Statsig prompts an OAuth sign-in in the browser; approve access for your project. No long-lived API key needed.

  3. 3

    Confirm the connection

    Ask Claude Code something like "list my stale Statsig gates" to verify the tools are available.

OAuth is recommended over a static Console API key. Use a read-only grant unless the agent needs to make changes.

Cursor

  1. 1

    Open MCP settings

    Go to Settings > Cursor Settings > Tools & Integrations and find the MCP servers section.

  2. 2

    Add the server config

    Add a `statsig` entry to `~/.cursor/mcp.json` with `"url": "https://api.statsig.com/v1/mcp"`.

  3. 3

    Authenticate on first use

    OAuth activates automatically the first time a Statsig tool is invoked; approve access in the browser.

Grant write permissions only if you want the agent to create or edit gates and experiments.

Sample use cases

A scheduled agent audits feature gates weekly

It queries Statsig for stale or fully-rolled-out gates and posts a cleanup list to the team.

A release-triggered agent reads experiment results

It pulls metric impact for the relevant experiments and drafts a launch summary.

An engineer asks an assistant about a config in plain language

The agent retrieves the dynamic config or layer parameters without opening the Statsig Console.

Security & permissions

The Statsig MCP server authenticates over OAuth (recommended) or, alternatively, a Statsig Console API key. With OAuth, the agent receives scoped access tied to the authorizing account rather than a long-lived shared secret. What the agent can do is bounded by the granted permissions: read-only access lets it explore gates, experiments, configs, metrics, and audit logs, while write-capable access additionally lets it create and modify resources such as gates and experiments. Grant the narrowest scope an agent needs — prefer read-only unless the workflow explicitly requires changes.

Using Statsig MCP with Gamut

In an automated Gamut workflow, a Gamut agent connects to the hosted Statsig MCP server (Gamut manages the OAuth connection) and uses it as a tool inside event- or schedule-triggered runs. For example, a nightly scheduled agent can query Statsig for stale or fully-rolled-out feature gates and metric movements, then summarize findings to Slack; or an event-triggered agent can read experiment results and configs to enrich a release report. Actions stay bounded by the permissions on the connected account, so you can keep the agent read-only or grant write access for managed changes.

Frequently asked questions

What is the Statsig MCP server?

It is a Model Context Protocol server, hosted by Statsig at https://api.statsig.com/v1/mcp, that lets AI agents read and manage your Statsig project — feature gates, experiments, dynamic configs, layers, metrics, and more — using natural language.

Is the Statsig MCP server free?

The MCP server is included with a Statsig account, and Statsig offers a free tier. Your access and limits follow your Statsig plan and the permissions of the connected account; see statsig.com/pricing for current details.

How do I connect the Statsig MCP server to Claude Code or Cursor?

Point your client's MCP config at https://api.statsig.com/v1/mcp. In Cursor, add a statsig entry with that URL to ~/.cursor/mcp.json; in Claude Code, add the remote server via your MCP config. OAuth sign-in is triggered automatically on first use.

Is the Statsig MCP server hosted or self-hosted?

It is vendor-hosted by Statsig as a remote server at https://api.statsig.com/v1/mcp — there is no service to run yourself. You authenticate over OAuth (or a Console API key) and connect your MCP client directly.