FlagBeta

QuickStart

Let your agent drive Flag

Create a key, connect Claude (or any MCP client), then ask in plain words. Everything an agent does is limited by the key's scopes and recorded in your audit log.

  1. Create an API key

    Sign in, open Settings → API keys, and create a key with the scopes your agent needs and an expiry date. It is shown once: copy it into your shell.

    export KEY=nr_flag_…
    export ORG=your-org-slug
  2. Add it to Claude Code

    One command registers Flag's MCP server with your key:

    claude mcp add --transport http flag https://flag.nightroll.app/mcp --header "Authorization: Bearer $KEY"
  3. Or connect claude.ai and Claude Desktop

    No key needed: in Settings → Connectors, choose Add custom connector and paste this URL. Claude opens Flag's consent page, where you pick the organization and what Claude may do, then approve.

    https://flag.nightroll.app/mcp
  4. Ask

    Try these prompts:

    • Invite alex@example.com and sam@example.com to our org as members
    • Create a kill-switch flag called checkout-v2 and turn it on in development.
    • Which temporary flags look stale, and why?
    • Roll new-search out to 10% of users in development.
    • Propose a change request to turn off legacy-export in production.
    • What differs between development and production?
  5. The same thing over REST

    Every MCP tool has a REST twin. Use the same key as a bearer token:

    Invite two people

    curl -X POST https://flag.nightroll.app/api/orgs/$ORG/invites \
      -H "Authorization: Bearer $KEY" \
      -H "Content-Type: application/json" \
      -d '{"emails":["alex@example.com","sam@example.com"],"role":"member"}'

    Who am I

    curl https://flag.nightroll.app/api/v1/me -H "Authorization: Bearer $KEY"

    List flags ($ORG is your org slug)

    curl https://flag.nightroll.app/api/v1/orgs/$ORG/projects/default/flags -H "Authorization: Bearer $KEY"

    Turn a flag on in development

    curl -X PATCH https://flag.nightroll.app/api/v1/orgs/$ORG/projects/default/flags/checkout-v2 -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{"environmentKey":"development","instructions":[{"kind":"turnFlagOn"}]}'

More about agents

The MCP URL, every tool, OAuth and bringing your own AI key.

AI & MCP