@flaggr/mcp-server
v0.2.0
Published
MCP server for Flaggr feature flag platform
Maintainers
Readme
@flaggr/mcp-server
Model Context Protocol (MCP) server for Flaggr — manage feature flags from AI assistants like Claude, Cursor, and VS Code Copilot.
Installation
npm install -g @flaggr/mcp-serverAuthentication
The Flaggr MCP server supports three flexible authentication methods:
- Auto-Discovery via Flaggr CLI (
~/.flaggr/config.json): If you have already logged in viaflaggr login, the MCP server automatically reads your stored credentials with zero manual configuration. - Interactive Browser Login via MCP Tool (
login): AI assistants can call thelogintool directly. It will open your browser to the Flaggr authorization page, prompt you to select an organization/project, and securely save the minted credentials locally. - Direct Token via Environment or MCP Tool:
Pass
FLAGGR_API_TOKENin your environment or calllogin({ token: "fgr_..." }).
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"flaggr": {
"command": "npx",
"args": ["@flaggr/mcp-server"],
"env": {
"FLAGGR_API_URL": "https://flaggr.dev"
}
}
}
}(If you have logged in via flaggr login, FLAGGR_API_TOKEN can be omitted!)
Tools
| Tool | Description |
|------|-------------|
| get_auth_status | Check authentication status, current project, and connection |
| login | Authenticate via browser OAuth flow or supply an API token |
| logout | Clear in-memory and stored credentials |
| list_projects | List all projects |
| get_project | Get project details |
| list_services | List services in a project |
| list_flags | List flags for a service |
| get_flag | Get flag configuration |
| create_flag | Create a new flag |
| update_flag | Update flag settings |
| toggle_flag | Enable/disable a flag |
| delete_flag | Delete a flag |
| evaluate_flag | Evaluate a flag with context and targeting |
| get_flag_toggle_impact | Post-toggle safety, drift metrics, error rate delta, P99 latency shift, and automated health assessment |
| get_flag_metrics | Detailed evaluation volume, error rates, percentiles, breakdowns, and toggle impact |
| get_project_health | Aggregated project health score, per-service breakdown, top issues |
| get_evaluation_heatmap | Project-wide flag x service evaluation usage heatmap |
| get_audit_log | Audit logs with deep path-scoped diffs and actor attribution |
| get_flag_history | Flag revision history and version diffs |
| measure_round_trip | True real-time SSE stream propagation and RTT latency measurement |
| watch_flag_updates | Real-time SSE flag event stream listener |
| get_trace | OpenTelemetry distributed trace waterfall and hotspot diagnosis |
| get_flag_traces | Query recent evaluation traces |
| trace_flag_evaluation | Evaluate flag on-demand and produce flamechart waterfall |
| create_targeting_rule | Add targeting rule |
| delete_targeting_rule | Remove targeting rule |
| create_override | Create context override |
| delete_override | Remove override |
| check_system_health | Platform and telemetry health check |
| get_flag_health | Flag health score |
| get_evaluation_stats | Service evaluation metrics |
| get_flag_impact | Pre-change impact analysis |
| create_experiment | Set up A/B test |
| list_experiments | List experiments |
| get_experiment | Get experiment details |
| stop_experiment | End an experiment |
| list_sites | List all sites and web properties within a service or project |
| get_site | Get site configuration details, domain, and linked feature flags |
| create_site | Onboard a new site with domain and initial flags |
| update_site | Update site domain, environment, description, or linked flags |
| delete_site | Delete an onboarded site |
| link_flag_to_site | Link a feature flag to a site for telemetry tracking and SDK evaluation |
| unlink_flag_from_site | Unlink a feature flag from a site |
| get_flag_linked_sites | List all sites in a service that are linked to a specific flag |
Resources
flaggr://auth/status— Current authentication state and project bindingflaggr://projects— All projectsflaggr://project/{slug}/flags— Flags for a projectflaggr://site/{siteId}— Site configuration, domain, and linked flagsflaggr://flag/{key}/health— Flag health scoreflaggr://flag/{key}/toggle-impact— Post-toggle safety, drift metrics, and before/after comparison
Prompts
verify_toggle_safety— Verify post-toggle safety, drift, and performance impactgradual_rollout— Plan a staged percentage rolloutab_test_setup— Design an A/B test experimenttargeting_strategy— Build targeting rules for a use case
Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| FLAGGR_API_URL | Yes | Flaggr instance URL |
| FLAGGR_API_TOKEN | Yes | API token with appropriate scopes |
