# Flagsmith MCP

> Flagsmith helps you manage feature flags and remote configurations directly through natural conversation. Instead of clicking through multiple dashboards to check or change a setting, your AI agent connects to Flagsmith to handle complex release logic. You can instantly retrieve default flag states for any environment, set user traits, or update entire batches of features without leaving your chat window.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** feature-flags, remote-config, feature-toggles, ab-testing, release-management

## Description

Managing feature toggles and remote settings used to mean jumping between the code editor, the staging dashboard, and the documentation—a productivity killer. This MCP lets you skip all that friction. You can talk to your agent and have it query flagsmith's data source for whatever configuration detail you need. For example, you can ask what a new user sees on day one or check if a specific feature is enabled in the staging environment. If you’re building complex product flows, this MCP gives you programmatic control over those releases. You connect to Vinkius and get instant access to flagsmith's entire suite of tools, allowing your agent to handle everything from creating new testing environments to updating user attributes based on their current subscription level. It turns a multi-step UI process into a simple conversation.

## Tools

### create_environment
Creates a brand-new, isolated development environment within your projects.

### delete_segment_override
Removes a specific feature flag rule that was previously set for a segment of users.

### get_environment_document
Retrieves the complete, detailed configuration document for an entire environment.

### get_environment_flags
Fetches all default status values (on or off) for every feature flag in your current environment.

### get_identity_flags
Gets the specific flags and traits that are assigned to a particular user identity.

### identify_user
Designates a user by setting or updating their key attributes, such as subscription level, for targeted testing.

### update_flag_v1
Changes the status of one single feature flag with an API key command.

### update_flag_v2
Updates multiple flags at once, allowing you to apply batch changes across several features.

## Prompt Examples

**Prompt:** 
```
Get all default flag states for my current environment.
```

**Response:** 
```
I've retrieved the flags for your environment. There are 12 active flags, including 'new_onboarding_flow' (Enabled) and 'beta_search_algorithm' (Disabled). Would you like the details of any specific flag?
```

**Prompt:** 
```
Identify user 'user_99' and set their 'subscription' trait to 'premium'.
```

**Response:** 
```
User 'user_99' has been identified and their traits updated. Based on the 'premium' subscription trait, they now have access to the 'advanced_analytics' and 'priority_support' flags.
```

**Prompt:** 
```
Update the flag value for environment 'ser_key_123' to enable the 'maintenance_mode' feature.
```

**Response:** 
```
I have successfully updated the flag. The 'maintenance_mode' feature is now enabled for environment 'ser_key_123'.
```

## Capabilities

### Check the state of all features
Retrieve default flag statuses and full configuration details for any specified environment.

### Determine user feature access
Fetch a specific list of flags and traits assigned to an individual user identity or allow you to set those attributes for testing new profiles.

### Update multiple features at once
Modify the values of several flags simultaneously, or update single flag states quickly using batch commands.

### Manage project scope and settings
Create new isolation environments for testing, fetch full configuration documents for deep local evaluation, or remove specific feature overrides.

## Use Cases

### A Product Manager needs to check beta access.
The PM wants to ensure only paying customers see the new dashboard widget. Instead of logging into the staging dashboard, they ask their agent to 'get_identity_flags' for a test user and confirm if the required 'beta_access' flag is set correctly.

### A Developer needs to debug code locally.
The developer runs into an unexpected bug. They ask their agent to retrieve the full configuration document using 'get_environment_document' so they can verify if the local build environment settings match the expected remote values.

### A DevOps Engineer needs a new sandbox.
The team is preparing for a major release and requires an isolated testing area. The engineer simply asks their agent to 'create_environment' in the project, which sets up a clean scope without manual clicks.

### A Marketing Team wants to test different rollouts.
The team needs to quickly switch between two versions of a landing page for testing. They use 'update_flag_v2' to toggle both the old and new flag values in seconds, allowing immediate comparison.

## Benefits

- Debug feature logic instantly. Instead of switching to the code editor, ask your agent to run 'get_identity_flags' for a specific user ID to see exactly what features they should access.
- Coordinate rollouts without touching dashboards. Use 'update_flag_v2' or 'update_flag_v1' to change feature states in bulk or individually using natural language commands.
- Setup isolated testing environments fast. Need to test a new flow? Run 'create_environment' and get a clean scope for your developers, all from the chat interface.
- Know exactly what every user sees. Use 'get_environment_document' to pull the entire configuration document into your session for deep evaluation or auditing purposes.
- Manage complex user segmentation. You can use 'identify_user' to simulate different customer types (like 'premium' vs. 'free') and then check their access using 'get_identity_flags'.
- Clean up old test settings easily. If a feature flag override is no longer needed, simply run 'delete_segment_override' through your agent.

## How It Works

The bottom line is that this MCP takes complex configuration management out of dashboard clicks and puts it into natural language conversation with your AI client.

1. Subscribe to this MCP in Vinkius and input your Flagsmith Environment Key or Admin API Key.
2. Tell your agent what change you need; for example, 'Check if maintenance mode is on' or 'Enable beta search flags.'
3. Your agent executes the necessary calls against your account and reports back the current state, or confirms the successful update.

## Frequently Asked Questions

**How do I check the default flag states using Flagsmith MCP?**
You run 'get_environment_flags'. This tool fetches all default statuses (on/off) for every feature in your current environment, letting you see the baseline configuration instantly.

**Can I update multiple flags at once with Flagsmith MCP?**
Yes. Use 'update_flag_v2' to apply batch changes across several features simultaneously using a single command instead of updating them one by one.

**What is the difference between identifying and getting identity flags in Flagsmith MCP?**
You use 'identify_user' when you want to *set* or update user traits (e.g., set subscription='premium'). You then use 'get_identity_flags' to retrieve those current settings for verification.

**Do I need special permissions to create environments using Flagsmith MCP?**
The agent handles the necessary API calls after you provide your credentials. If you have proper write access, 'create_environment' will build a new isolated space for testing.

**How do I get the full configuration document with Flagsmith MCP?**
Run 'get_environment_document'. This retrieves every piece of configuration data in that environment, making it ideal for detailed local evaluation or auditing purposes.