Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Statsig MCP server

Vendor MCP
Open markdown

The Statsig MCP connector routes your AI agent's tool calls to Statsig's own MCP server through Scalekit. Each user signs in to Statsig once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 48 tools.

Tools
48
What they doRead · write · destructive
47 · 0 · 147 read0 write1 destructive
Users sign in with
OAuth app
Your own Statsig MCP server app

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Statsig MCP connection

    In AgentKit > Connections, create a Statsig MCP connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    Statsig MCP server connections use your own OAuth app. Register one with Statsig MCP server and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Statsig MCP connection.

  5. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'statsigmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Statsig MCP:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'statsigmcp_get_context',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • statsigmcp_cluster_log_patternsCluster similar log lines into templates (same as `statsig-query log-patterns`).Read-only

    Cluster Log Patterns

    Cluster similar log lines into templates (same as `statsig-query log-patterns`). Use after `Query_Logs_Explorer` when raw lines are too noisy. Pass a Logs Explorer filter (e.g. `service:scrapi AND tier:latest AND level:error`) — do not wrap in `#logs{ }`. Statsig/OpenAI internal organizations only (mirrors CAPI `@OpenAIAndStatsigOrgOnly`). Optional: `field` (default clusters on log message field), `limit`, time window (`start_ts`/`end_ts` in ms).

    Inputs

    paramsobjectrequired
    Request parameters object. Contains the path and query values for this call.
  • statsigmcp_fetchFetch the full document for a search result id.Read-only

    fetch

    Fetch the full document for a search result id. Use the id returned by search.

    Inputs

    idstringrequired
    ID of the search result document to fetch, as returned by the search tool.
  • statsigmcp_get_audit_logsList audit logs for this Statsig project.Read-only

    Get Audit Logs

    List audit logs for this Statsig project. Supports filtering by id, sorting, tags, date range, and pagination.

    Inputs

    paramsobjectrequired
    Request parameters object. Contains the path and query values for this call.
  • statsigmcp_get_autotune_eligible_reviewersList the users and reviewer groups eligible to approve/reject a review of this autotune experiment.Read-only

    Get Autotune Eligible Reviewers

    List the users and reviewer groups eligible to approve/reject a review of this autotune experiment. Use this to pick valid reviewer_ids / reviewer_group_ids when creating or editing an autotune review. The response carries everyone_eligible (true when anyone may review), users (the flattened, deduped set of eligible individuals), and groups (each with its member user_ids). Note: project admins can always review and are NOT enumerated here. path_id = the autotune's ID.

    Inputs

    paramsobjectrequired
    Request parameters object. Contains the path and query values for this call.
  • statsigmcp_get_autotune_review_by_idGet a single review for an autotune experiment by its review ID, including its status, proposed change type, author, and requested reviewers.Read-only

    Get Autotune Review by ID

    Get a single review for an autotune experiment by its review ID, including its status, proposed change type, author, and requested reviewers. A review is a proposed change that goes through an approve → commit lifecycle before it is applied. path_id = the autotune's ID; path_reviewID = the review ID (from Get_List_of_Autotune_Reviews or Create_Autotune_Review).

    Inputs

    paramsobjectrequired
    Request parameters object. Contains the path and query values for this call.
  • statsigmcp_get_contextBootstrap the authenticated Statsig MCP session.Read-only

    Get Context

    Bootstrap the authenticated Statsig MCP session. Returns bounded organization, selected project, environment, effective API-key permissions, review settings, accessible product areas, project environments, event sources, metrics, default timezone, and relevant links. The project includes whether new entities require a Target App or a team, with bounded Target App and team names to choose from. The API key already selects one project, so no project ID is required. Use scope for common bundles and fields/limit to request only the context sections you need.

    Inputs

    fieldsarray
    Top-level fields to return. Omit to use scope. Field selection can cross scopes.
    limitinteger
    Maximum metrics, event sources, Target Apps, and teams to return when requested (default 20, max 50).default 20
    scopestring
    Context bundle to return when fields is omitted. session is the default bootstrap; project adds bounded project collections and links; all returns both.one of sessionprojectalldefault session
  • statsigmcp_get_dynamic_config_details_by_idGet the details (including rules, return values, and more) for a Dynamic Config (static, targetable JSON) in the Statsig console.Read-only

    Get Dynamic Config Details by ID

    Get the details (including rules, return values, and more) for a Dynamic Config (static, targetable JSON) in the Statsig console.

    Inputs

    paramsobjectrequired
    Request parameters object. Contains the path and query values for this call.
  • statsigmcp_get_dynamic_config_eligible_reviewersList the users and reviewer groups eligible to approve/reject a review of this dynamic config.Read-only

    Get Dynamic Config Eligible Reviewers

    List the users and reviewer groups eligible to approve/reject a review of this dynamic config. Use this to pick valid reviewer_ids / reviewer_group_ids when creating or editing a dynamic config review. The response carries everyone_eligible (true when anyone may review), users (the flattened, deduped set of eligible individuals), and groups (each with its member user_ids). Note: project admins can always review and are NOT enumerated here. path_id = the dynamic config's name/ID.

    Inputs

    paramsobjectrequired
    Request parameters object. Contains the path and query values for this call.