Skip to content

featbit/featbit-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FeatBit MCP Server

A Model Context Protocol (MCP) server that lets AI coding agents manage FeatBit feature flags through natural language. It acts as a thin proxy — your FeatBit API credentials are forwarded with each request, so the hosted server never stores them.

Built with .NET 10, ASP.NET Core, and Aspire.


Integration

The FeatBit MCP server is publicly hosted at https://mcp.featbit.co/mcp.

Where to find these values:

  • API Key: FeatBit console → Organization Settings → API Keys → Generate New Key
  • Organization ID: FeatBit console → Organization Settings → General → Organization ID

Two headers are required in every request: Authorization (the raw API key — no Bearer prefix) and Organization (your organization ID). The server forwards them as-is to the FeatBit REST API without persisting them.


Remote (Hosted)

Connect to the hosted server — no installation or build required.

VS Code / GitHub Copilot

Add or update .vscode/mcp.json in your workspace:

{
  "servers": {
    "featbit": {
      "type": "http",
      "url": "https://mcp.featbit.co/mcp",
      "headers": {
        "Authorization": "${input:featbitApiKey}",
        "Organization": "${input:featbitOrgId}"
      }
    }
  },
  "inputs": [
    {
      "id": "featbitApiKey",
      "type": "promptString",
      "description": "FeatBit API Key",
      "password": true
    },
    {
      "id": "featbitOrgId",
      "type": "promptString",
      "description": "FeatBit Organization ID"
    }
  ]
}

VS Code MCP Guide

Claude Code

Add to your project .mcp.json or run:

claude mcp add --transport http featbit https://mcp.featbit.co/mcp

To include your API key, edit .mcp.json:

{
  "mcpServers": {
    "featbit": {
      "type": "http",
      "url": "https://mcp.featbit.co/mcp",
      "headers": {
        "Authorization": "YOUR_FEATBIT_API_KEY",
        "Organization": "YOUR_ORGANIZATION_ID"
      }
    }
  }
}

Claude Code MCP Guide

Cursor

Add to ~/.cursor/mcp.json (macOS/Linux) or %USERPROFILE%\.cursor\mcp.json (Windows):

{
  "mcpServers": {
    "featbit": {
      "url": "https://mcp.featbit.co/mcp",
      "headers": {
        "Authorization": "YOUR_FEATBIT_API_KEY",
        "Organization": "YOUR_ORGANIZATION_ID"
      }
    }
  }
}

Cursor MCP Guide

Codex CLI

Add via CLI:

codex mcp add featbit --url "https://mcp.featbit.co/mcp"

Or add to ~/.codex/mcp_servers.json:

{
  "featbit": {
    "url": "https://mcp.featbit.co/mcp",
    "headers": {
      "Authorization": "YOUR_FEATBIT_API_KEY",
      "Organization": "YOUR_ORGANIZATION_ID"
    }
  }
}

Codex MCP Guide


Local (Self-Hosted)

Run the server from source when you need a custom BaseUrl pointing to a self-hosted FeatBit instance, or when you want to extend the server with your own tools.

Prerequisites

Setup

  1. Clone the repo:

    git clone https://github.com/featbit/featbit-mcp.git
    cd featbit-mcp
  2. Set the FeatBit API base URL in FeatBit/FeatBit.McpServer/appsettings.Development.json:

    {
      "FeatBitApi": {
        "BaseUrl": "https://app-api.featbit.co"
      }
    }

    Change BaseUrl to your self-hosted instance URL if needed.

  3. Run the server:

    # With Aspire (recommended — includes observability dashboard)
    dotnet run --project FeatBit/FeatBit.AppHost
    
    # Or run the MCP server directly
    dotnet run --project FeatBit/FeatBit.McpServer

    The server starts on http://localhost:5180.

Connect AI Clients to Local Server

VS Code / GitHub Copilot (.vscode/mcp.json):

{
  "servers": {
    "featbit-local": {
      "type": "http",
      "url": "http://localhost:5180/mcp",
      "headers": {
        "Authorization": "YOUR_FEATBIT_API_KEY",
        "Organization": "YOUR_ORGANIZATION_ID"
      }
    }
  }
}

Claude Code (.mcp.json):

{
  "mcpServers": {
    "featbit-local": {
      "type": "http",
      "url": "http://localhost:5180/mcp",
      "headers": {
        "Authorization": "YOUR_FEATBIT_API_KEY",
        "Organization": "YOUR_ORGANIZATION_ID"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "featbit-local": {
      "url": "http://localhost:5180/mcp",
      "headers": {
        "Authorization": "YOUR_FEATBIT_API_KEY",
        "Organization": "YOUR_ORGANIZATION_ID"
      }
    }
  }
}

Available Tools

Tool Description Parameters
GetProjects List all projects in the organization
GetProject Get a project's details, environments, and credentials (Server Key, Client Key) projectId
GetFeatureFlags List feature flags in an environment. Supports filtering by name/key, tags, enabled/disabled status, archived status, and pagination envId (required), name, tags, isEnabled, isArchived, sortBy, pageIndex, pageSize
GetFeatureFlag Get a single feature flag by key envId (required), key (required)
ToggleFeatureFlag Enable or disable a feature flag envId (required), key (required), status (required)
ArchiveFeatureFlag Archive a feature flag. Archived flags are hidden from the main list by default but can be restored later envId (required), key (required)
CreateFeatureFlag Create a feature flag with the given name, key, and description. The flag is created disabled; use ToggleFeatureFlag to enable it envId (required), name (required), key (required), description
UpdateFeatureFlagRollout Update the default rollout (fallthrough) of a feature flag. Only the /fallthrough path is modified — other flag settings are left unchanged. Accepts rollout assignments as [{"variationId", "percentage"}] where percentages must sum to 100 envId (required), key (required), rolloutAssignments (required), dispatchKey
EvaluateFeatureFlags Evaluate feature flags for a given end user and return the variation served to that user. Set the X-FeatBit-Env-Secret request header to the environment secret key userKeyId (required), userName, customProperties, flagKeys, tags, tagFilterMode

https://app-api.featbit.co/docs/index.html https://app-api.featbit.co/swagger/OpenApi/swagger.json


Additional Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages