• ACCESS
  • EXPERIMENTS
  • DISCREPANCIES
  • HUMAN

How to debug feature evaluations with your AI

Connect Statsig to your AI client to pull live experiment data. Once connected, your agent can investigate why a user is or isn't seeing a specific feature.

Ask AI about this page

Short answer

How can I debug feature evaluations with my AI?

Your AI uses Statsig tools to check gate statuses and layer values for specific users. This lets you see exactly why a user is or isn't hitting a feature flag. You'll get a breakdown of how the agent handles these requests below.

Where every issue lands.

Debugging outcomes

The AI sorts your troubleshooting requests into these specific categories.

ACCESS

Gate status checks

The AI confirms if a user is hitting a specific feature gate. You get a clear yes or no on feature availability.

EXPERIMENTS

Layer value verification

The AI pulls the exact parameters assigned to a user within a layer. This identifies if experiment weights are working as intended.

DISCREPANCIES

Flag mismatches

The AI compares expected vs actual values. You'll see exactly where a user's configuration deviates from your rollout plan.

HUMAN

Manual intervention

The AI flags issues it can't resolve through data alone. You'll decide when to manually adjust targeting or code logic.

The workflow

What your AI does when a debug request arrives.

Your agent acts as a bridge between your chat interface and your Statsig experiment data.

  1. Identify the user

    The AI prepares to look up specific user attributes or IDs you provide in chat.

    get_gate
  2. Check feature gates

    The agent looks up whether a specific feature is enabled for the target user.

    check_gate
  3. Verify experiment layers

    The agent pulls the specific values assigned to a user within a defined layer.

    get_layer
  4. Validate gate logic

    The AI checks the configuration of a gate to see if it matches the user's current state.

    get_gate

Try it

Copy these to start.

Use these prompts to begin debugging immediately.

Starting points

Replace the bracketed text with your actual user IDs, gate names, or layer names.

Statsig Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_ZEX4bsyQXMNxXPnw9oDygkK22SmvaLyaVC4MgykQ/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Statsig capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "statsig-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_ZEX4bsyQXMNxXPnw9oDygkK22SmvaLyaVC4MgykQ/mcp"
    }
  }
}
Copy into chat04
  • Check if user 12345 is enabled for the 'new_checkout_flow' gate.

  • What are the current layer values for user 'user_abc_99' in the 'pricing_test' layer?

  • Verify the gate evaluation for the 'beta_search' feature for user ID 8877.

  • Is user 'customer_77' actually in the experiment layer for 'ui_refresh'?

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Statsig once, then ask.

Just link your account once. Your credentials stay encrypted, and you can immediately start asking your agent about your feature flags.

Connect Statsig to your AI

FAQ

Common questions

  • 01

    Can my AI change feature flag settings?

    No. The AI can only read gate and layer data. You must use the Statsig dashboard to change any configurations.

  • 02

    Can the AI create new experiments?

    No. The tools are limited to checking existing gates and retrieving layer values.

  • 03

    Does the AI see all my user data?

    No. The AI only accesses the specific gate and layer information you ask it to check.

  • 04

    How does the AI know which user to check?

    You must provide a user ID or specific identifier in your prompt so the AI knows which profile to query.

  • 05

    Can the AI fix a broken experiment?

    No. The AI identifies the discrepancy, but you have to go into Statsig to fix the targeting or the code.

  • More questions about Statsig? The Connector page answers them. See everything the Statsig Connector can do

Connect Statsig to Claude, Cursor, ChatGPT & more