AB Tasty MCP Server
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AB Tasty MCP Server get all feature flags for visitor user-123"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AB Tasty MCP Server
A Model Context Protocol (MCP) server that integrates AB Tasty's Feature Experimentation & Rollouts platform with AI assistants. This server provides tools for feature flag management, campaign retrieval, and guided SDK integration through the MCP protocol.
Features
Tools
Decision API Integration: Retrieve campaigns and feature flags for visitors
decision_api_get_campaigns: Get all campaigns for a visitor with contextdecision_api_get_campaign: Get a specific campaign by ID for a visitordecision_api_get_flags: Get all feature flags for a visitordecision_api_activate_campaign: Activate a campaign for a visitor
Resource Loader API: Extract and analyze campaign configurations (v0.2.0+)
resource_loader_api_load_webexp_resources: Load Web Experimentation & Personalization resources (use withwe_resource_extractorprompt)resource_loader_api_load_featexp_resources: Load Feature Experimentation & Rollout resources (use withfear_resource_extractorprompt)Note: In v0.2.0, the Resource Loader API was split into platform-specific tools for better clarity
Prompts
Quick Start Guides: Interactive prompts for AB Tasty SDK installation
Node.js SDK installation guide
Resource Extractors: AI-powered resource configuration generators
we_resource_extractor: Converts natural language campaign briefs into Web Experimentation resource configurationsfear_resource_extractor: Converts natural language campaign briefs into Feature Experimentation resource configurationsThese prompts generate the JSON needed for the Resource Loader API tools
Resources
Documentation: Access to AB Tasty Feature Experimentation & Rollout documentation directly through MCP
Related MCP server: LaunchDarkly MCP Server
Prerequisites
Node.js 18+
npm or yarn
AB Tasty credentials:
Environment ID
API Key
(Optional) Account ID and token for Resource Loader features for Web Experimentation
Installation
Clone the repository:
git clone https://github.com/flagship-io/mcp-server.git
cd mcp-serverInstall dependencies:
yarn installBuild the project:
yarn buildUsage
Using with npx (Recommended)
The easiest way to use the MCP server is through npx without any installation:
{
"mcpServers": {
"ABTasty": {
"command": "npx",
"args": [
"-y",
"@abtasty/mcp-server",
"--fear-env-id",
"YOUR_FEAR_ENV_ID",
"--fear-api-key",
"YOUR_FEAR_API_KEY",
"--resource-loader-fear-account-id",
"YOUR_FEAR_ACCOUNT_ID",
"--resource-loader-fear-account-environment-id",
"YOUR_FEAR_ACCOUNT_ENVIRONMENT_ID",
"--resource-loader-fear-rca-token",
"YOUR_FEAR_RCA_TOKEN",
"--resource-loader-we-account-id",
"YOUR_WE_ACCOUNT_ID",
"--resource-loader-we-token",
"YOUR_WE_TOKEN"
]
}
}
}Replace the placeholder values with your actual credentials:
YOUR_FEAR_ENV_ID: Your AB Tasty Feature Experimentation account environment IDYOUR_FEAR_API_KEY: Your AB Tasty Feature Experimentation API keyYOUR_FEAR_ACCOUNT_ID: Your AB Tasty Feature Experimentation Account IDYOUR_FEAR_ACCOUNT_ENVIRONMENT_ID: Your AB Tasty Feature Experimentation account Environment IDYOUR_FEAR_RCA_TOKEN: Your AB Tasty Feature Experimentation RCA TokenYOUR_WE_ACCOUNT_ID: Your AB Tasty Web Experimentation Account IDYOUR_WE_TOKEN: Your AB Tasty Web Experimentation token
Alternative: Environment Variables
You can also set credentials via environment variables instead of command-line arguments:
# Feature Experimentation & Rollout
export FEAR_ENV_ID="your_fear_env_id"
export FEAR_API_KEY="your_fear_api_key"
# Resource Loader - Feature Experimentation & Rollout
export RESOURCE_LOADER_FEAR_ACCOUNT_ID="your_fear_account_id"
export RESOURCE_LOADER_FEAR_ACCOUNT_ENVIRONMENT_ID="your_fear_account_environment_id"
export RESOURCE_LOADER_FEAR_RCA_TOKEN="your_fear_rca_token"
# Resource Loader - Web Experimentation & Personalization
export RESOURCE_LOADER_WE_ACCOUNT_ID="your_we_account_id"
export RESOURCE_LOADER_WE_TOKEN="your_we_token"Then use a simpler npx command:
{
"mcpServers": {
"ABTasty": {
"command": "npx",
"args": ["-y", "@abtasty/mcp-server"]
}
}
}Running the HTTP Server
Start the server on the default port (3000):
yarn startOr specify a custom port:
PORT=8080 yarn startThe server will be available at http://localhost:3000/mcp (or your custom port).
Configuration
The server accepts configuration through HTTP headers for each session:
Feature Experimentation & Rollout (FEAR) Headers:
x-fear-env-id: Your AB Tasty Feature Experimentation & Rollout environment IDx-fear-api-key: Your AB Tasty Feature Experimentation & Rollout API key
Resource Loader Headers (optional):
For Web Experimentation & Personalization:
x-resource-loader-we-account-id: Your AB Tasty Web Experimentation account IDx-resource-loader-we-token: Your Web Experimentation resource loader authentication token
For Feature Experimentation & Rollout:
x-resource-loader-fear-account-id: Your AB Tasty Feature Experimentation & Rollout account IDx-resource-loader-fear-account-environment-id: Your AB Tasty Feature Experimentation & Rollout environment IDx-resource-loader-fear-rca-token: Your Feature Experimentation & Rollout (Remote Control API) resource loader authentication token
Connecting with MCP Clients
The server supports two modes of operation:
1. Stdio Mode (for Claude Desktop and similar clients)
Use the npx command shown above for stdio-based MCP clients like Claude Desktop.
2. HTTP Mode (Streamable HTTP transport)
For HTTP-based clients, the server uses the Streamable HTTP transport protocol. Configure your MCP client to connect to the server endpoint:
{
"mcpServers": {
"ABTasty": {
"url": "http://localhost:3000/mcp",
"headers": {
"x-fear-env-id": "your_env_id",
"x-fear-api-key": "your_api_key"
}
}
}
}Example: Using Tools
Once connected through an MCP client, you can use the available tools:
Get campaigns for a visitor:
decision_api_get_campaigns({
visitor_id: "user123",
context: {
age: 25,
country: "US"
},
trigger_hit: true
});Get feature flags:
decision_api_get_flags({
visitor_id: "user123",
context: {
age: 25,
country: "US"
},
trigger_hit: false
});Create and load Web Experimentation resources:
Step 1: Use the we_resource_extractor prompt to convert your campaign brief into a resource configuration:
User: Create an A/B test on https://example.com/pricing.
Show a red button for 50% of traffic.
Prompt Output:
{
"needs_clarification": false,
"questions": [],
"resources": [
{
"type": "campaign",
"$_ref": "c1",
"action": "create",
"payload": {...}
}
]
}Step 2: Load the resources using the tool:
resource_loader_api_load_webexp_resources({
resourceLoaderContent: {
"needs_clarification": false,
"questions": [],
"resources": [...]
},
dryrun: false,
});Create and load Feature Experimentation resources:
Step 1: Use the fear_resource_extractor prompt to convert your campaign brief:
User: Create a feature flag 'new-checkout' for 25% of users
Prompt Output:
{
"version": 1,
"needs_clarification": false,
"questions": [],
"resources": [
{
"type": "project",
"$_ref": "p1",
"action": "create",
"payload": {...}
},
{
"type": "campaign",
"$_ref": "c1",
"action": "create",
"payload": {...}
}
]
}Step 2: Load the resources using the tool:
resource_loader_api_load_featexp_resources({
resourceLoaderContent: {
"version": 1,
"needs_clarification": false,
"questions": [],
"resources": [...]
},
dryrun: false,
});Development
Project Structure
├── src/
│ ├── index.ts # Main HTTP server entry point
│ ├── cli.ts # CLI entry point for stdio mode
│ ├── tools/ # MCP tool implementations
│ │ ├── decision-api.ts # Feature flag tools
│ │ └── resource-loader-api.ts
│ ├── prompts/ # Interactive prompt definitions
│ │ ├── quickstart-guide.ts
│ │ └── resource-loader-prompts.ts
│ └── resources/ # Resource providers
│ └── documentation.ts
├── helpers/ # Utility functions
│ ├── abtasty-fear.ts # AB Tasty Feature Experimentation SDK wrapper
│ └── resource-loader.ts # Campaign extraction utilities
├── types/ # TypeScript type definitions
├── assistant-prompts/ # Markdown prompt templates
└── build/ # Compiled outputDevelopment Scripts
# Generate prompt files
yarn generate:prompts
# Build the project
yarn build
# Build and run
yarn devBuilding from Source
The build process:
Generates TypeScript files from markdown prompts
Bundles the application with esbuild
Copies assistant prompt files to the build directory
yarn buildArchitecture
Session Management
The server maintains isolated sessions for each client connection:
Each session has its own credentials (provided via headers)
Sessions are identified by unique UUIDs
Sessions are cleaned up when connections close
Transport Layer
Uses the Streamable HTTP transport from the MCP SDK:
Supports JSON-RPC 2.0 over HTTP
Session-based connection management
Automatic session initialization and cleanup
Security Notes
Credentials are session-scoped and not shared between sessions
Always use HTTPS in production environments
Store credentials securely and never commit them to version control
API Documentation
Tools
decision_api_get_campaigns
Retrieves all campaigns for a visitor.
Parameters:
visitor_id(string): Unique visitor identifiercontext(object): Key-value pairs for targeting (optional)trigger_hit(boolean): Send analytics hit (default: false)
Returns: Array of campaigns with variations and modifications
decision_api_get_campaign
Retrieves a specific campaign by its ID for a visitor.
Parameters:
visitor_id(string): Unique visitor identifiercampaign_id(string): Campaign ID to retrievecontext(object): Key-value pairs for targeting (optional)trigger_hit(boolean): Send analytics hit (default: false)
Returns: Campaign with variation and modifications
decision_api_get_flags
Retrieves all feature flags for a visitor.
Parameters:
visitor_id(string): Unique visitor identifiercontext(object): Key-value pairs for targeting (optional)trigger_hit(boolean): Send analytics hit (default: false)
Returns: Object with flag keys and their values
decision_api_activate_campaign
Activates a campaign for a visitor.
Parameters:
visitor_id(string): Unique visitor identifiervariation_group_id(string): Variation group ID to activatevariation_id(string): Variation ID to activate
Returns: Activation confirmation
resource_loader_api_load_webexp_resources
Loads Web Experimentation & Personalization resources via the Resource Loader API.
Workflow: Use the we_resource_extractor prompt to generate the resourceLoaderContent from a natural language campaign brief, then pass it to this tool.
Parameters:
resourceLoaderContent(object): JSON containing resource loader content withneeds_clarification,questions, andresourcesarraydryrun(boolean): Whether to simulate the request without sending it
Returns: Loaded resources results
resource_loader_api_load_featexp_resources
Loads Feature Experimentation & Rollout resources via the Resource Loader API.
Workflow: Use the fear_resource_extractor prompt to generate the resourceLoaderContent from a natural language campaign brief, then pass it to this tool.
Parameters:
resourceLoaderContent(object): JSON containing resource loader content withversion,needs_clarification,questions, andresourcesarraydryrun(boolean): Whether to simulate the request without sending it
Returns: Loaded resources results
Troubleshooting
Server won't start
Check if port 3000 is already in use
Verify Node.js version (18+ required)
Ensure dependencies are installed:
yarn install
"Invalid credentials" errors
Verify your environment ID and API key are correct
Check that headers are properly set in your MCP client configuration
Ensure credentials have the necessary permissions in AB Tasty
License
Support
For issues related to:
This MCP server: Open an issue on GitHub
AB Tasty platform: Contact AB Tasty support
Resources
MCP protocol: See Model Context Protocol documentation
AB Tasty SDK: See AB Tasty SDK
Available Tools
7 toolscodebase_analyzer_analyzeAnalyze Codebase for Feature FlagsA
Scan a directory for feature flag usage across AB Tasty (Flagship SDK) and competitor platforms (LaunchDarkly, OpenFeature, Optimizely, Split, VWO). Returns detected flags with their keys, default values, types, and file locations.
Inputs: directory (required), platform, repository_url, repository_branch.
decision_api_activate_campaignActivate CampaignC
Activate a campaign by sending an activation hit for a visitor.
Inputs: visitor_id (required), variation_id (required), variation_group_id (required).
decision_api_get_campaignGet CampaignA
Get a specific campaign by its ID for a visitor with their context. Returns campaign variation and modifications.
Inputs: context (required), visitor_id (required), campaign_id (required), trigger_hit (required).
decision_api_get_campaignsGet CampaignsC
Get all campaigns (feature flags) for a visitor with their context. Returns campaign variations and modifications.
Inputs: context (required), visitor_id (required), trigger_hit (required).
decision_api_get_flagsGet FlagsB
Get all feature flags with their values and metadata for a visitor. Returns a simplified key-value format.
Inputs: context (required), visitor_id (required), trigger_hit (required).
resource_loader_api_load_featexp_resourcesLoad Feature Experimentation and Rollout ResourcesA
Load Feature experimentation resource loader content via the Resource Loader API. Returns the loaded resources results. IMPORTANT: You MUST use the 'fear_resource_extractor' prompt first to generate the resourceLoaderContent parameter from the user's campaign brief. Do NOT construct the JSON manually.
Inputs: dryrun (required), resourceLoaderContent (required).
resource_loader_api_load_webexp_resourcesLoad Web Experimentation & Personalization ResourcesA
Load Web experimentation resource loader content via the Resource Loader API. Returns the loaded resources results. IMPORTANT: You MUST use the 'we_resource_extractor' prompt first to generate the resourceLoaderContent parameter from the user's campaign brief. Do NOT construct the JSON manually.
Inputs: dryrun (required), resourceLoaderContent (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
The decision API read tools have meaningful overlap: get_campaigns returns campaigns/feature flags with context, while get_flags returns a simplified flag view. get_campaign is distinct by ID, but an agent could easily hesitate between the campaign-list and flag-list tools when looking for flag values.
All tool names use snake_case with module-style prefixes and verb-like operation names, which is mostly predictable. The prefixes are long and slightly uneven in style (decision_api_*, resource_loader_api_*, codebase_analyzer_analyze), but the overall convention is coherent.
Seven tools is a well-scoped set for this server’s apparent purpose: decision/flag retrieval, campaign activation, resource loading, and codebase analysis. Each tool appears to earn its place without excessive surface area.
The surface covers the main read/decision paths, activation, resource loading for both web and feature experimentation, and codebase flag analysis. Minor lifecycle gaps exist, such as broader event/tracking operations or campaign management, but the core MCP workflows appear covered.
Maintenance
Related MCP Connectors
Run A/B experiments through your AI assistant. SDKs for Ruby, Python, JS, Node, React Native, Go.
Manage ConfigDirector feature flags, remote configs, and targeting rules from AI assistants.
Create AI images and videos, manage projects and credits, and use workspace campaign context.
Evaluate and inspect your Hypertune feature flags from your AI assistant.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Statsig's feature management and experimentation platform, allowing them to check feature flags, retrieve configurations, get experiment assignments, and log events.MIT
- AlicenseNot gradedqualityBmaintenanceEnables interaction with LaunchDarkly's feature flag platform through AI clients. Supports managing feature flags, AI configs, and their variations with operations like create, update, delete, and targeting configuration.133,036 npm27MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to connect to an Octopus instance to inspect, query, and diagnose deployments, and optionally create releases, deploy releases, run runbooks, and adjust feature toggles.547 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to inspect, query, and diagnose an Octopus instance and, when write access is enabled, create releases, deploy releases, run runbooks, and adjust feature toggles.547 npmMIT