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/mcpStreamable 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.
| Tool | What it does | Scope |
|---|---|---|
get_org | The org this connection is for: its projects, environments (and which are critical) and your role. Start here. | read |
list_projects | All projects with their environments. | read |
list_flags | List a project's flags with their on/off state and targeting summary per environment. | read |
get_flag | One flag in full: variations, targeting in every environment, prerequisites, dependents, pending change requests and schedules. | read |
evaluate_explain | Evaluate a flag for a context and explain every step, to answer 'why did X get variation Y'. | read |
blast_radius | Before changing a flag: traffic by variation, dependent flags, segments, connected streams and a risk level. | read |
flag_history | A flag's versions, newest first, with who changed what and the diff. | read |
flag_insights | Evaluation counts per hour and variation for a flag in an environment. | read |
compare_environments | Which flags and segments differ between two environments. | read |
list_segments | Segments in an environment. | read |
get_segment | One segment with its keys, rules, and the flags and segments that use it. | read |
list_change_requests | Change requests awaiting approval, or by status. | read |
get_change_request | One change request with its reviews and a preview of what it would change now. | read |
list_schedules | A flag's scheduled changes. | read |
stale_flags | Temporary flags that look ready to remove, and why. | read |
kill_switches | Flags tagged kill-switch and whether each is on, per environment. | read |
list_templates | Flag templates (built-in and the org's). | read |
create_flag | Create a flag, optionally from a template. New flags are off everywhere. | write |
update_flag | Change a flag with semantic patch instructions; in a critical environment this may file a change request. | write |
toggle_flag | Turn a flag on or off in one environment. | write |
archive_flag | Archive a flag (it stops being served). | write |
restore_flag_version | Write an earlier version of a flag back as a new version: one-click undo. | write |
copy_environment | Copy flag targeting (and optionally segments) from one environment into another. | write |
create_segment | Create a segment: included/excluded keys and/or rules. | write |
update_segment | Change a segment: targets, rules or name. | write |
create_change_request | Propose a change for people to review, optionally to apply at a set time once approved. | write |
schedule_change | Schedule targeting instructions for a time. | write |
whoami | Who the key or token belongs to: person, organization, role and scopes. | read |
list_members | The organization's members and their roles. | read |
invite_members | Invite people by email, with a role. | admin |
list_invites | Open invites. | admin |
revoke_invite | Revoke an open invite. | admin |
get_usage | Usage and cost for a month, per meter. | admin |
list_audit_events | The 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.