Bucket

by bucketco

10 stars
10.1k downloads
Not rated
GitHub

About

Flag features directly from chat in your code editor, including VS Code, Cursor, Windsurf, Claude Code - any IDE with MCP support.

Details

Author
bucketco
Repository
reflagcom/javascript
GitHub stars
10
Downloads
10,131
License
MIT License
Categories
Developer Tools, Infrastructure, Community, Design, AI, Knowledge Base, API, Frontend

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Bucket
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

The CLI creates a reflag.config.json file in your project directory when you run reflag init. This file contains all the necessary settings for your Reflag integration.

npx reflag init

Here are all the configuration options available in the reflag.config.json file:

{
  "$schema": "https://unpkg.com/@reflag/cli@latest/schema.json",
  "baseUrl": "https://app.reflag.com",
  "apiUrl": "https://app.reflag.com/api",
  "appId": "ap123456789",
  "typesOutput": [
    {
      "path": "gen/flags.d.ts",
      "format": "react"
    }
  ]
}

| Option | Description | Default |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| $schema | Autocompletion for the config. latest can be replaced with a specific version. | "https://unpkg.com/@reflag/cli@latest/schema.json" |
| baseUrl | Base URL for Reflag services. | "https://app.reflag.com" |
| apiUrl | API URL for Reflag services (overrides baseUrl for API calls). | "https://app.reflag.com/api" |
| appId | Your Reflag application ID. | Required |
| typesOutput | Path(s) where TypeScript types will be generated. Can be a string or an array of objects with path and format properties. Available formats: react and node. | "gen/flags.ts" with format "react" |

You can override these settings using command-line options for individual commands.

reflag init

Initialize a new Reflag configuration in your project. Creates a `reflag.config.json` file with your settings and prompts for any required information not provided via options. Options: `--overwrite`: Overwrite existing configuration file if one exists.

reflag new

All-in-one command to get started quickly. Combines `init`, flag creation, and type generation in a single step. Options: `--key`: Specific key for the flag, `--app-id`: App ID to use, `--key-format`: Format for flag keys, `--out`: Path to generate TypeScript types, `--format`: Format of the generated types.

reflag login

Authenticate with your Reflag account. Stores your credentials securely for subsequent operations.

reflag logout

Sign out from your Reflag account and remove stored credentials.

reflag flags create

Create a new flag in your Reflag app. Guides you through the flag creation process with interactive prompts if options are not provided. Options: `--key`: Specific key for the flag, `--app-id`: App ID to use, `--key-format`: Format for flag keys.

reflag flags list

List all flags for the current app. Helps you visualize what flags are available and their current configurations.

reflag flags types

Generate TypeScript types for your flags. Ensures type safety when using Reflag flags in your TypeScript/JavaScript applications. Options: `--app-id`: App ID to use, `--out`: Path to generate TypeScript types, `--format`: Format of the generated types.

reflag rules

Sets up AI-specific rules for your project, enabling AI tools to better understand how to work with Reflag flags. Options: `--format`: Format to add rules in (`cursor` or `copilot`), `--yes`: Skip confirmation prompts.

reflag mcp

Configure your editor or AI client to connect with Reflag's remote MCP server. Options: `--editor`: The editor/client to configure (e.g., `cursor`, `vscode`, `claude`, `windsurf`), `--scope`: Whether to configure settings globally or locally for the project.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "bucket": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

- Initialize project config— Ask to runreflag initto create areflag.config.jsonwith your app ID and type output settings.
- Create a new flag— Usereflag flags createto add a flag with a custom key and key format for your app.
- List existing flags— Runreflag flags listto view all flags and their configurations for the current app.
- Generate TypeScript types— Executereflag flags typesto produce type-safe flag definitions inreactornodeformat.
- Set up AI assistant rules— Runreflag rulesto add Reflag context files for Cursor or GitHub Copilot integration.
- Configure MCP connection— Usereflag mcpto connect your editor (Cursor, VS Code, Claude, or Windsurf) to the remote Reflag MCP server.

Command-line interface for interacting with Reflag services. The CLI allows you to manage apps, flags, authentication, and generate TypeScript types for your Reflag flags. With this tool, you can streamline your flagging workflow directly from your terminal.

Install the CLI as a development dependency in your project:

# npm npm install --save-dev @reflag/cli # yarn yarn add --dev @reflag/cli

Run thenewcommand from your project's root directory to initialize the CLI, create a flag, and generate TypeScript types in one step:

# npm npx reflag new # yarn yarn reflag new

If you're migrating from the Bucket CLI, here are the key changes to be aware of:

- Command name: Changed frombuckettoreflag
- Type definitions file: Renamed fromfeatures.d.tstoflags.d.ts(manually remove the old file if it was committed)
- Authentication file: Changed from.bucket-authto.reflag-auth(rename or remove the old file)
- Configuration file: Changed frombucket.config.jsontoreflag.config.json(rename or remove the old file)
- Command:featurescommand is nowflags
- Environment variable: UseREFLAG_API_KEYinstead ofBUCKET_API_KEY

Important: Update your scripts, build steps, and.gitignorepatterns to reflect these changes.

For more control, you can run each command individually:

# Initialize Reflag in your project (if not already setup) npx reflag init # Create a new flag npx reflag flags create "My Flag" # Generate TypeScript types for your flags npx reflag flags types

The CLI creates areflag.config.jsonfile in your project directory when you runreflag init. This file contains all the necessary settings for your Reflag integration.

Here are all the configuration options available in thereflag.config.jsonfile:

{ "$schema": "https://unpkg.com/@reflag/cli@latest/schema.json", "baseUrl": "https://app.reflag.com", "apiUrl": "https://app.reflag.com/api", "appId": "ap123456789", "typesOutput": [ { "path": "gen/flags.d.ts", "format": "react" } ] }

You can override these settings using command-line options for individual commands.

Initialize a new Reflag configuration in your project. This creates areflag.config.jsonfile with your settings and prompts for any required information not provided via options.

- --overwrite: Overwrite existing configuration file if one exists.
- --app-id <id>: Set the application ID.
- --key-format <format>: Set the key format for flags.

All-in-one command to get started quickly. This command combinesinit, flag creation, and type generation in a single step. Use this for the fastest way to get up and running with Reflag.

npx reflag new "My Flag" [--app-id ap123456789] [--key my-flag] [--key-format custom] [--out gen/flags.ts] [--format react]

- --key: Specific key for the flag.
- --app-id: App ID to use.
- --key-format: Format for flag keys (custom, snake, camel, etc.).
- --out: Path to generate TypeScript types.
- --format: Format of the generated types (react or node).

If you prefer more control over each step, you can use the individual commands (init,flags create,flags types) instead.

Authenticate with your Reflag account. This stores your credentials securely for subsequent operations.

Sign out from your Reflag account and remove stored credentials.

Manage your Reflag flags with these subcommands:

Create a new flag in your Reflag app. The command guides you through the flag creation process with interactive prompts if options are not provided.

npx reflag flags create "My Flag" [--app-id ap123456789] [--key my-flag] [--key-format custom]

- --key: Specific key for the flag.
- --app-id: App ID to use.
- --key-format: Format for flag keys.

List all flags for the current app. This helps you visualize what flags are available and their current configurations.

npx reflag flags list [--app-id ap123456789]

Generate TypeScript types for your flags. This ensures type safety when using Reflag flags in your TypeScript/JavaScript applications.

npx reflag flags types [--app-id ap123456789] [--out gen/flags.ts] [--format react]

- --app-id: App ID to use.
- --out: Path to generate TypeScript types.
- --format: Format of the generated types (react or node).

These options can be used with any command:

- --debug: Enable debug mode for verbose output.
- --base-url <url>: Set the base URL for Reflag API.
- --api-url <url>: Set the API URL directly (overrides base URL).
- --api-key <key>: Reflag API key for non-interactive authentication.
- --help: Display help information for a command.

Reflag provides powerful AI-assisted development capabilities through rules and Model Context Protocol (MCP). These features help your AI development tools better understand your flags and provide more accurate assistance.

Therulescommand helps you set up AI-specific rules for your project. These rules enable AI tools to better understand how to work with Reflag flags and how they should be used in your codebase.

npx reflag rules [--format <cursor|copilot>] [--yes]

- --format: Format to add rules in:

- cursor: Adds rules to.cursor/rules/reflag.mdcfor Cursor IDE integration.

- copilot: Adds rules to.github/copilot-instructions.mdfor GitHub Copilot integration.

This command adds rules to your project that provide AI tools with context about how to set up and use Reflag flags. For the copilot format, the rules are added to a dedicated section in the file, allowing you to maintain other copilot instructions alongside Reflag's rules.

The Model Context Protocol (MCP) is an open protocol that provides a standardized way to connect AI models to different data sources and tools. In the context of Reflag, MCP enables your code editor to understand your flags, their states, and their relationships within your codebase. This creates a seamless bridge between your flag management workflow and AI-powered development tools. The MCP server is hosted by Reflag, making it easy to get started.

Note: The ReflagmcpCLI command was previously used for a _localserver. However, in recent versions of the Reflag CLI, themcpcommand has been repurposed to help you connect to the new remote MCP server._

Themcpcommand helps you configure your editor or AI client to connect with Reflag's remote MCP server. This allows your AI tools to understand your flags and provide more contextual assistance.

npx reflag mcp [--editor <editor>] [--scope <local|global>]

- --editor: The editor/client to configure:

- cursor:Cursor IDE

- vscode:Visual Studio Code
- claude:
Claude Desktop
- windsurf:
Windsurf
- Selecting which editor/client to configure.
- Choosing which Reflag app to connect to.
- Deciding between global or project-local configuration.
- Setting up the appropriate configuration file for your chosen editor.

Note: The setup usesmcp-remoteas a compatibility layer allowing the remote hosted Reflag MCP server to work with all editors/clients that support MCP STDIO servers. If your editor/client supports HTTP Streaming with OAuth you can connect to the Reflag MCP server directly.

The Reflag CLI is designed to work seamlessly in CI/CD pipelines. For automated environments where interactive login is not possible, use the--api-keyoption or specify the API key in theREFLAG_API_KEYenvironment variable.

# Generate types in CI/CD npx reflag apps list --api-key $REFLAG_API_KEY

- When using--api-key, theloginandlogoutcommands are disabled
- API keys bypass all interactive authentication flows
- API keys are bound to one app only. Commands such asapps listwill only return the bound app
- Store API keys securely using your CI/CD platform's secret management

# GitHub Actions example - name: Generate types run: npx reflag flags types --api-key ${{ secrets.REFLAG_API_KEY }} # GitHub Actions example (using environment): - name: Generate types (environment) run: npx reflag flags types env: REFLAG_API_KEY: ${{ secrets.REFLAG_CI_API_KEY }}
# Build the CLI yarn build # Run the CLI locally yarn reflag [command] # Lint and format code yarn lint yarn format

MIT License Copyright (c) 2025 Bucket ApS

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

All Azure MCP tools in a single server. The Azure MCP Server implements the MCP specification to create a seamless connection between AI agents and Azure services. Azure MCP Server can be used alone or with the GitHub Copilot for Azure extension in VS Code.

Enable AI Agents to fix build failures from CircleCI.

interacts with ConfigCat feature flag platform. Supports managing feature flags, configs, environments, products and organizations. Helps to integrate ConfigCat SDK, implement feature flags or remove zombie (stale) flags.

Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning with Cycode.

Turn your favourite AI tool into a feature management assistant. DevCycle's MCP works with your favourite coding assistant so you can create and monitor feature flags using natural language right in your workflow.

Official Docker MCP Toolkit for discovering, configuring, and running containerized MCP servers through Docker Desktop and the Docker MCP gateway.

The Octopus MCP Server provides your AI assistant with powerful tools that allow it to inspect, query, and diagnose problems within your Octopus instance, transforming it into your ultimate DevOps wingmate.

The Railway MCP Server enables natural language interaction with your Railway projects and infrastructure. Ask your IDE or AI assistant to create projects, deploy templates, manage environments, pull variables, redeploy services, and more.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.