// developer documentation

Docs.

From zero to your first flag in four minutes. API reference, SDK guides, and every change we've shipped.

v1.8.27 SDKsMCP · 6 toolsupdated 04/17/26
// 01 · getting started

Quickstart

FlagDrop runs differently from every other feature flag service: we push signed JSON to your bucket and your SDKs read locally. This guide takes you from nothing to a flag in production in under four minutes.

TL;DR
npm i @flagdrop/sdk → point at your bucket → call flags.getBool(). No proxy, no round-trip, no egress.

#Install

FlagDrop ships SDKs for Node, Python, Go, Rust, Swift, Kotlin, and edge runtimes. Pick yours:

terminal
# node / deno / bun
$ npm i @flagdrop/sdk

# python 3.10+
$ pip install flagdrop

# go
$ go get github.com/flagdrop/go

# rust
$ cargo add flagdrop

#Connect your bucket

FlagDrop needs one-time write access to a bucket you own. We recommend a dedicated bucket per project. Grant access via the dashboard — we never receive your access key.

aws · iam policy
{
  "Version": "2012-10-17",
  "Statement": [{
    "Sid":      "FlagDropWrite",
    "Effect":   "Allow",
    "Action":   ["s3:PutObject", "s3:GetObject"],
    "Resource": "arn:aws:s3:::acme-flags-prod/*"
  }]
}
BYOK
Using KMS? Point FlagDrop at your key ARN in the bucket settings. Every push is re-encrypted through your key — we never hold plaintext.

#Create your first flag

Create a flag from the dashboard, the CLI, or your coding agent via MCP. All three paths write the same signed config.

cli
$ flagdrop flag create new-checkout \
    --type bool \
    --default false \
    --env production

→ created flag 'new-checkout' (bool)
→ pushed to s3://acme-flags-prod/production.json
→ signed with project key ...7f3a
✓ ready · 0.8s

#Read it in code

Every SDK is five lines or fewer. Initialize the client, wait for the first sync, then call a typed getter.

app.ts
import { FlagClient } from '@flagdrop/sdk'

const flags = new FlagClient({
  bucket:      'acme-flags-prod',
  environment: 'production',
  refreshMs:   5000,
})

await flags.ready()

if (flags.getBool('new-checkout', false)) {
  renderNewCheckout()
}

That's it. Your SDK is now hot-reloading from your bucket every refreshMs. Median eval: 0.3ms. No network hop per call.

// 02 · concepts

Architecture

FlagDrop splits the system into a control plane (us) and a data plane (you). We push; you read. Nothing in your request path ever talks to our servers.

ascii · data flow
  ┌──────────────────┐        push()         ┌─────────────────┐        read()         ┌──────────────┐
  │  flagdrop cloud  │ ────signed manifest──▶ │  your bucket    │ ◀──hot-reload, 5s──── │  your SDKs   │
  │  dashboard / mcp │                        │  s3 · gcs · r2  │                       │  in-process  │
  └──────────────────┘                        └─────────────────┘                       └──────────────┘
         ▲                                                                                      │
         └──────────────────────── audit log ◀──────── eval metrics (opt-in) ────────────────────┘

#Flags & types

A flag is a named, typed value. FlagDrop supports four primitives and one compound:

  • bool — boolean toggle, the most common case.
  • string — useful for variant tags like 'control' | 'v2' | 'v3'.
  • number — percentages, thresholds, feature limits.
  • json<T> — arbitrary typed object. Validated by schema if provided.
  • variant — weighted multi-value with deterministic bucketing by user.

#Targeting rules

Rules are a transparent JSON AST. You can diff them in Git, render them in PRs, and let an agent reason about them:

rule · new-checkout
{
  "if": { "and": [
    { "eq": ["user.plan", "pro"] },
    { "in": ["user.country", ["US", "CA", "UK"]] },
    { "lt": [{ "hash": "user.id" }, 0.25] }
  ] },
  "then": true,
  "else": false
}

#Rollouts

Every flag supports a rollout percentage from 0-100 with stable per-user bucketing. Combine with targeting to ramp a cohort. Schedule auto-promotions with cron syntax. Kill-switch revokes a flag across all SDKs in under 5 seconds — one write to your bucket.

// 03 · api reference

FlagClient

The FlagClient is the single entry point for every SDK. It maintains a local cache of your flag config and refreshes from your bucket on a configurable interval.

Constructor

new FlagClient(config: ClientConfig) → FlagClient

ClientConfig

bucket string
Name of your S3, GCS, Azure Blob, or R2 bucket.
environment string optional
Environment key inside the bucket. Defaults to 'production'.
provider 'aws' | 'gcp' | 'azure' | 'r2' optional
Storage provider. Inferred from the bucket URL if omitted.
region string optional
Cloud region. Required if your provider SDK can't infer it.
refreshMs number optional
How often the SDK re-reads the config. Defaults to 5000.
fallback FlagMap optional
Static map used when the bucket is unreachable on cold start.

#Methods

ready()

ready(): Promise<void>

Resolves after the first successful bucket sync. Safe to call multiple times.

getBool()

getBool(name: string, default: boolean = false): boolean

Synchronous boolean read. Never throws; returns the default if the flag is missing.

getString() / getNumber() / getJson()

getString(name, default): string
getNumber(name, default): number
getJson<T>(name, default): T

getVariant()

getVariant(name: string, context: EvalContext): string

Deterministic bucketing by context.userId across SDKs. Same input, same output, every runtime.

on(event, handler)

on('update' | 'error', handler): () => void

Subscribe to config updates or transport errors. Returns an unsubscribe function.

#Errors

FlagDrop getters never throw. Transport errors are surfaced via the 'error' event and the client keeps serving the last good config.

BUCKET_UNREACHABLE
Bucket returned non-2xx. Will retry with jitter up to maxRetries.
SIGNATURE_INVALID
Config signature failed verification. Keeps last good config. Alerts audit log.
SCHEMA_MISMATCH
Flag type doesn't match getter type. Returns the provided default.

#MCP tools

When the FlagDrop MCP server is connected, your coding agent gets six tools scoped to your project. Permissions are bounded per-agent via API key scopes.

create_flag
Scaffold a new flag with sensible defaults and a draft PR.
toggle
Flip a boolean in a specific environment. Bounded by scope.
rollout
Gradual ramp with optional targeting rule.
target
Attach or update a JSON AST rule. Validated before push.
rollback
Restore any prior config version. Every push is versioned.
audit
Read who changed what, when, and from where.
// 04 · ops

CLI

The flagdrop CLI is a thin wrapper around the same REST API the dashboard uses. Install with npm i -g @flagdrop/cli or brew install flagdrop.

$ flagdrop --help
USAGE
  flagdrop <command> [options]

COMMANDS
  init            scaffold a project in the current repo
  flag create     create a new flag
  flag toggle     flip a boolean flag
  rollout         set rollout percentage
  kill            revoke a flag across all SDKs
  push            push current config to bucket
  estimate        show what you'd pay vs competitors
  audit           read audit log

#Migrations

We wrote importers for LaunchDarkly, Split, and Statsig. Run flagdrop migrate <vendor>, paste your export token, and FlagDrop will re-create every flag, rule, and segment in your bucket. Pro and Enterprise customers get a free pairing session — usually done in under a day for ≤500 flags.

#Self-host

Enterprise customers can run the FlagDrop control plane inside their own VPC via our Helm chart. SDK and config format are already open-source under Apache-2.0.

helm
$ helm repo add flagdrop https://charts.flagdrop.io
$ helm install fd flagdrop/control-plane \
    -n flagdrop --create-namespace \
    -f values.yaml
// 05 · changelog

Changelog

Every shipped version of FlagDrop, newest first. Subscribe via RSS at /changelog.rss.

v1.8.204/17/26
current

MCP tools for scheduled rollouts

  • new rollout.schedule MCP tool — agents can now set cron-based auto-promotions.
  • imp SDK cold-start is 40% faster thanks to parallelized signature verification.
  • fix Edge SDK now correctly surfaces SIGNATURE_INVALID to the error handler.
v1.8.003/29/26

Swift & Kotlin SDKs

  • new First-class mobile SDKs with offline cache, background refresh, and deterministic bucketing.
  • new getVariant() on every runtime for weighted multi-value experiments.
  • imp Audit export supports NDJSON in addition to CSV.
v1.7.002/11/26

BYOK & per-project KMS

  • new Bring your own KMS key per project. We never hold plaintext.
  • new Dedicated region option (EU / US / APAC) for Enterprise.
  • imp Dashboard flag list is 5x faster at 10k+ flags.
v1.6.001/18/26

MCP server, public

  • new Public MCP server with six tools — create_flag, toggle, rollout, target, rollback, audit.
  • new Per-agent API key scoping with default read-only.
  • fix Python SDK: timezone bug in scheduled rollouts.
v1.5.012/05/25

Cloudflare R2 & MinIO

  • new First-class R2 and MinIO support — same API, same signing.
  • imp SDK gzipped size dropped to 2.1kb (node) / 1.8kb (edge).
  • breaking FlagClient constructor now requires bucket. Migration: pass your bucket name.
v1.4.010/22/25

Signed configs

  • new Every pushed config is now signed with ed25519. SDKs verify before applying.
  • new Project public keys surfaced in the dashboard for pinning.
v1.0.007/04/25

Public launch

  • new Node, Python, Go, Rust, and Edge SDKs.
  • new AWS, GCP, Azure support.
  • new Flat pricing — $49 per project, unlimited seats.
// four minutes

Your first flag
is a terminal away.

Free forever. No credit card. Works with the bucket you already have.