Skip to content

Commit 83877b3

Browse files
Feature Flag MCP Server Guide [DOCS-12083] (#31677)
* Set up basic framework * Add to All Guides page + revamp Software Delivery section, add other products' guides * Configure site support US1-FED not supported * Add Preview callout and signup link also add description frontmatter * Update migrate_from_statsig.md Adding content for migration guide to Eppo core * Create feature_flag_mcp_server.md * update commands * Guides page: add link to MCP server page * edits and additions - edits for general style - add Further Reading * reorg page into main Feature Flags nav section --------- Co-authored-by: Joe Peeples <joe.peeples@datadoghq.com>
1 parent 4480730 commit 83877b3

File tree

3 files changed

+122
-1
lines changed

3 files changed

+122
-1
lines changed

config/_default/menus/main.en.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5481,11 +5481,16 @@ menu:
54815481
parent: software_delivery_heading
54825482
identifier: feature_flags
54835483
weight: 80000
5484+
- name: MCP Server
5485+
url: feature_flags/feature_flag_mcp_server
5486+
parent: feature_flags
5487+
identifier: feature_flags_mcp_server
5488+
weight: 8
54845489
- name: Guides
54855490
url: feature_flags/guide
54865491
parent: feature_flags
54875492
identifier: feature_flags_guide
5488-
weight: 1
5493+
weight: 9
54895494
- name: Observability Pipelines
54905495
url: observability_pipelines/
54915496
pre: pipelines
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
title: Feature Flags MCP Server
3+
description: "Learn how to use the Feature Flags toolset in the Datadog MCP Server"
4+
further_reading:
5+
- link: "getting_started/feature_flags"
6+
tag: "Documentation"
7+
text: "Getting Started with Feature Flags"
8+
- link: "bits_ai/mcp_server"
9+
tag: "Documentation"
10+
text: "Datadog MCP Server"
11+
---
12+
13+
{{< callout url="http://datadoghq.com/product-preview/feature-flags/" >}}
14+
Feature Flags are in Preview. Complete the form to request access.
15+
{{< /callout >}}
16+
17+
## Overview
18+
19+
The Datadog MCP Server uses the Model Context Protocol (MCP) to provide AI agents with access to [Feature Flags][1] management capabilities, including flag creation, configuration, and React/JavaScript integration guidance.
20+
21+
## Setup
22+
23+
The following configurations give your AI agent access to the Feature Flags toolset in the Datadog MCP Server. You must restart your agent after performing this setup.
24+
25+
For all clients, install the MCP Server binary:
26+
27+
```bash
28+
curl -sSL https://coterm.datadoghq.com/mcp-cli/install.sh | bash
29+
```
30+
31+
Then follow the instructions below to add the MCP Server to your specific client.
32+
33+
### Claude Code
34+
35+
```bash
36+
claude mcp add datadog -- ~/.local/bin/datadog_mcp_cli --endpoint-path /api/unstable/mcp-server/mcp?toolsets=feature-flags
37+
```
38+
39+
### Cursor
40+
Add this to `~/.cursor/mcp.json` (remember to save the file):
41+
42+
```json
43+
{
44+
"mcpServers": {
45+
"datadog-ff": {
46+
"type": "stdio",
47+
"command": "~/.local/bin/datadog_mcp_cli --endpoint-path /api/unstable/mcp-server/mcp?toolsets=feature-flags",
48+
"args": [],
49+
"env": {}
50+
}
51+
}
52+
}
53+
```
54+
55+
## Use cases
56+
57+
The MCP Server includes tools to help you manage feature flags in your codebase. The following use cases provide sample prompts for using the tools.
58+
59+
<div class="alert alert-info">
60+
The MCP Server only supports React applications.
61+
</div>
62+
63+
### Create feature flags
64+
65+
Use the `create-feature-flag` tool to create feature flags. You do not need to specify the tool name in the prompt, but it can provide more consistent results.
66+
The MCP Server has access to Datadog's documentation and uses it to implement the flag in your codebase.
67+
68+
If you do not yet have feature flags implemented, mention in the prompt that you want to implement Datadog feature flags.
69+
70+
Example prompts:
71+
- Use the `create-feature-flag` tool to create a flag to control the title on the main page.
72+
- I want to show a confirmation modal when `<SOME_EVENT>` happens. Use a Datadog feature flag to control whether the confirmation modal is shown.
73+
74+
### Check feature flag implementation
75+
76+
Use the `check-flag-implementation` tool to check if a feature flag is implemented correctly.
77+
78+
The tool checks that the flag is being referenced as the correct value type, is passing the correct subject attributes, and is providing the correct default value that agrees with the default in production environments.
79+
80+
Example prompts:
81+
- Check if the `show-confirmation-modal` flag is implemented correctly.
82+
- Check if all feature flags in `/some/directory` are implemented correctly.
83+
84+
**Note**: This may not find all issues. Checking flags individually is more reliable.
85+
86+
This tool can also be used to add feature flags created in the UI to your codebase. For example:
87+
88+
- Use the `show-confirmation-modal` flag to control whether the confirmation modal is shown when `<SOME_EVENT>` happens.
89+
90+
### List feature flags
91+
92+
Use the `list-feature-flags` tool to list all feature flags. For example:
93+
94+
- List all feature flags.
95+
96+
### List environments
97+
98+
Use the `list-environments` tool to list all environments. For example:
99+
100+
- List my flagging environments.
101+
102+
### Update feature flag environments
103+
Use the `update-feature-flag-environment` tool to update a feature flag environment. This tool can control the default variants, and enable or disable the flag.
104+
It cannot modify flags in production environments.
105+
106+
Example prompts:
107+
108+
- I want `show-confirmation-modal` to serve true in development.
109+
- Disable `show-confirmation-modal` in staging.
110+
111+
## Further reading
112+
113+
{{< partial name="whats-next/whats-next.html" >}}
114+
115+
[1]: /feature_flags/

content/en/feature_flags/guide/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ Feature Flags are in Preview. Complete the form to request access.
1515
{{< /callout >}}
1616

1717
{{< whatsnext desc="Feature Flags Guides:" >}}
18+
{{< nextlink href="/getting_started/feature_flags" >}}Getting started with Feature Flags{{< /nextlink >}}
1819
{{< nextlink href="/feature_flags/guide/migrate_from_statsig" >}}Migrate Your Feature Flags from Statsig{{< /nextlink >}}
1920
{{< /whatsnext >}}

0 commit comments

Comments
 (0)