Skip to main content
Glama
Unleash

Unleash MCP Server

Official
by Unleash

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
UNLEASH_PATYesPersonal access token (required).
UNLEASH_BASE_URLYesYour Unleash instance URL (required). Both https://your-instance.getunleash.io and https://your-instance.getunleash.io/api are accepted.
UNLEASH_DEFAULT_PROJECTNoThe default project ID the MCP should use (optional).

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
create_flagA

Create a new feature flag in Unleash.

This tool creates a feature flag with the specified configuration. Choose the appropriate flag type:

  • release: For gradual feature rollouts to users

  • experiment: For A/B tests and experiments

  • operational: For system behavior and operational toggles

  • kill-switch: For emergency shutdowns or circuit breakers

  • permission: For role-based access control

Best practices:

  1. Use clear, descriptive names (e.g., "new-checkout-flow" not "flag1")

  2. Write comprehensive descriptions explaining the flag's purpose

  3. Choose the right type to signal intent and lifecycle

  4. Plan for flag removal after successful rollout

See: https://docs.getunleash.io/topics/feature-flags/best-practices-using-feature-flags-at-scale

evaluate_changeA

Provides comprehensive guidance for evaluating whether code changes require feature flags.

This tool returns detailed evaluation guidelines including:

  • Workflow for systematic evaluation

  • Parent flag detection patterns (avoid nesting)

  • Risk assessment criteria

  • Code type evaluation (test, config, feature, etc.)

  • Decision tree logic

  • Best practices from Unleash documentation

  • MANDATORY next action instructions: Explicit tool call sequence (create_flag → wrap_change → implement)

Use this tool when:

  • Starting work on a new feature or change

  • Unsure if a feature flag is needed

  • Want guidance on rollout strategy

  • Need help choosing flag type

IMPORTANT WORKFLOW: When this tool determines a flag is needed, it provides explicit instructions to:

  1. Call 'create_flag' tool to create the feature flag in Unleash

  2. Call 'wrap_change' tool to get code wrapping guidance

  3. Implement the wrapped code following the patterns

The tool returns markdown-formatted guidance that helps you make informed decisions and take the correct next actions.

detect_flagA

Discover existing feature flags in the codebase to prevent duplicates and encourage reuse.

This tool provides comprehensive search instructions for finding existing flags through multiple detection strategies:

  • File-based detection: Search in files being modified

  • Git history analysis: Find recently added flags

  • Semantic name matching: Match description to flag names

  • Code context analysis: Find flags near modification point

Use this tool when:

  • About to create a new feature flag

  • Evaluating whether a flag is needed

  • Want to check if similar functionality is already flagged

The tool returns detailed search instructions that guide you through:

  1. Executing searches using Bash and Grep tools

  2. Scoring candidates from multiple detection methods

  3. Combining results to find the best match

  4. Returning a confidence-scored recommendation

Workflow Integration: This tool is automatically called by 'evaluate_change' before recommending 'create_flag'. You can also call it directly when you want to search for existing flags.

Output: Returns markdown guidance with:

  • Step-by-step search instructions for each detection method

  • Scoring criteria and weight calculations

  • Expected JSON response format

  • Confidence level interpretation

After following the instructions and finding results, you should return a JSON object indicating whether a flag was found and, if so, its details with a confidence score.

wrap_changeA

Generate code snippets and guidance for wrapping changes with feature flags.

⚠️ CRITICAL: This tool enforces RUNTIME-CONTROLLABLE feature flags. You MUST place flag checks INSIDE execution paths (handlers, functions), NOT wrapping route registrations, middleware mounting, or controller registration.

This tool provides language-specific templates and instructions for protecting code changes with feature flags. It helps you:

  • Find existing feature flag patterns in your codebase

  • Match detected conventions (imports, method names, wrapping styles)

  • Generate appropriate code snippets for your language/framework

  • Follow Unleash SDK best practices

  • Ensure flags are runtime controllable (toggle without redeploy)

Supported languages:

  • TypeScript/JavaScript (Node, React, Vue, Angular)

  • Python (FastAPI, Django, Flask)

  • Go

  • Ruby (Rails)

  • PHP

  • C# (.NET)

  • Java (Spring Boot)

  • Rust

The tool uses a prompt-based approach: it provides detailed instructions for searching your codebase for existing patterns and matching their conventions. If no patterns are found, it provides sensible defaults based on Unleash SDK documentation.

Usage:

  1. Call this tool with the flag name after creating a flag

  2. Follow the search instructions to find existing patterns

  3. Use the recommended template or match detected patterns

  4. Test your implementation

Best suited for use after evaluate_change recommends a flag and create_flag creates it.

cleanup_flagA

Remove a feature flag from the codebase while preserving the desired code path.

This tool provides comprehensive step-by-step instructions for safely removing feature flag code. It guides you through:

  • Finding all flag occurrences using Grep

  • Identifying different flag usage patterns (if-else, ternary, guards, etc.)

  • Removing flag checks while preserving the correct code path

  • Cleaning up unused imports and dead code

  • Verifying and testing the changes

When to use this tool:

  • After a feature flag has been rolled out to 100% and is no longer needed

  • When deprecating an experimental feature (preserve disabled path)

  • When cleaning up technical debt from old flags

  • After a kill switch is no longer necessary

Preserve Path Options:

  • "enabled": Keep code that runs when flag is true (most common for successful feature rollouts)

  • "disabled": Keep code that runs when flag is false (for removed experiments or kill switches)

  • If not provided: You will be instructed to ask the user which path to preserve

Workflow:

  1. Call this tool with the flag name (optionally specify which path to preserve)

  2. If preservePath not provided, you'll be instructed to ask the user via AskUserQuestion tool

  3. Follow the returned instructions to search and remove flag code

  4. Clean up imports and test the changes

  5. Report summary of changes

Safety Features:

  • Comprehensive pattern identification (handles if-else, ternary, guards, etc.)

  • Language-agnostic guidance

  • Post-cleanup verification steps

  • Test execution reminders

  • Import cleanup guidance

This tool is inspired by the Unleash AI flag cleanup workflow used in production. See: https://github.com/Unleash/unleash/blob/main/.github/workflows/ai-flag-cleanup-pr.yml

set_flag_rolloutA

Configure or update a flexibleRollout strategy for a feature flag environment with an optional rollout percentage and variants. This does NOT enable the feature; call toggle_flag_environment to turn environments on or off.

get_flag_stateB

Fetch the current feature flag metadata and environment strategies from the Unleash Admin API.

list_flagsA

List feature flags in an Unleash project, with optional pagination and sort order. By default returns active flags only; set archived=true to list archived flags instead (active and archived flags are disjoint result sets in Unleash and cannot be combined in one response). Use this to discover flags before creating new ones, audit flag inventory for cleanup (call twice — once for active, once for archived), or scope a workflow to a specific project. Returns name, type, description, archived status, and URL for each flag.

list_projectsA

List Unleash projects available to the configured token, with optional pagination. Use this for discovery before scoping flag operations to a specific project. Returns project id, name, description, mode, creation time, and URL.

toggle_flag_environmentA

Enable or disable a feature flag in a specific environment using the Unleash Admin API. For gradual rollouts, configure a flexibleRollout strategy first via set_flag_rollout.

remove_flag_strategyA

Delete a strategy configuration from a feature flag environment. Use get_flag_state to discover strategy IDs before removal.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Unleash/unleash-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server