LiftCanary

API

AI assistants (MCP)

Ask Claude, Cursor or another MCP client about results, and let it manage flags.

The LiftCanary MCP server lets Claude, Cursor and other AI assistants that speak the Model Context Protocol read your experiment results and manage feature flags. Ask in plain words:

  • “How is the one-page checkout test doing? Can we ship it?”
  • “Which experiments are running in production, and which are winning?”
  • “Is the new checkout better on mobile?”
  • “Turn off new_checkout in production.”
  • “Who changed the pricing flag yesterday?”

Results reach the assistant with their lift, confidence interval, significance and verdict, plus warnings such as a sample ratio mismatch, and the server tells it never to call a winner from an inconclusive result.

Set up#

Create an API token under Settings → API tokens. A viewer token can only read, which is all most people need; use an editor token if the assistant may switch flags and stop experiments. Then add the server to your client:

claude mcp add --transport stdio liftcanary --env LIFTCANARY_API_TOKEN=sk_... -- npx -y @liftcanary/mcp

Claude Desktop reads claude_desktop_config.json (Settings → Developer → Edit config); Cursor reads ~/.cursor/mcp.json or a project's .cursor/mcp.json; VS Code reads .vscode/mcp.json and asks for the token instead of storing it. The server needs Node.js 18 or later.

Settings#

VariableWhat it does
LIFTCANARY_API_TOKENRequired. An API token (sk_…); the server can do what its role allows.
LIFTCANARY_PROJECTProject key used when a request names none. Not needed when the organization has a single project.
LIFTCANARY_READ_ONLY1 offers only the tools that read, whatever the token's role.
LIFTCANARY_API_URLDefault https://api.liftcanary.com; your own address when self-hosting.

Tools#

ToolWhat it does
list_projectsProjects and their environments.
list_flagsFlags with their kind and whether each environment has them on; optional search.
get_flagOne flag: variations, variables and targeting in every environment.
list_experimentsExperiments, newest first, with the headline result on the primary goal; optional status filter.
get_experiment_resultsEvery goal with values, lift, interval, significance and verdict; guardrails, the funnel and warnings.
get_experiment_breakdownOne goal split by an attribute such as device or country, tested at a stricter level per segment.
list_goalsGoals with recent event counts, and tracked events without a goal.
list_audiencesSaved audiences and their conditions.
get_usageTested visitors this month against the plan.
get_audit_logRecent changes: who changed what, and when.
set_flag_enabledThe kill switch: a flag on or off in one environment, keeping its rules.
create_flagA boolean or multivariate flag, off everywhere.
create_goalA goal for an event, with its type and whether more or less is better.
start_experimentStarts a draft.
stop_experimentEnds a running experiment, optionally giving everyone in its audience one variation.

The last five change your configuration: MCP clients ask before running them, stop_experiment is marked as destructive, and LIFTCANARY_READ_ONLY=1 leaves them out. Experiments can be named (“the checkout test”) instead of passing their id; when a name matches several, the assistant is told which. The review_experiment prompt (in Claude Code, /mcp__liftcanary__review_experiment) reads an experiment's results and recommends shipping, continuing or stopping.

Try it without a client#

The MCP Inspector lists the tools and lets you call them by hand:

Terminal
LIFTCANARY_API_TOKEN=sk_... npx @modelcontextprotocol/inspector npx -y @liftcanary/mcp