open-index/open-npm huggingface dataset:
npm package: @opti-josh-holt/optimizely-fx-mcp
Description: An MCP server for Optimizely's Feature Experimentation
Author: Josh Holt
Latest version: 1.0.7

# Optimizely Feature Experimentation MCP Server

A Model Context Protocol (MCP) server that provides seamless integration with Optimizely's Feature Experimentation platform, enabling AI assistants to help manage feature flags, audiences, events, and generate SDK implementation code.

## 🚀 Features

### Project Management

- **Environment Management**: List and retrieve environment details and datafiles
- **Collaborator Management**: View project collaborators and permissions
- **Change History**: Track feature flag and project modifications over time

### Feature Flag Operations

- **Flag Management**: List, filter, and retrieve individual feature flags by key
- **Flag Status Monitoring**: Check flag status across different environments
- **Archive Management**: Filter flags by archived status

### Audience & Targeting

- **Audience Management**: List and retrieve audience definitions and targeting rules
- **Attribute Management**: Manage user attributes used for targeting
- **Event Tracking**: List and retrieve custom events for experimentation

### SDK Code Generation

- **React Setup**: Generate complete React SDK boilerplate with TypeScript support
- **Hook Examples**: Get working examples for `useDecision`, `useTrackEvent`, and `useFeature` hooks
- **Installation Guides**: Environment-specific installation instructions (browser, Node.js, React, Next.js)
- **Initialization Examples**: Complete SDK initialization code with various configuration options
- **Troubleshooting**: Comprehensive debugging guidance and common issue resolution

## 🔧 MCP Server Configuration

Add the following configuration JSON to your MCP client's config file:

```json
{
  "mcpServers": {
    "optimizely-fx": {
      "command": "npx",
      "args": ["-y", "@opti-josh-holt/optimizely-fx-mcp"],
      "env": {
        "API_ACCESS_TOKEN": "YOUR_API_KEY_HERE"
      }
    }
  }
}
```

Replace `API_ACCESS_TOKEN` with a REST API token from your profile in Optimizely. After adding the configuration, restart your application (Cursor or Claude Desktop).

## 💡 Example Prompts

Here are some example prompts you can use with this MCP server:

### Feature Flag Management

- "List all feature flags in my project"
- "Show me the details of the 'new_checkout_flow' feature flag"
- "What environments do I have configured?"
- "Get the datafile for my staging environment"

### Audience & Targeting

- "Show me all audiences in my project"
- "What attributes are available for targeting?"
- "List all custom events being tracked"

### SDK Implementation

- "Generate a React setup for Optimizely with TypeScript"
- "Show me examples of how to use the useDecision hook"
- "How do I install the Optimizely SDK in a Next.js project?"
- "Generate initialization code for a Node.js environment with polling configuration"
- "Help me troubleshoot why my feature flags aren't loading"

### Project Insights

- "Show me recent changes to my feature flags"
- "Who are the collaborators on this project?"
- "What's the change history for my project?"