Skip to content
Back to search

flagforge

MCP server for Flagsmith — set up feature flags and A/B experiments with one AI prompt

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 21 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/tanjirookamado602/flagforge with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/tanjirookamado602/flagforge'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/tanjirookamado602--flagforge/badge.svg)](/listings/tanjirookamado602--flagforge)

HTML

<a href="/listings/tanjirookamado602--flagforge"><img src="/api/listings/tanjirookamado602--flagforge/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Get the complete stack running locally with three simple steps:

1. Boot Self-Hosted Flagsmith & PostgreSQL

# Clone the repository
git clone https://github.com/your-username/flagforge.git
cd flagforge

# Start Flagsmith & Postgres
docker compose up -d

Flagsmith is now running at **[http://localhost:8000](http://localhost:8000)**! - **Default Admin Email:** `admin@flagforge.local` - **Default Password:** `flagforge1234` - **Project:** `flagforge-demo`

---

2. Install and Connect `flagsmith-mcp`

cd flagsmith-mcp

# Install via pip
pip install -e .

# Test run MCP server
python -m flagsmith_mcp

Add `flagsmith-mcp` to your Claude Code or Claude Desktop configuration (`claude_desktop_config.json`):

{
  "mcpServers": {
    "flagsmith": {
      "command": "python",
      "args": ["-m", "flagsmith_mcp"],
      "env": {
        "FLAGSMITH_BASE_URL": "http://localhost:8000",
        "FLAGSMITH_API_KEY": "559d51e1f203d74e951fc5f12b53765818afdf06",
        "FLAGSMITH_ENVIRONMENT_KEY": "RzHBVWSKkhdTJqQKsfa4bQ",
        "FLAGSMITH_PROJECT_ID": "1"
      }
    }
  }
}

---

3. Launch the Flutter Demo App

cd ../flagforge-flutter

# Get dependencies and run on Chrome, Desktop, or Mobile
flutter pub get
flutter run -d chrome

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 226 lines
  1. # FlagForge 🚩
  2. [![PyPI version](https://img.shields.io/badge/pypi-v0.1.2-blue.svg)](https://pypi.org/project/flagsmith-mcp/)
  3. [![GitHub stars](https://img.shields.io/github/stars/tanjirookamado602/flagforge.svg?style=social)](https://github.com/tanjirookamado602/flagforge)
  4. [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
  5. [![Python 3.10+](https://img.shields.io/badge/Python-3.10+-3776AB.svg?logo=python&logoColor=white)](https://python.org)
  6. [![Flutter 3.x](https://img.shields.io/badge/Flutter-3.x-02569B.svg?logo=flutter&logoColor=white)](https://flutter.dev)
  7. [![Flagsmith Ready](https://img.shields.io/badge/Flagsmith-Self--Hosted-red.svg)](https://flagsmith.com)
  8. [![Model Context Protocol](https://img.shields.io/badge/MCP-Standard-purple.svg)](https://modelcontextprotocol.io)
  9. > **`flagsmith-mcp` adds Experimentation-focused tools missing from Flagsmith’s official MCP server: A/B experiment creation, Bayesian win probability calculation, and automatic winner shipping — plus a Flutter demo kit for mobile developers.**
  10. 👉 **Looking for the one-click Claude prompt? See [CLAUDE_PROMPT.md](file:///home/assassinaj602/Projects/New%20folder%20%284%29/SAAS/Hckathon/11%20Project%20PS5/CLAUDE_PROMPT.md).**
  11. 🎬 **Looking for the demo recording outline? See [DEMO_SCRIPT.md](file:///home/assassinaj602/Projects/New%20folder%20%284%29/SAAS/Hckathon/11%20Project%20PS5/DEMO_SCRIPT.md).**
  12. ---
  13. ## 💡 Why FlagForge? (Comparison with Flagsmith's Official MCP Server)
  14. Flagsmith provides an official MCP server focused primarily on general administrative CRUD operations (listing flags, toggling states, managing segments).
  15. **FlagForge bridges the experimentation gap** by giving autonomous coding agents a complete statistical experimentation engine:
  16. | Capability | Flagsmith Official MCP | FlagForge `flagsmith-mcp` |
  17. |---|:---:|:---:|
  18. | Basic Flag CRUD & Toggling | ✅ Supported | ✅ Supported |
  19. | Multivariate Feature Flagging | ✅ Supported | ✅ Supported |
  20. | **A/B Experiment Lifecycle** (`create_experiment`) | ❌ Not available | ✅ **Native MCP Tool** |
  21. | **Bayesian Statistics Engine** (`get_experiment_results`) | ❌ Not available | ✅ **Monte Carlo Beta Posterior Wins** |
  22. | **Autonomous Winner Rollout** (`ship_winner`) | ❌ Not available | ✅ **One-Prompt 100% Rollout** |
  23. | **Mobile Developer Starter Kit** | ❌ Not included | ✅ **Flutter app with custom event tracking** |
  24. ---
  25. ## ⚡ Quick Start (Under 10 Minutes)
  26. Get the complete stack running locally with three simple steps:
  27. ### 1. Boot Self-Hosted Flagsmith & PostgreSQL
  28. ```bash
  29. # Clone the repository
  30. git clone https://github.com/your-username/flagforge.git
  31. cd flagforge
  32. # Start Flagsmith & Postgres
  33. docker compose up -d
  34. ```
  35. Flagsmith is now running at **[http://localhost:8000](http://localhost:8000)**!
  36. - **Default Admin Email:** `admin@flagforge.local`
  37. - **Default Password:** `flagforge1234`
  38. - **Project:** `flagforge-demo`
  39. ---
  40. ### 2. Install and Connect `flagsmith-mcp`
  41. ```bash
  42. cd flagsmith-mcp
  43. # Install via pip
  44. pip install -e .
  45. # Test run MCP server
  46. python -m flagsmith_mcp
  47. ```
  48. Add `flagsmith-mcp` to your Claude Code or Claude Desktop configuration (`claude_desktop_config.json`):
  49. ```json
  50. {
  51. "mcpServers": {
  52. "flagsmith": {
  53. "command": "python",
  54. "args": ["-m", "flagsmith_mcp"],
  55. "env": {
  56. "FLAGSMITH_BASE_URL": "http://localhost:8000",
  57. "FLAGSMITH_API_KEY": "559d51e1f203d74e951fc5f12b53765818afdf06",
  58. "FLAGSMITH_ENVIRONMENT_KEY": "RzHBVWSKkhdTJqQKsfa4bQ",
  59. "FLAGSMITH_PROJECT_ID": "1"
  60. }
  61. }
  62. }
  63. }
  64. ```
  65. ---
  66. ### 3. Launch the Flutter Demo App
  67. ```bash
  68. cd ../flagforge-flutter
  69. # Get dependencies and run on Chrome, Desktop, or Mobile
  70. flutter pub get
  71. flutter run -d chrome
  72. ```
  73. ---
  74. ## 🛠️ MCP Tools Reference
  75. | Tool Name | Inputs | Description |
  76. |-----------|--------|-------------|
  77. | `create_flag` | `name` (str), `description` (str), `variants` (list[str]) | Creates a multivariate feature flag with equal initial traffic allocations. |
  78. | `toggle_flag` | `flag_name` (str), `enabled` (bool) | Instantly enables or disables a feature flag in the target environment. |
  79. | `list_flags` | *(none)* | Returns all feature flags, active states, variant options, and percentage splits. |
  80. | `set_traffic_split` | `flag_name` (str), `splits` (dict[str, float]) | Reallocates percentage traffic weights across variants (must sum to 100%). |
  81. | `create_experiment` | `name` (str), `flag_name` (str), `metric_event` (str), `hypothesis` (str) | Initializes a Flagsmith Experiment linked to a multivariate flag and conversion metric. |
  82. | `get_experiment_results` | `experiment_id` (str) | Computes conversion rates and Bayesian win probabilities across all variants. |
  83. | `ship_winner` | `experiment_id` (str) | Identifies the winning variant from Bayesian results and allocates 100% traffic. |
  84. ---
  85. ## 🤖 Example: A/B Testing in One Prompt
  86. Prompt your AI coding agent (e.g. Claude Code or Cursor):
  87. ```text
  88. Use flagsmith-mcp to create a multivariate flag called cta_button with variants
  89. variant_a and variant_b, then create an experiment measuring cta_clicked events.
  90. ```
  91. ### Agent Tool Calls & Response:
  92. ```text
  93. Calling create_flag(name="cta_button", description="CTA button color & copy", variants=["variant_a", "variant_b"])
  94. => Flag 'cta_button' successfully created (50% variant_a, 50% variant_b).
  95. Calling create_experiment(name="CTA Button Test", flag_name="cta_button", metric_event="cta_clicked", hypothesis="variant_b increases conversions")
  96. => Experiment 'CTA Button Test' created (ID: exp_cta_button_test_1849a2). Status: RUNNING.
  97. ```
  98. ### Check Bayesian Results & Ship Winner:
  99. ```text
  100. Calling get_experiment_results(experiment_id="exp_cta_button_test_1849a2")
  101. =>
  102. | Variant | Impressions | Conversions | Conversion Rate | Win Probability |
  103. |-------------|-------------|-------------|-----------------|-----------------|
  104. | `variant_a` | 120 | 14 | 11.67% | 1.8% |
  105. | `variant_b` | 125 | 28 | 22.40% | 98.2% |
  106. 🏆 Leading Variant: `variant_b` with 98.2% win probability.
  107. ✅ Statistically significant result! Ready to ship winner.
  108. Calling ship_winner(experiment_id="exp_cta_button_test_1849a2")
  109. => 🎉 Shipped Winner for cta_button!
  110. • variant_b: 100.0% traffic
  111. • variant_a: 0.0% traffic
  112. ```
  113. ---
  114. ## 🏗️ Architecture
  115. ```
  116. ┌─────────────────────────────────────────────────────────────┐
  117. │ AI Coding Assistant │
  118. │ (Claude Code / Cursor / Antigravity) │
  119. └──────────────────────────────┬──────────────────────────────┘
  120. │ MCP Protocol (JSON-RPC)
  121. ▼
  122. ┌─────────────────────────────────────────────────────────────┐
  123. │ flagsmith-mcp Server │
  124. │ ┌───────────────────────┐ ┌───────────────────────┐ │
  125. │ │ Flag Tools │ │ Experiment Tools │ │
  126. │ │ (create, toggle, split│ │ (create, stats, ship) │ │
  127. │ └───────────┬───────────┘ └───────────┬───────────┘ │
  128. │ └───────────────────────────────┘ │
  129. │ │ │
  130. │ Bayesian Monte Carlo Engine │
  131. └──────────────────────────────┬──────────────────────────────┘
  132. │ REST API
  133. ▼
  134. ┌─────────────────────────────────────────────────────────────┐
  135. │ Self-Hosted Flagsmith Stack │
  136. │ ┌───────────────────────┐ ┌───────────────────────┐ │
  137. │ │ Flagsmith Server │◄─────►│ PostgreSQL │ │
  138. │ │ (Port 8000) │ │ (Port 5432) │ │
  139. │ └───────────┬───────────┘ └───────────────────────┘ │
  140. │ │ │
  141. │ │ Task Processor │
  142. │ ▼ │
  143. │ ┌───────────────────────┐ │
  144. │ │ flagsmith_processor │ │
  145. │ └───────────────────────┘ │
  146. └──────────────────────────────┬──────────────────────────────┘
  147. │ SDK Evaluation & Events
  148. ▼
  149. ┌─────────────────────────────────────────────────────────────┐
  150. │ flagforge-flutter Demo Client │
  151. │ • Flagsmith Flutter SDK (X-Environment-Key evaluation) │
  152. │ • Multivariate CTA Button ('Get Started' vs 'Try for Free')│
  153. │ • Live In-App Debug & 50-Click Event Simulation Panel │
  154. └─────────────────────────────────────────────────────────────┘
  155. ```
  156. ---
  157. ## 📁 Repository Structure
  158. ```
  159. flagforge/
  160. ├── docker-compose.yml # Self-hosted Flagsmith & PostgreSQL stack
  161. ├── .env.example # Template environment variables
  162. ├── flagsmith-mcp/ # Python MCP server (FastMCP package)
  163. │ ├── flagsmith_mcp/
  164. │ │ ├── __init__.py
  165. │ │ ├── server.py # FastMCP server entrypoint
  166. │ │ ├── client.py # Flagsmith API & Bayesian calculation client
  167. │ │ └── tools/
  168. │ │ ├── flags.py # create_flag, toggle_flag, list_flags, set_traffic_split
  169. │ │ └── experiments.py # create_experiment, get_experiment_results, ship_winner
  170. │ ├── pyproject.toml # Python package specification
  171. │ └── README.md
  172. ├── flagforge-flutter/ # Flutter demonstration application
  173. │ ├── lib/
  174. │ │ └── main.dart # Landing page with multivariate CTA & debug panel
  175. │ ├── pubspec.yaml # Flutter dependencies (flagsmith, uuid, http)
  176. │ └── .env.example
  177. ├── DEMO_SCRIPT.md # High-impact 3-minute video recording script
  178. └── README.md # This documentation
  179. ```
  180. ---
  181. ## 🤝 Contributing & License
  182. Contributions are welcome! Please feel free to submit issues and pull requests.
  183. This project is licensed under the **MIT License**.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.