0.0.5 โ€ข Published 2 months ago

@statsig/mcp-test v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

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:

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:

npm install @statsig/mcp

Then build the project:

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)

{
  "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):

{
  "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
  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