# Deterministic Feature Flag Evaluator MCP for AI Agents MCP

> Deterministic Feature Flag Evaluator keeps your feature rollouts stable across every session and agent. It uses CRC32 hashing on user IDs and flag keys to ensure that once a user is assigned to a feature, they stay there. No more flickering UI or inconsistent behavior when switching between different AI clients or browser sessions.

## Overview
- **Category:** infrastructure
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_mJg3N5dkuJ85CZUCtgsgYqCDidYVfave0kJ71YOn/mcp
- **Tags:** feature-flags, deterministic, hashing, rollout, testing

## Description

Managing feature rollouts is stressful enough without having to worry about users jumping in and out of a new experience every time they refresh their page or switch tools. This Connector solves the problem of inconsistent user assignments by using math rather than random chance. By applying a consistent hash to your user IDs, it guarantees that a specific person always gets the same result for a given flag. It's particularly useful when you're working in multi-agent environments like Cursor or VS Code, where you need your AI client to even see exactly what your users are seeing. You can check if a rollout is hitting its target percentage or pull up the current rules for any specific feature without digging through complex dashboards. Since this is part of the Vinkius catalog, you get a reliable way to verify that your deployments are actually behaving as intended across all your connected tools. It takes the guesswork out of percentage-based rollouts and helps you catch distribution errors before they impact your entire user base.

## Tools

### evaluate_flag
Checks if a specific user meets the criteria for an enabled feature. It prevents unexpected UI changes during testing.

### get_flag_config
Pulls the current rules and settings for any flag key. This helps you understand exactly how a rollout is configured.

### verify_distribution
Tests whether your percentage-based rollouts are distributed uniformly. It uses sampling to find deviations in your deployment.

## Prompt Examples

**Prompt:** 
```
Is user 'dev_user_99' part of the new checkout flow rollout?
```

**Response:** 
```
| User ID | Flag Key | Result |
| :--- | :--- | :--- |
| `dev_user_99` | `new_checkout_v2` | **Enabled** |

*Evaluation Reason: PERCENTAGE*
*Hash Value: 104857*
```

**Prompt:** 
```
Check the rules for the 'dark_mode_beta' flag.
```

**Response:** 
```
The configuration for `dark_mode_beta` includes:

* **Percentage Rollout:** 25%
* **Allowed User IDs:** `admin_01`, `tester_04`
```

**Prompt:** 
```
Run a distribution check on the 'payment_v2' 5% rollout using 500 samples.
```

**Response:** 
```
**Distribution Test Results**

* **Observed Percentage:** 5.2%
* **Deviation:** 0.2%
* **Status:** ✅ Within tolerance
```

## Capabilities

### Stabilize feature assignments
Ensure users don't flip-flop between different versions of a feature during a session.

### Audit rollout uniformity
Check if your percentage-based rollouts are actually hitting the intended target across your user base.

### Inspect flag rules
Pull up the exact criteria and configuration for any active feature flag instantly.

### Validate user eligibility
Confirm if specific IDs meet your current deployment requirements without manual testing.

## Use Cases

### Catching uneven rollouts
An engineer notices some users are getting different experiences and uses verify_distribution to find the error.

### Testing beta features
A developer asks their agent to check if a specific test ID is correctly included in a new feature group.

### Debugging UI shifts
A QA specialist uses evaluate_flag to confirm that a user's session won't flip-flop between old and new versions.

## Benefits

- Eliminate session flicker by using deterministic hashing for all evaluations.
- Verify rollout accuracy with verify_distribution to catch uneven deployments.
- Audit your current deployment rules instantly using get_flag_config.
- Maintain a single source of truth across Cursor, VS Code, and Claude Desktop.
- Reduce manual testing time by letting your agent handle the flag logic checks.

## How It Works

The bottom line is you get a mathematically consistent way to test and verify rollouts through your AI agent.

1. Connect the Connector to your preferred AI client via Vinkius.
2. Point it toward your existing feature flag registry or configuration source.
3. Ask your agent to evaluate users, check distributions, or pull configurations.

## Frequently Asked Questions

**How does Deterministic Feature Flag Evaluator prevent UI flickering?**
It uses CRC32 hashing to ensure that a user's assignment is tied to their ID. This means the result stays identical every time they load the page.

**Can I use this Connector with Cursor or VS Code?**
Yes, it works with any MCP-compatible client including Cursor, VS Code, and Claude Desktop.

**How do I check if my 20% rollout is actually uniform?**
You can simply ask your agent to run a distribution test using the verify_distribution tool on your specific flag.

**Does this tool work for any user ID?**
Yes, as long as you provide the user ID, the hashing logic will deterministically calculate their assignment status.

**Can I see the specific rules for a flag?**
You can use the configuration tool to pull all active rules and rollout percentages directly into your chat window.

**How does the system ensure a user doesn't see a feature flicker?**
The system uses CRC32 hashing of the `flagKey` and `userId`. Since these inputs are immutable for a specific user and flag, the resulting hash value remains constant, ensuring the feature state does not change between sessions.

**Can I bypass the percentage rollout for specific users?**
Yes. By providing an `allowedIds` list within the `rulesJson` parameter of the `evaluate_flag` tool, you can explicitly enable a feature for specific users regardless of the percentage rollout.

**How do I verify if my rollout is actually distributed correctly?**
You can use the `verify_distribution` tool. By specifying a target percentage and a sample size, the tool will simulate users and report if the observed distribution matches your expected rollout percentage.