Flagdeck
Pricing
MCP
Get Started

Docs

Docs


MCP Server

  • Overview & Setup

SDKs

  • JavaScript
    • Getting Started
    • Value Types
    • Evaluation Context
    • Configuration
    • Real Time Updates
    • Error Handling
    • Middleware
    • Offline Mode
    • API Reference
  • React

API Reference

  • Authentication
  • Flags
  • Environments
  • Projects

MCP Server

The Flagdeck MCP (Model Context Protocol) server lets AI coding assistants — Claude, Cursor, VS Code, and more — manage your feature flags using natural language, directly from your editor.

Install in Cursor

Install in VS Code

Quick Start

You'll need a Flagdeck API key.

Claude Code (CLI)

claude mcp add --transport stdio flagdeck \
  --env FLAGDECK_API_KEY=your-api-key \
  -- npx -y @flagdeck/mcp-server

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "flagdeck": {
      "command": "npx",
      "args": ["-y", "@flagdeck/mcp-server"],
      "env": {
        "FLAGDECK_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor IDE

Click the Install in Cursor button above, or add manually to .cursor/mcp.json:

{
  "mcpServers": {
    "flagdeck": {
      "command": "npx",
      "args": ["-y", "@flagdeck/mcp-server"],
      "env": {
        "FLAGDECK_API_KEY": "your-api-key"
      }
    }
  }
}

VS Code

Click the Install in VS Code button above — VS Code will prompt you for your API key.

Or add manually to your MCP config:

{
  "mcp": {
    "servers": {
      "flagdeck": {
        "command": "npx",
        "args": ["-y", "@flagdeck/mcp-server"],
        "env": {
          "FLAGDECK_API_KEY": "your-api-key"
        }
      }
    }
  }
}

Example Usage

Once installed, just talk to your AI assistant:

You: "Create a dark mode feature flag"
AI: Done! I've created the dark-mode flag (boolean, default false).

You: "Roll it out to 25% of users"
AI: Updated! dark-mode now has a 25% rollout.

You: "Check if it's enabled for [email protected]"
AI: Yes, dark-mode is enabled for that user (matched rollout).

Available Tools

The server provides 23 tools across four categories:

Project & Environment Management

ToolDescription
list_projectsList all projects accessible to your API key
get_projectGet details of a specific project
list_environmentsList all environments in a project

Flag Management

ToolDescription
list_flagsList flags, optionally filtered by status or search term
get_flagGet details of a specific flag by ID or key
create_flagCreate a new feature flag
update_flagUpdate an existing flag
delete_flagPermanently delete a flag
toggle_flagToggle a flag between active and inactive
archive_flagArchive a flag (soft delete)

Flag Evaluation

ToolDescription
evaluate_flagEvaluate a flag for a specific user/context
evaluate_batchEvaluate multiple flags at once

Natural Language AI Tools

ToolDescription
create_flag_natural_languageCreate a flag from a plain-English description
update_flag_natural_languageUpdate a flag using plain-English instructions

Configuration

VariableRequiredDefaultDescription
FLAGDECK_API_KEYYesYour Flagdeck API key
FLAGDECK_API_URLNohttps://api.flagdeck.comAPI base URL (for self-hosted)
FLAGDECK_PROJECT_IDNoDefault project ID
FLAGDECK_ENVIRONMENTNoproductionDefault environment

Troubleshooting

"FLAGDECK_API_KEY is required" — Set your API key in the MCP server env config.

"projectId is required" — Either set FLAGDECK_PROJECT_ID or provide it per-request: "List flags in project proj-123".

Connection errors — Verify FLAGDECK_API_URL is reachable. For self-hosted instances, check firewall and DNS.

Tool not found — Ensure you're using a compatible MCP client and the server started successfully. Check your client's MCP logs.