# LaunchFlag > LaunchFlag is a hosted feature flag service for small teams and solo builders. You wrap a > risky code path in one `if`, ship it to production turned off, then roll it out by > percentage, allowlist or user id and turn it back off from your phone, with no redeploy > and no rollback. The SDK fetches one cached config document and evaluates every flag > inside your process, so your app never waits on us and keeps serving the last known > state if we are unreachable. ## What it is - A kill switch for code you just shipped. One click disables a feature everywhere. - Percentage rollouts, first-N admission, allowlists, logged-in-only targeting and 2 to 5 arm variants. - Up to three environments per project (dev, staging, prod), one key each, promoted forward by hand. Free runs dev and prod; Pro adds staging. - An audit log of every flip: who, when, and what changed. 7 days of history on Pro, 30 on Launch. - An agent skill and a hosted MCP server, so a coding agent wraps its own risky changes in a flag. - Scoped API tokens: as many as you need, each revocable on its own. Full does everything you can; CI changes flags in dev and staging only, never prod and never Emergency off; Read only changes nothing. - Flag dependencies: one flag can require another, so it stays off for a user while the flag it requires is off for them. Resolved in your process, in the same pass, with no extra request. - An OpenFeature provider (`launchflag/openfeature`), so the code calls the standard API and moving to another vendor is one line. Evaluation still happens locally. - Local evaluation: one `GET /api/config` per cache window for the whole process, not per user. ## What it is not - Not an experimentation or stats platform. It serves the arm and records evaluation counts. It computes no significance and stores no events. Measure results where you already measure things. - Not an analytics or session tool. It holds no user profiles and no per-user history. - Not priced per seat. One price per account, unlimited teammates on every plan including Free. - Not self-hostable today. The SDK points at one base URL, so it is possible later, but nothing is built. - Not an enterprise platform. No SSO, no approval workflows, no SLA. - Not a multi-language SDK. One SDK, for JavaScript and TypeScript; everything else calls the HTTP API directly. The docs carry working Python and Go clients that do exactly that: fetch `/api/config`, cache it 5 seconds, evaluate in process with the same FNV-1a bucket. - Not a config or secrets store. Flags are booleans and variant arms, not application configuration. ## Pricing - Free forever plan: unlimited teammates, 1 project, 2 environments, unlimited flags and evaluations, percentage and first-N targeting, multivariate flags, 3 days of audit log. No staging, emergency off, second project or alerts. - 7-day free trial, no card, limits matching Launch. When it ends the account lands on Free and keeps working: nothing is deleted, nobody loses access, and flags can still be turned off. LaunchFlag never freezes an account's flags over a billing state. - Pro: $12 a month. 1 project, 3 environments (dev, staging and prod), unlimited flags, unlimited evaluations, percentage rollout and allowlist, phone toggle, owner/developer/viewer roles, 7-day audit log. - Launch: $29 a month. Everything in Pro, 3 projects, 30-day audit log, emergency off for every flag at once, Slack or Discord ping on every flip. - Cancelling keeps the plan to the end of the period already paid for. A failed card gets three days past that date. Either way the account lands on Free rather than locking, keeps every flag and teammate, and can still turn anything off. - No per-seat charge and no per-evaluation charge on either plan. Flags are evaluated inside the customer's own process, so traffic costs nothing and there is no monthly evaluation cap. Flags, evaluations, teammates, targeting, multivariate and the three roles are unlimited or included on both plans; what differs is projects, environments and audit retention. ## Integration ```ts import { flag } from "launchflag"; if (await flag("checkout_v2", user.id)) return newCheckout(cart); return oldCheckout(cart); ``` Node 18+, no dependencies. `npx launchflag init` installs the package and writes the key, the agent skill and the MCP config. Using pnpm? Run `pnpm dlx launchflag init` instead of `npx`. A flag registers itself the first time your code asks for it, off in every environment, fail closed. `flag()`, `variant()` and `all()` never throw. ## Coding agents Works with Claude Code, Codex, Cursor and any other client that speaks MCP. Two ways to connect, the same 9 tools: the hosted endpoint at `https://launchflag.dev/mcp` (Streamable HTTP, POST only, stateless), or `npx -y launchflag-mcp@latest` over stdio for clients that do not speak it. A management token (`lfk_…`, per user, not per project) goes in an `Authorization: Bearer` header or the `LAUNCHFLAG_TOKEN` env var, never in a query string or a URL. ```bash # Claude Code claude mcp add --transport http launchflag https://launchflag.dev/mcp --header "Authorization: Bearer lfk_..." # Codex: no header flag, it reads a bearer token from the environment export LAUNCHFLAG_TOKEN=lfk_... codex mcp add launchflag --url https://launchflag.dev/mcp --bearer-token-env-var LAUNCHFLAG_TOKEN # Cursor, .cursor/mcp.json {"mcpServers":{"launchflag":{"type":"http","url":"https://launchflag.dev/mcp","headers":{"Authorization":"Bearer lfk_..."}}}} ``` Tools: `list_flags`, `cleanup_flags`, `create_flag`, `set_flag`, `promote_flag`, `depend_flag`, `delete_flag`, `emergency_off`, `list_projects`. An agent can create a flag, flip it in dev, and promote it dev to staging or staging to prod. The agent skill at `https://launchflag.dev/skill.md` teaches it to wrap every risky change in a flag, ship it off, and never enable one in production itself. ## API shapes ``` GET /api/config?key=lf_prod_... # the rule set for one environment, no user data, ETag = v -> {"v":42,"env":"prod","emergencyOff":false,"archived":false, "flags":{"checkout_v2":{"type":"boolean","failMode":"closed","essential":false, "enabled":true,"targeting":"percentage","percentage":25,"limit":100, "allowlist":[],"variants":[]}}} GET /api/eval?flag=checkout_v2&user=u_123 Authorization: Bearer lf_prod_... -> {"enabled":false,"reason":"disabled","variant":null} GET /api/flags?user=u_123&keys=checkout_v2&c=checkout_v2:12:5 # keys= registers unknown keys, it never filters -> {"flags":{"checkout_v2":{"enabled":false,"failMode":"closed","variant":null, "type":"boolean"}, "new_nav":{"enabled":true,"failMode":"open","variant":null,"type":"boolean"}, "pricing_test":{"enabled":true,"failMode":"closed","variant":"b", "type":"multivariate"}},"emergencyOff":false,"env":"dev"} # always the whole config for that environment: every flag, evaluated for this user POST /api/counts {"c":{"checkout_v2":{"evals":12,"on":5}}} -> 204 POST /api/register {"keys":["checkout_v2"]} -> {"created":["checkout_v2"],"skipped":[]} ``` Rate limits: 600 requests a minute per environment key, 120 a minute per `lfk_` API token. ## Links - [Full text of the docs](https://launchflag.dev/llms-full.txt): both docs pages as plain text. - [SDK quickstart](https://launchflag.dev/docs): install, integration, variants, flag dependencies, OpenFeature, local evaluation, fail modes, environments, raw API, rate limits. - [Agents and MCP](https://launchflag.dev/docs/agents): the agent skill, the hosted MCP server, its 9 tools, token safety. - [Agent skill file](https://launchflag.dev/skill.md): the markdown skill, ready to drop into a repo. - [Pricing and FAQ](https://launchflag.dev/pricing), also as text: https://launchflag.dev/pricing.md - [LaunchDarkly pricing calculator](https://launchflag.dev/tools/launchdarkly-pricing-calculator), also as text: https://launchflag.dev/tools/launchdarkly-pricing-calculator.md - [Blog index](https://launchflag.dev/blog) ## Writing Each post is also served as plain markdown at the same path plus `.md`, which is the version to fetch and quote. Every competitor figure in these is dated and linked to its source. - [Dark launching: ship the code, keep it off, flip it when you are ready](https://launchflag.dev/blog/dark-launching.md): Dark launching means deploying with the feature off, then releasing it without another deploy. How it differs from canary and blue-green, and the case that takes your feature down. - [LaunchDarkly pricing explained: the two meters that decide your bill](https://launchflag.dev/blog/launchdarkly-pricing.md): LaunchDarkly pricing has no per-seat charge and no flat number. What Developer includes free, what client-side MAU and service connections actually count, and how to estimate your bill. - [LaunchDarkly alternatives: what a flat-priced flag service can and cannot do](https://launchflag.dev/blog/launchdarkly-alternatives.md): LaunchDarkly stopped charging per seat. An honest look at what it costs now, when its free tier is the right answer, and when a LaunchDarkly alternative is. - [PostHog feature flags vs LaunchFlag: when you need analytics and when you need a switch](https://launchflag.dev/blog/posthog-feature-flags-vs-launchflag.md): PostHog feature flags come with an analytics platform attached. LaunchFlag is only the switch. Setup, evaluation, pricing and kill switch, compared fairly. - [We unshipped a broken checkout from a phone in 9 seconds](https://launchflag.dev/blog/unshipped-a-broken-checkout-in-9-seconds.md): An agent wrote the checkout, I merged it, a customer found the bug. What a kill switch is, why the old path has to stay, and the three lines that make it work. - [Changelog](https://launchflag.dev/changelog) - [Home](https://launchflag.dev)