APIs & automation

MCP Server

Connect Claude, Cursor, or VS Code to the hosted Zenmanage MCP server, and look up every tool's arguments and required scope.

Overview

The Zenmanage MCP server exposes flag-management reads and writes — list_flags, evaluate_flag, create_flag, targeting-rule and rollout management, and more — to AI assistants over the Model Context Protocol.

It's hosted at https://mcp.zenmanage.com/mcp — there's nothing to install. Point your client at that URL with your own token as a Bearer header and it can start reading and editing your flag configuration.

Prerequisites

  • An MCP-capable client — Claude Desktop, Claude Code, Cursor, or VS Code with GitHub Copilot all work.
  • A Zenmanage token to authenticate as — a personal access token or a management API token, covered below.
  • The project (and environment, for target/rule tools) key you want the assistant to operate on.

How auth works

Every tool call authenticates as you, using your own Authorization: Bearer <token> header — the MCP server holds no Zenmanage credentials of its own, and nothing about your token is logged or stored by it. A tool call can only ever do what your token could already do directly.

Two token types work as that bearer token. Pick whichever matches how you're connecting:

pat_...

Personal access token

Recommended default. A PAT authenticates as you — there's no scope picker, it can do whatever your own account access already allows, and it stays correct automatically if your permissions change later.

  1. 1. Sign in to Zenmanage and open Profile → Personal Access Tokens.
  2. 2. Choose Create Token, give it a name, and set an optional expiration.
  3. 3. Copy the pat_... value shown — it's only displayed once.

If you don't see this tab, an admin has disabled personal access tokens for your account — use a management API token instead, or ask them to re-enable it.

Client configs

This is a remote, Streamable-HTTP MCP server — paste one of these into your client with your token in place of the placeholder. Treat the token like any other credential: don't commit it to source control.

claude mcp add bash

claude mcp add --transport http zenmanage https://mcp.zenmanage.com/mcp --header "Authorization: Bearer "
        

Or add directly to .mcp.json:

.mcp.json json

{
  "mcpServers": {
    "zenmanage": {
      "type": "http",
      "url": "https://mcp.zenmanage.com/mcp",
      "headers": {
        "Authorization": "Bearer "
      }
    }
  }
}
        

Tool reference — read

A personal access token can call any tool your own account access covers — the scope badge only applies when you're connecting with a management API token.

list_projects

List projects the token has access to, with cursor pagination. Use this to discover a project's key before calling the other tools.

Arguments

Argument Description
per_page optional Results per page (max 100, default 25).
cursor optional Pagination cursor from a previous response.

Required scope

projects:read
list_environments

List environments for a project, with cursor pagination. Use this to discover an environment's key before calling evaluate_flag.

Arguments

Argument Description
project_key The key of the project to list environments for.
per_page optional Results per page (max 100, default 25).
cursor optional Pagination cursor from a previous response.

Required scope

projects:read
list_flags

List feature flags for a project, with optional type/search filtering and cursor pagination.

Arguments

Argument Description
project_key The key of the project to list flags for.
type optional Filter by flag type: boolean, number, or string.
search optional Filter flags by key or name substring.
per_page optional Results per page (max 100, default 25).
cursor optional Pagination cursor from a previous response.

Required scope

flags:read
get_flag

Get a single flag's configuration — name, type, description, inclusion settings — by key.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag to retrieve.

Required scope

flags:read
evaluate_flag

Evaluate a flag's current resolved value in a specific environment — accounting for rollout state and default targeting — the same way a live SDK client would.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag to evaluate.
environment_key The key of the environment to evaluate the flag in (e.g. "production").

Required scope

flags:read
list_flag_values

List all values defined for a flag. Use this to discover a value_ulid before creating/updating targeting rules or targets.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag to list values for.

Required scope

flags:read
list_targets

List a flag's targets — per-environment publication and rollout state — in an environment, newest first. Use this to discover a target's target_ulid, and its currently served value_ulid, before updating rollout or managing targeting rules.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment to list targets for.

Required scope

targets:read
get_target

Get a single target by ulid.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The target's ulid, from list_targets.

Required scope

targets:read
list_target_rules

List a target's targeting rules, in evaluation order. Each rule's value_ulid and criteria can be reused as a starting point when creating a new rule.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The target's ulid, from list_targets.

Required scope

targets:read

Tool reference — write

Every delete_* tool is safe-by-default: it refuses to act unless called with confirm: true. Most writes also accept an optional idempotency_key so a retried call can't be applied twice. Every write is recorded in the audit trail, viewable in the Zenmanage app.

create_flag

Create a new feature flag in a project. The flag's key and type can't be changed after creation.

Arguments

Argument Description
project_key The key of the project to create the flag in.
key The flag key: lowercase letters, digits, hyphens, and underscores, starting with a letter or digit. Cannot be changed after creation.
name A human-readable name for the flag.
type The type of value the flag serves: boolean, number, or string. Cannot be changed after creation.
description optional An optional description of the flag.
include_in_mobile optional Whether the flag is available to mobile SDKs. Defaults to true.
include_in_client optional Whether the flag is available to client-side SDKs. Defaults to true.
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

flags:write
update_flag

Update an existing flag's name, description, permanence, and inclusion settings. The flag's key and type can't be changed.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag to update.
name A human-readable name for the flag.
permanent Whether the flag is marked permanent, excluding it from stale-flag cleanup tooling.
description optional The flag description. Unlike include_in_mobile/include_in_client, this field is not preserved when omitted — omitting it clears any existing description.
include_in_mobile optional Whether the flag is available to mobile SDKs. Defaults to its current value.
include_in_client optional Whether the flag is available to client-side SDKs. Defaults to its current value.
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

flags:write
delete_flag

Permanently delete a flag and all of its targeting configuration. This cannot be undone.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag to delete.
confirm Must be explicitly set to true to confirm this irreversible action. The call is rejected otherwise.

Required scope

flags:write
create_flag_value

Create a new value for a flag.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag to create a value for.
display A human-readable label for this value, e.g. "Enabled".
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

flags:write
update_flag_value

Update an existing flag value's display label.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
value_ulid The value's ulid to update, from list_flag_values.
display The new human-readable label for this value.
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

flags:write
delete_flag_value

Permanently delete a flag value. This cannot be undone. Fails if the value is currently published to an environment, referenced by a target rule, or is the flag's current default.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
value_ulid The value's ulid to delete, from list_flag_values.
confirm Must be explicitly set to true to confirm this irreversible action. The call is rejected otherwise.

Required scope

flags:write
set_default_flag_value

Set a flag value as the flag's default, clearing the default flag on any other value for the flag.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
value_ulid The value's ulid to set as default, from list_flag_values.
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

flags:write
create_target

Start a new draft target for a flag/environment by cloning the currently-published target's rules, criteria, and value links. Edit it with update_target, add rules with create_target_rule, then publish_target when ready.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment to create a draft target in.
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

targets:write
update_target

Edit a draft target's base/fallthrough value and/or comment before publishing. The target must be a draft.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The draft target's ulid, from list_targets.
value_ulid optional The new base/fallthrough value ulid. At least one of value_ulid or comment is required.
comment optional The new comment for this change. At least one of value_ulid or comment is required.
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

targets:write
delete_target

Cancel a draft or scheduled target without publishing it, discarding it without affecting the currently-published target. This cannot be undone.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The draft or scheduled target's ulid to cancel, from list_targets.
confirm Must be explicitly set to true to confirm this irreversible action. The call is rejected otherwise.

Required scope

targets:write
publish_target

Publish a draft or scheduled target, replacing the currently-served value and expiring the previously-published target(s) for the same flag/environment. Provide scheduled_at to schedule a future publish instead of publishing immediately.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The draft or scheduled target's ulid to publish, from list_targets.
comment optional An optional comment for this publish.
scheduled_at optional An ISO 8601 timestamp in the future to schedule this publish instead of publishing immediately. Omit to publish now.
rollout_enabled optional Whether to publish with a percentage rollout instead of serving the value to 100% immediately.
rollout_mode optional Required if rollout_enabled is true: whether the rollout advances manually or automatically.
rollout_percentage optional Required if rollout_mode is "manual": the starting rollout percentage (1-100).
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

targets:write
update_target_rollout

Update a target's active rollout percentage. The target must already be published with an active rollout in progress — use list_targets to check its status first.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The target's ulid, from list_targets.
rollout_percentage The new rollout percentage (1-100).
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

targets:write
initialize_target_rollout

Start a percentage-based rollout on a draft target. The target must be a draft and must not already have a rollout configured.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The draft target's ulid, from list_targets.
rollout_mode Whether the rollout advances manually (via update_target_rollout) or automatically.
rollout_percentage optional Required if rollout_mode is "manual": the starting rollout percentage (1-100).
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

targets:write
delete_target_rollout

Remove all rollout configuration from a target, reverting it to a plain base/fallthrough value. The target must have a rollout configured. This cannot be undone.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The target's ulid, from list_targets.
confirm Must be explicitly set to true to confirm this irreversible action. The call is rejected otherwise.

Required scope

targets:write
complete_target_rollout

Complete a target's rollout immediately, setting it to 100% and expiring the previously-published target(s) for the same flag/environment. The target must have a rollout configured that is not already completed.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The target's ulid, from list_targets.

Required scope

targets:write
create_target_rule

Create a new targeting rule on a target, appended after its existing rules in evaluation order.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The target's ulid, from list_targets.
value_ulid The ulid of the flag value this rule should serve when its criteria matches. Reuse a value_ulid seen on this target (list_targets) or one of its existing rules (list_target_rules).
description A human-readable description of what this rule targets.
criteria The match criteria: a selector (attribute, context, or segment), a comparer (equal, in, gt, contains, etc.), an optional sub_selector naming the attribute, and the values to compare against.
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

targets:write
update_target_rule

Replace an existing targeting rule's value, description, and criteria in full — this is not a partial patch, so pass all fields even for a small change.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The target's ulid, from list_targets.
rule_ulid The rule's ulid, from list_target_rules.
value_ulid The ulid of the flag value this rule should serve when its criteria matches.
description A human-readable description of what this rule targets.
criteria The match criteria: a selector (attribute, context, or segment), a comparer (equal, in, gt, contains, etc.), an optional sub_selector naming the attribute, and the values to compare against.
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

targets:write
delete_target_rule

Permanently delete a targeting rule. This cannot be undone.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The target's ulid, from list_targets.
rule_ulid The rule's ulid to delete, from list_target_rules.
confirm Must be explicitly set to true to confirm this irreversible action. The call is rejected otherwise.

Required scope

targets:write
reorder_target_rules

Set the evaluation order of a target's rules. Rules are matched in ascending order when a target is evaluated.

Arguments

Argument Description
project_key The key of the project the flag belongs to.
flag_key The key of the flag.
environment_key The key of the environment.
target_ulid The target's ulid, from list_targets.
rules The full set of the target's rules with their new order — a list of { ulid, order } pairs, where order is ascending evaluation order.
idempotency_key optional Optional client-generated key for safely retrying this write without risk of applying it twice.

Required scope

targets:write

Errors

Errors — a missing or invalid token, insufficient scope, a resource that doesn't exist, a validation failure, rate limiting, or a missing write confirmation — come back as structured MCP tool errors, not raw HTTP failures, so your client can show something meaningful without special-casing status codes.

A validation error additionally carries a field-level map of what failed, so you can tell the assistant exactly which argument to fix.