FlagBeta

AI & MCP

Your AI, not ours

Flag has an MCP server, API keys and OAuth, so Claude or any other agent can drive it. We don't sell AI: anything AI in Flag runs on your own provider key.

The MCP server

https://flag.nightroll.app/mcp

Streamable HTTP, JSON responses. Every tool call is checked against the key's scopes and written to your organization's audit log.

With an API key

For Claude Code, scripts and any MCP client that sends headers. Create a key in Settings → API keys (scoped, with an expiry), then:

claude mcp add --transport http flag https://flag.nightroll.app/mcp --header "Authorization: Bearer $KEY"

With OAuth

For claude.ai and Claude Desktop: add the URL above as a custom connector. You sign in, pick the organization and the permissions, and approve. Disconnect any time from Settings → API keys.

What your agent can do

  • Create flags, turn them on or off, and change targeting rules, percentage rollouts and segments
  • Explain why a context got a variation, and show the blast radius before a change
  • Propose change requests and schedule changes; an agent's writes to a critical environment become change requests people approve
  • Find stale flags and kill switches, compare environments and restore an earlier flag version
  • Invite people to your org and see what usage costs

Tools

An agent sees only the tools its scopes allow: read, write or admin, never more than the person's role.

ToolWhat it doesScope
get_orgThe org this connection is for: its projects, environments (and which are critical) and your role. Start here.read
list_projectsAll projects with their environments.read
list_flagsList a project's flags with their on/off state and targeting summary per environment.read
get_flagOne flag in full: variations, targeting in every environment, prerequisites, dependents, pending change requests and schedules.read
evaluate_explainEvaluate a flag for a context and explain every step, to answer 'why did X get variation Y'.read
blast_radiusBefore changing a flag: traffic by variation, dependent flags, segments, connected streams and a risk level.read
flag_historyA flag's versions, newest first, with who changed what and the diff.read
flag_insightsEvaluation counts per hour and variation for a flag in an environment.read
compare_environmentsWhich flags and segments differ between two environments.read
list_segmentsSegments in an environment.read
get_segmentOne segment with its keys, rules, and the flags and segments that use it.read
list_change_requestsChange requests awaiting approval, or by status.read
get_change_requestOne change request with its reviews and a preview of what it would change now.read
list_schedulesA flag's scheduled changes.read
stale_flagsTemporary flags that look ready to remove, and why.read
kill_switchesFlags tagged kill-switch and whether each is on, per environment.read
list_templatesFlag templates (built-in and the org's).read
create_flagCreate a flag, optionally from a template. New flags are off everywhere.write
update_flagChange a flag with semantic patch instructions; in a critical environment this may file a change request.write
toggle_flagTurn a flag on or off in one environment.write
archive_flagArchive a flag (it stops being served).write
restore_flag_versionWrite an earlier version of a flag back as a new version: one-click undo.write
copy_environmentCopy flag targeting (and optionally segments) from one environment into another.write
create_segmentCreate a segment: included/excluded keys and/or rules.write
update_segmentChange a segment: targets, rules or name.write
create_change_requestPropose a change for people to review, optionally to apply at a set time once approved.write
schedule_changeSchedule targeting instructions for a time.write
whoamiWho the key or token belongs to: person, organization, role and scopes.read
list_membersThe organization's members and their roles.read
invite_membersInvite people by email, with a role.admin
list_invitesOpen invites.admin
revoke_inviteRevoke an open invite.admin
get_usageUsage and cost for a month, per meter.admin
list_audit_eventsThe audit log, filtered by person, action and dates.admin

Bring your own key

Flag has no AI features of its own: your agent brings the intelligence, Flag brings the tools.

We don't sell AI

No AI credits, no markup on tokens, no training on your data. You choose the model and the provider, and you pay them directly.

Connect in a minute

Step by step, with example prompts.

QuickStart