statsig

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Statsig MCP

Statsig MCP

Overview

概述

Use the Statsig MCP server to inspect and manage Statsig entities, review rollout state, check experiment or gate results, inspect audit history, and answer configuration questions.
使用Statsig MCP服务器检查和管理Statsig实体,查看发布状态,核对实验或gate结果,检查审计历史,并解答配置相关问题。

Setup Statsig MCP

配置Statsig MCP

Important: you must check to see if the Statsig MCP server is running. If not, tell the user how to configure Statsig:
Add this to
~/.codex/config.toml
and replace the API key:
toml
[mcp_servers.statsig]
command = "npx"
args = ["--yes", "mcp-remote", "https://api.statsig.com/v1/mcp", "--header", "statsig-api-key: console-YOUR-CONSOLE-API-KEY"]
trust_level = "trusted"
Use a Statsig Console API key with the permissions you need (read-only for viewing, write for changes). Statsig API keys can be created under Settings -> Keys & Environments. Restart Codex after editing the config.
注意:你需要先确认Statsig MCP服务器是否正在运行。若未运行,请告知用户如何配置Statsig:
将以下内容添加到
~/.codex/config.toml
文件中,并替换API密钥:
toml
[mcp_servers.statsig]
command = "npx"
args = ["--yes", "mcp-remote", "https://api.statsig.com/v1/mcp", "--header", "statsig-api-key: console-YOUR-CONSOLE-API-KEY"]
trust_level = "trusted"
使用具备所需权限的Statsig控制台API密钥(仅查看用只读权限,修改用写入权限)。Statsig API密钥可在「设置 -> 密钥与环境」页面创建。编辑配置后请重启Codex。

Workflow

工作流程

  1. Analyze the user's query and determine the task type: discovery, inspection, results analysis, audit/history review, or config changes.
  2. Identify the relevant Statsig entity types and names when possible. Common entities include gates, experiments, dynamic configs, segments, metrics, metric sources, and param stores.
  3. Use list or search-style MCP tools first when the user does not provide an exact identifier. Use detail tools once you know the target object.
  4. For performance or rollout questions, use the appropriate results endpoints or audit logs to understand behavior over time.
  5. For create or update requests, confirm the intended object, preserve required fields, and apply the matching write tool carefully.
  6. Summarize the key findings or changes clearly, including the object name, current state, important rules or metrics, and any follow-up actions.
  1. 分析用户的查询内容,确定任务类型:发现、检查、结果分析、审计/历史记录查看或配置修改。
  2. 尽可能确定相关的Statsig实体类型和名称。常见实体包括gates、实验、动态配置、用户分群、指标、指标源及参数存储。
  3. 当用户未提供确切标识时,优先使用列表或搜索类MCP工具。确定目标对象后,再使用详情工具。
  4. 若涉及性能或发布相关问题,使用对应的结果端点或审计日志来了解其随时间的变化情况。
  5. 对于创建或更新请求,确认目标对象,保留必填字段,并谨慎使用对应的写入工具。
  6. 清晰总结关键发现或修改内容,包括对象名称、当前状态、重要规则或指标,以及后续需执行的操作。

MCP usage

MCP使用方法

Use the MCP to fetch, inspect, create, and update Statsig objects. For the current capability list and example prompts, read
references/statsig-mcp.md
.
使用MCP来获取、检查、创建和更新Statsig对象。关于当前功能列表及示例提示,请查看
references/statsig-mcp.md
文档。

Resources

资源

  • references/statsig-mcp.md
    : setup notes, MCP capabilities, and example prompts for Statsig MCP.
  • references/statsig-mcp.md
    :Statsig MCP的配置说明、MCP功能列表及示例提示。