Railflag
Create, target and roll out feature flags. Production changes wait for a person to approve.
Should I use this
Quality & Safety
Findings (3)
- LOWin list_flags
- LOWin toggle_flag
- LOWin get_connection
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"railflag": {
"url": "https://mcp.railflag.com/mcp"
}
}
}Remote endpoints
https://mcp.railflag.com/mcpstreamable-httpWhat it can do
Tool inventory
Tools (29)
🟢list_flags(search)
All flags with their state in each environment.
Input Schema
{
"type": "object",
"properties": {
"search": {
"type": "string"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_flag(key)
One flag: variations and full targeting in every environment, with versions for safe updates.
Input Schema
{
"type": "object",
"properties": {
"key": {
"type": "string"
}
},
"required": [
"key"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢list_environments
Environments, whether they require approval, and their published config versions. Keys are not returned.
Input Schema
{
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡create_flag(key, name, type, kind, description, ...)
Creates a flag, off in every environment. Boolean flags have variations [false, true].
Input Schema
{
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Key used in code, e.g. new-checkout"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"boolean",
"string",
"number",
"json"
],
"default": "boolean"
},
"kind": {
"type": "string",
"enum": [
"release",
"ops",
"experiment",
"permission"
]
},
"description": {
"type": "string"
},
"variations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {},
"name": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "Required for string/number/json flags"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"key",
"name"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}⚪toggle_flag(key, environment, enabled, reason, watchPlanId)
Turns a flag on or off in one environment. In environments that need approval this returns an approvalUrl for a person.
Input Schema
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"environment": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"reason": {
"type": "string"
},
"watchPlanId": {
"type": "string",
"format": "uuid",
"description": "A Release Watch plan from suggest_watch_plan: it starts watching when this change is applied"
}
},
"required": [
"key",
"environment",
"enabled"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡update_targeting(key, environment, targeting, baseVersion, reason, ...)
Replaces a flag's targeting in one environment. Read it with get_flag first and pass its version as baseVersion so you never overwrite someone else's change. Rules are checked top to bottom; the first match wins.
Input Schema
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"environment": {
"type": "string"
},
"targeting": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"offVariation": {
"type": "integer"
},
"fallthrough": {
"anyOf": [
{
"type": "object",
"properties": {
"variation": {
"type": "integer",
"description": "Variation index"
}
},
"required": [
"variation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"rollout": {
"type": "object",
"properties": {
"weights": {
"type": "array",
"items": {
"type": "integer"
},
"description": "One weight per variation, out of 100000 (100000 = 100%)"
},
"bucketBy": {
"type": "string"
}
},
"required": [
"weights"
],
"additionalProperties": false
}
},
"required": [
"rollout"
],
"additionalProperties": false
}
],
"description": "Default rule: what users who match nothing get"
},
"targets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"variation": {
"type": "integer"
},
"values": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"variation",
"values"
],
"additionalProperties": false
}
},
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"clauses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attr": {
"type": "string",
"description": "Context attribute, or \"key\" for the user key"
},
"op": {
"type": "string",
"enum": [
"in",
"exists",
"startsWith",
"endsWith",
"contains",
"matches",
"lt",
"lte",
"gt",
"gte",
"semverEq",
"semverLt",
"semverGt",
"before",
"after",
"segmentMatch"
]
},
"values": {
"type": "array",
"items": {
"type": [
"string",
"number",
"boolean"
]
}
},
"negate": {
"type": "boolean"
}
},
"required": [
"attr",
"op",
"values"
],
"additionalProperties": false
}
},
"serve": {
"anyOf": [
{
"$ref": "#/properties/targeting/properties/fallthrough/anyOf/0"
},
{
"$ref": "#/properties/targeting/properties/fallthrough/anyOf/1"
}
]
}
},
"required": [
"id",
"clauses",
"serve"
],
"additionalProperties": false
}
},
"prerequisites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"variation": {
"type": "integer"
}
},
"required": [
"key",
"variation"
],
"additionalProperties": false
}
}
},
"required": [
"enabled",
"offVariation",
"fallthrough"
],
"additionalProperties": false
},
"baseVersion": {
"type": "integer"
},
"reason": {
"type": "string"
},
"watchPlanId": {
"type": "string",
"format": "uuid",
"description": "A Release Watch plan from suggest_watch_plan: it starts watching when this change is applied"
}
},
"required": [
"key",
"environment",
"targeting",
"baseVersion"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡set_rollout(key, environment, percentages, ruleId, reason, ...)
Sets the percentage split for the default rule, or for one rule by id. percentages has one number per variation and must add up to 100 (e.g. [80, 20] gives 20% true for a boolean flag). Raising a percentage only adds users.
Input Schema
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"environment": {
"type": "string"
},
"percentages": {
"type": "array",
"items": {
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"ruleId": {
"type": "string"
},
"reason": {
"type": "string"
},
"watchPlanId": {
"type": "string",
"format": "uuid",
"description": "A Release Watch plan from suggest_watch_plan: it starts watching when this change is applied"
}
},
"required": [
"key",
"environment",
"percentages"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_history(key, limit)
Audit log for the project or one flag: who changed what, when and why.
Input Schema
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"limit": {
"type": "integer",
"maximum": 200
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_change_request(id)
Status of a change waiting for approval: pending, applied, rejected or failed.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡suggest_watch_plan(key, environment, percentages, enabled, targeting, ...)
Drafts a Release Watch plan for a flag change: which signals to monitor (error rate, latency, conversions, new Sentry issues, the rollout split), the limits, and for how long. Describe the change with percentages (default rule split, like set_rollout), enabled (on/off) or a full targeting. Returns a watchPlanId to pass to the change tool. On plans without Release Watch it says what it would monitor instead.
Input Schema
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"environment": {
"type": "string"
},
"percentages": {
"type": "array",
"items": {
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"enabled": {
"type": "boolean"
},
"targeting": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"offVariation": {
"type": "integer"
},
"fallthrough": {
"anyOf": [
{
"type": "object",
"properties": {
"variation": {
"type": "integer",
"description": "Variation index"
}
},
"required": [
"variation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"rollout": {
"type": "object",
"properties": {
"weights": {
"type": "array",
"items": {
"type": "integer"
},
"description": "One weight per variation, out of 100000 (100000 = 100%)"
},
"bucketBy": {
"type": "string"
}
},
"required": [
"weights"
],
"additionalProperties": false
}
},
"required": [
"rollout"
],
"additionalProperties": false
}
],
"description": "Default rule: what users who match nothing get"
},
"targets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"variation": {
"type": "integer"
},
"values": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"variation",
"values"
],
"additionalProperties": false
}
},
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"clauses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attr": {
"type": "string",
"description": "Context attribute, or \"key\" for the user key"
},
"op": {
"type": "string",
"enum": [
"in",
"exists",
"startsWith",
"endsWith",
"contains",
"matches",
"lt",
"lte",
"gt",
"gte",
"semverEq",
"semverLt",
"semverGt",
"before",
"after",
"segmentMatch"
]
},
"values": {
"type": "array",
"items": {
"type": [
"string",
"number",
"boolean"
]
}
},
"negate": {
"type": "boolean"
}
},
"required": [
"attr",
"op",
"values"
],
"additionalProperties": false
}
},
"serve": {
"anyOf": [
{
"$ref": "#/properties/targeting/properties/fallthrough/anyOf/0"
},
{
"$ref": "#/properties/targeting/properties/fallthrough/anyOf/1"
}
]
}
},
"required": [
"id",
"clauses",
"serve"
],
"additionalProperties": false
}
},
"prerequisites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"variation": {
"type": "integer"
}
},
"required": [
"key",
"variation"
],
"additionalProperties": false
}
}
},
"required": [
"enabled",
"offVariation",
"fallthrough"
],
"additionalProperties": false
},
"autoPause": {
"type": "boolean",
"description": "Pause the rollout on its own when a limit stays broken. Off unless the user asks for it."
}
},
"required": [
"key",
"environment"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_watch(id)
A watch: its status (draft, active, passed, paused, stopped), each signal's state, the timeline and the verdict.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢list_watches(key, status)
Watches in the project, newest first, optionally for one flag and by status (comma separated: draft, active, passed, paused, stopped, expired).
Input Schema
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"status": {
"type": "string"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡stop_watch(id)
Stops watching. Doesn't change the flag.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢monitoring_coverage
The project's monitoring coverage: live Production flags nobody watches (ranked by risk), kill switches never tested, flags no SDK evaluates, and services missing error or latency metrics. Business plan.
Input Schema
{
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}⚪connect_monitoring(vendor, name)
Starts connecting Prometheus/Grafana, Datadog, Sentry, New Relic or a Slack channel for alerts. Returns a one-time link: give it to the user, who enters the credentials there. Never ask the user for credentials in chat. Admins only.
Input Schema
{
"type": "object",
"properties": {
"vendor": {
"type": "string",
"enum": [
"prometheus",
"datadog",
"sentry",
"newrelic",
"slack"
]
},
"name": {
"type": "string"
}
},
"required": [
"vendor"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢list_sources
Vendors Railflag can import flags from, what it reads from each, and which are coming later.
Input Schema
{
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢connect_source(vendor)
Starts a read-only connection to the user's account at another flag vendor (see list_sources). Returns a link the user opens to enter their credentials there. Never ask the user to paste credentials into the chat. After they finish, call get_connection.
Input Schema
{
"type": "object",
"properties": {
"vendor": {
"type": "string",
"enum": [
"abtasty",
"unleash"
],
"description": "Which vendor to import from"
}
},
"required": [
"vendor"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_connection(connectionId)
Whether the user finished connecting, which source environments are visible, and whether decisions can be compared.
Input Schema
{
"type": "object",
"properties": {
"connectionId": {
"type": "string"
}
},
"required": [
"connectionId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢scan_source(connectionId)
Reads all flags and their targeting from the connected vendor (read only). Runs in the background: poll get_run with the returned runId.
Input Schema
{
"type": "object",
"properties": {
"connectionId": {
"type": "string"
}
},
"required": [
"connectionId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_run(runId)
Status and result of a scan, compare or apply run.
Input Schema
{
"type": "object",
"properties": {
"runId": {
"type": "string"
}
},
"required": [
"runId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢plan_migration(connectionId, envMap)
Builds a dry-run plan from the latest scan. envMap maps source environment ids (from get_connection or the scan) to Railflag environment keys, e.g. {"production": "staging"} to try production data in staging first. Nothing is written.
Input Schema
{
"type": "object",
"properties": {
"connectionId": {
"type": "string"
},
"envMap": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"connectionId",
"envMap"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_plan(planId, full)
A plan's summary, issues and items. full=true includes each item's targeting.
Input Schema
{
"type": "object",
"properties": {
"planId": {
"type": "string"
},
"full": {
"type": "boolean"
}
},
"required": [
"planId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢explain_item(planId, key)
The source vendor's definition of one flag next to what it becomes in Railflag, and its issues.
Input Schema
{
"type": "object",
"properties": {
"planId": {
"type": "string"
},
"key": {
"type": "string"
}
},
"required": [
"planId",
"key"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴update_plan(planId, decisions, baseVersion)
Records decisions on issues. Each issue lists its allowed actions: skip_flag, drop_rule, keep, rename (value = new key), overwrite. Info issues need no decision. Ask the user when the choice is not obviously safe.
Input Schema
{
"type": "object",
"properties": {
"planId": {
"type": "string"
},
"decisions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"issueId": {
"type": "string"
},
"action": {
"type": "string",
"enum": [
"skip_flag",
"drop_rule",
"keep",
"rename",
"overwrite"
]
},
"value": {
"type": "string"
}
},
"required": [
"issueId",
"action"
],
"additionalProperties": false
}
},
"baseVersion": {
"type": "integer"
}
},
"required": [
"planId",
"decisions"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢compare_decisions(planId, environment, sampleSize, contexts)
Asks the source vendor what sample users get (AB Tasty: Decision API, needs a Decision API key on the connection; Unleash: its server-side playground) without recording anything, and compares with the plan. Runs in the background: poll get_run.
Input Schema
{
"type": "object",
"properties": {
"planId": {
"type": "string"
},
"environment": {
"type": "string",
"description": "Railflag environment key in the plan"
},
"sampleSize": {
"type": "integer",
"minimum": 1,
"maximum": 2000
},
"contexts": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
},
"description": "Specific users to check; each needs a \"key\" (the user id)"
}
},
"required": [
"planId",
"environment"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}⚪apply_plan(planId, environment, planVersion)
Writes the plan into one Railflag environment. Running it again changes nothing. Environments that need approval return an approvalUrl for a person. Never writes to the source vendor.
Input Schema
{
"type": "object",
"properties": {
"planId": {
"type": "string"
},
"environment": {
"type": "string"
},
"planVersion": {
"type": "integer"
}
},
"required": [
"planId",
"environment"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴rollback_run(runId)
Undoes one apply run: restores previous targeting and archives flags it created.
Input Schema
{
"type": "object",
"properties": {
"runId": {
"type": "string"
}
},
"required": [
"runId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴disconnect_source(connectionId)
Deletes the stored credentials for a source connection.
Input Schema
{
"type": "object",
"properties": {
"connectionId": {
"type": "string"
}
},
"required": [
"connectionId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_code_guide(vendor, language)
How to rewrite the source vendor's SDK calls to OpenFeature with Railflag: setup, regex patterns, before/after examples, notes. Apply it in the user's repo yourself and show them the diff.
Input Schema
{
"type": "object",
"properties": {
"vendor": {
"type": "string",
"enum": [
"abtasty",
"unleash"
]
},
"language": {
"type": "string",
"enum": [
"typescript",
"javascript",
"python",
"go",
"java",
"kotlin"
],
"description": "Language of the code to migrate"
}
},
"required": [
"vendor"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Community
Evidence