Skip to content

Commit 8a1470a

Browse files
authored
chore: add docs on MCP server (#305)
Signed-off-by: Mark Phelps <[email protected]>
1 parent b2837fc commit 8a1470a

File tree

4 files changed

+174
-1
lines changed

4 files changed

+174
-1
lines changed

docs/integration/mcp-server.mdx

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Model Context Protocol (MCP) Server
3+
description: Use Flipt's MCP server to enable AI assistants to interact with your feature flags
4+
---
5+
6+
## Overview
7+
8+
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). Think of MCP like a USB-C port for AI applications - it provides a standardized way to connect AI models to different data sources and tools.
9+
10+
Flipt's MCP server allows AI assistants and LLMs to directly interact with your feature flags, segments, and evaluations through a standardized interface. This enables powerful AI-driven workflows and integrations with tools that support the MCP protocol.
11+
12+
## Use Cases
13+
14+
### AI-Enabled IDEs
15+
16+
When using AI-enabled IDEs like Cursor that support MCP, your AI assistant can:
17+
18+
- Check feature flag states while reviewing code
19+
- Help toggle features on/off during development
20+
- Assist in creating and managing feature flags
21+
- Evaluate flags for specific users/entities
22+
- Help debug feature flag logic and rules
23+
24+
For example, you could ask your AI assistant:
25+
26+
- "What's the current state of the 'dark-mode' flag?"
27+
- "Enable the 'beta-features' flag for all users in the 'internal' segment"
28+
- "Create a new feature flag for our upcoming notification system"
29+
30+
### AI Agents and Workflows
31+
32+
The Flipt MCP server can be integrated into broader AI agent workflows to:
33+
34+
- Automate feature flag management based on system metrics
35+
- Coordinate feature rollouts across multiple services
36+
- Generate reports on feature usage and impact
37+
- Manage complex feature flag rules and segments
38+
39+
## Getting Started
40+
41+
### Installation
42+
43+
You can run the Flipt MCP server using npm:
44+
45+
```bash
46+
npm install -g @flipt-io/mcp-server-flipt
47+
mcp-server-flipt
48+
```
49+
50+
Or using Docker:
51+
52+
```bash
53+
docker run -d --name mcp-server-flipt ghcr.io/flipt-io/mcp-server-flipt:latest
54+
```
55+
56+
### Configuration
57+
58+
The server can be configured using environment variables:
59+
60+
```bash
61+
# The URL of your Flipt instance
62+
FLIPT_API_URL=http://localhost:8080
63+
64+
# Optional API key for authentication
65+
FLIPT_API_KEY=<your-api-key>
66+
```
67+
68+
## Available Operations
69+
70+
The Flipt MCP server provides tools for:
71+
72+
- **Namespace Management**: Create, list, update, and delete namespaces
73+
- **Flag Operations**: Create, toggle, and manage feature flags
74+
- **Segment Management**: Define and update user segments
75+
- **Flag Evaluation**: Evaluate flags for specific entities
76+
- **Constraints & Rules**: Manage targeting rules and constraints
77+
- **Variants & Distributions**: Configure feature variants and rollout distributions
78+
79+
## Example Integration
80+
81+
Here's an example of how to use the Flipt MCP server with an AI assistant in Cursor:
82+
83+
1. Start the Flipt MCP server
84+
2. Configure Cursor to use the MCP server
85+
3. Ask your AI assistant questions about your feature flags:

images/tooling/mcp.png

1.6 MB
Loading

mint.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@
240240
},
241241
{
242242
"group": "Tooling",
243-
"pages": ["tooling/github-actions"]
243+
"pages": [
244+
"tooling/github-actions",
245+
"tooling/model-context-protocol"
246+
]
244247
},
245248
{
246249
"group": "Overview",

tooling/model-context-protocol.mdx

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Model Context Protocol (MCP)
3+
description: Use Flipt's MCP server to enable AI assistants to interact with your feature flags
4+
---
5+
6+
## Overview
7+
8+
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). Think of MCP like a USB-C port for AI applications - it provides a standardized way to connect AI models to different data sources and tools.
9+
10+
[Flipt's MCP server](https://github.com/flipt-io/mcp-server-flipt) allows AI assistants and LLMs to directly interact with your feature flags, segments, and evaluations through a standardized interface. This enables powerful AI-driven workflows and integrations with tools that support the MCP protocol.
11+
12+
![MCP Server](/images/tooling/mcp.png)
13+
14+
## Use Cases
15+
16+
### AI-Enabled IDEs
17+
18+
When using AI-enabled IDEs like Cursor that support MCP, your AI assistant can:
19+
20+
- Check feature flag states while reviewing code
21+
- Help toggle features on/off during development
22+
- Assist in creating and managing feature flags
23+
- Evaluate flags for specific users/entities
24+
- Help debug feature flag logic and rules
25+
26+
For example, you could ask your AI assistant:
27+
28+
- "What's the current state of the 'dark-mode' flag?"
29+
- "Enable the 'beta-features' flag for all users in the 'internal' segment"
30+
- "Create a new feature flag for our upcoming notification system"
31+
32+
### AI Agents and Workflows
33+
34+
The Flipt MCP server can be integrated into broader AI agent workflows to:
35+
36+
- Automate feature flag management based on system metrics
37+
- Coordinate feature rollouts across multiple services
38+
- Generate reports on feature usage and impact
39+
- Manage complex feature flag rules and segments
40+
41+
## Getting Started
42+
43+
Check out the [Flipt MCP server repository](https://github.com/flipt-io/mcp-server-flipt) for the most up to date information on how to use the MCP server.
44+
45+
### Cursor
46+
47+
To use the Flipt MCP server with Cursor, you need to configure Cursor to use the MCP server.
48+
49+
The Cursor docs have a [guide on how to configure Cursor](https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers) to use a MCP server.
50+
51+
For Flipt, you can use the following configuration:
52+
53+
```json
54+
{
55+
"mcpServers": {
56+
"flipt": {
57+
"command": "npx",
58+
"args": ["-y", "@flipt-io/mcp-server-flipt"]
59+
}
60+
}
61+
}
62+
```
63+
64+
### Configuration
65+
66+
The server can be configured using environment variables:
67+
68+
```bash
69+
# The URL of your Flipt instance
70+
FLIPT_API_URL=http://localhost:8080
71+
72+
# Optional API key for authentication
73+
FLIPT_API_KEY=<your-api-key>
74+
```
75+
76+
## Available Operations
77+
78+
The Flipt MCP server provides tools for:
79+
80+
- **Namespace Management**: Create, list, update, and delete namespaces
81+
- **Flag Operations**: Create, toggle, and manage feature flags
82+
- **Segment Management**: Define and update user segments
83+
- **Flag Evaluation**: Evaluate flags for specific entities
84+
- **Constraints & Rules**: Manage targeting rules and constraints
85+
- **Variants & Distributions**: Configure feature variants and rollout distributions

0 commit comments

Comments
 (0)