UNPKG

@statsig/mcp-test

Version:

Statsig MCP Server (TEST VERSION) - Making your AI context-aware with feature flags, experiments, and analytics

90 lines (65 loc) โ€ข 2.11 kB
# Statsig MCP Server This server implements the Model Context Protocol (MCP) for Statsig API integration, supporting both stdio and SSE transports. It allows AI assistants to interact with your Statsig feature flags, experiments, and analytics data. ## Quick Start (Recommended) The easiest way to get started is using our CLI installer: ```bash npx @statsig/mcp ``` This will: - ๐Ÿš€ Install and build the MCP server - ๐Ÿ”‘ Prompt for your Statsig API key - ๐Ÿ“‹ Generate and copy the configuration to your clipboard - โœจ Provide step-by-step instructions ## Manual Installation If you prefer to install manually: ```bash npm install @statsig/mcp ``` Then build the project: ```bash npm run build ``` ## Configuration ### Integration with MCP Client Config To use this server with an MCP client, configure your `mcp.json` as follows: #### Using stdio transport (default) ```json { "mcpServers": { "Statsig": { "command": "node /path/to/node_modules/@statsig/mcp/build/index.js", "env": { "STATSIG_API_KEY": "console-YOUR-CONSOLE-KEY" } } } } ``` #### Using SSE transport For clients that support SSE transport (like some web-based interfaces): ```json { "mcpServers": { "Statsig": { "url": "http://localhost:3000/sse?STATSIG_API_KEY=console-<your-console-key>" } } } ``` โš ๏ธ **Security Note**: SSE transport passes the API key in the URL. While this data is encrypted when using HTTPS, we recommend proceeding with caution in production environments. ## Getting Your API Key 1. Visit [Statsig Console](https://console.statsig.com/api_keys) 2. Create a new Console API key 3. Copy the key (it should start with `console-`) ## Features This MCP server provides access to: - ๐ŸŽฏ Feature Gates - ๐Ÿงช Dynamic Configs - ๐Ÿ“Š Experiments - ๐Ÿ“ˆ Metrics and Analytics - ๐Ÿ‘ฅ User Segments - ๐Ÿท๏ธ Tags and Organization ## Support - ๐Ÿ“– [MCP Documentation](https://modelcontextprotocol.io/) - ๐Ÿ› [Report Issues](https://github.com/statsig-io/mcp-statsig/issues) - ๐Ÿ’ฌ [Statsig Slack Community](https://statsig.com/slack)