Skip to main content

MCP configuration guides

Current MCP capabilities

ToolDescription
Get_Audit_LogsList audit logs in the project. Filter by:
  • id
  • sortKey
  • sortOrder
  • tags (single or array)
  • startDate
  • endDate
ToolDescription
Create_Dynamic_ConfigCreate new config
Get_Dynamic_Config_Details_by_IDRetrieve detailed config information
Get_List_of_Dynamic_ConfigsList all dynamic config objects in the project. Filter by:
  • creatorName
  • tags (single or array)
Update_Dynamic_Config_EntirelyReplace entire dynamic config with new targeting and values
ToolDescription
Create_ExperimentCreate new experiment
Get_Experiment_Details_by_IDGet experiment details
Get_Experiment_ResultsRetrieve experiment results/pulse data for a specific experiment. Analyze by:
  • date
  • cuped: whether or not to apply CUPED
  • confidence: Confidence threshold used for result calculations
Get_List_of_ExperimentsList all experiments in the project. Filter by:
  • status: Supported values include active, setup,decision_made , abandoned,archived, experiment_stopped,assignment_stopped
  • creatorName
  • tags
  • stale
Update_Experiment_EntirelyReplace entire experiment configuration (any excluded data will be removed)
ToolDescription
Create_GateCreate new gate/flag
Get_Gate_Details_by_IDGet complete gate configuration details
Get_Gate_ResultsRetrieve pulse/results for a specific gate rule.
  • cuped: Whether or not to apply CUPED. Defaults true
  • confidence: CI percentage, defaults 95
Get_List_of_GatesList all gates/flags. Filter by:
  • type (e.g., temporary, permanent, stale, tempmlate)
  • creatorName
  • tags
Update_Gate_EntirelyReplace entire gate setup with new rules and settings (any excluded data will be removed)
ToolDescription
Get_List_of_Metric_SourcesList all metric sources in the project
Get_List_of_MetricsList all metrics in the project. Filter by:
  • showHiddenMetrics
  • tags
  • filters (supports any of and all of)
Get_Metric_Definition_by_IDGet the full definition for a metric, including its type, source, and configuration details
ToolDescription
Get_List_of_SegmentsList all segments in the project
Update_SegmentUpdate an existing segment. Specifically:
  • Update rules for conditional segment types
  • Add IDs to user stores and ID lists
Need other functions? We’re happy to consider additions by request, reach out in Slack.

Use Cases

The Statsig MCP server now supports both GET and POST requests. This means tools can not only read data (like stale gates) but also make updates, if your API key has write permissions. We’ve found the Statsig MCP server especially useful for:
  • Repetitive tasks like cleaning up stale gates
  • Summarizing console information in your IDE workflows
  • Bulk creating or deleting gates, and making the necessary changes in your code

Example prompt for stale gate cleanup

You are an expert, diligent Software engineer with the sole goal of reducing the amount of tech debt in the code base. This code base, making use of best practices, leverages feature gates liberally using Statsig. As gates complete their lifecycle in Statsig, they may end up "stale" which means that they're enabled, but no longer checked. Your job is to find these gates, and refactor the codebase to no longer check the gate (instead, changing the check to a constant value).

You should follow coding best practices:
- You should not simply replace gate calls with "True" or "False" but instead carefully trace the logic through to where it is used and change the behavior that way - adjusting the code in minor ways to make the default behavior what the value is that the gate was returning
- You should always strive to write minimal code - readable but terse, never longer than it needs to be
- You should never write comments or debug statements.

You should use the statsig-local MCP to list feature gates, then look for gates that are marked as stale. You should then grep the codebase for that feature flag name, and do a minimal rewrite of the code to no longer use Statsig, removing the checkGate call or similar. When you use the MCP use the get /console/v1/gates endpoint and parameters type="STALE" and limit =10. You should select only one gate to do this with, before stopping. If you cannot find the gate after a grep, try the next one you found using the MCP. Once you successfully remove a gate, return.