Skip to content

Commit 7bdf1c6

Browse files
docs: MCP / Prompt install buttons in SDK quick-start (#1287)
This PR introduces a new interactive component that helps developers quickly install OpenFeature using AI assistants with prompts / MCP install instructions: <img width="1654" height="695" alt="image" src="https://github.com/user-attachments/assets/6aa9d2fb-5ad4-4017-8d9e-6f724f4f8f35" /> <img width="1658" height="903" alt="image" src="https://github.com/user-attachments/assets/525a1026-7848-4a74-abc3-70ddf9569095" /> ### Changes **New Component (`src/partials/mcp-install.tsx`)** - Dynamic prompt fetching from [open-feature/mcp](https://github.com/open-feature/mcp/tree/main/prompts) repository - SDK-specific installation instructions cached at runtime - One-click copy button with loading/success/error states - Quick install links for Cursor and VS Code **Automated Integration (`scripts/process-sdk-readmes.ts`)** - Added SDK name → MCP technology mapping - Automatically injects MCPInstall component after "Quick start" heading - Applied to all matching SDK documentation pages during build --------- Signed-off-by: Jonathan Norris <[email protected]>
1 parent f438823 commit 7bdf1c6

File tree

19 files changed

+422
-49
lines changed

19 files changed

+422
-49
lines changed

docs/reference/other-technologies/mcp.mdx

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ Then configure your AI assistant to use the global installation:
5454

5555
### Cursor
5656

57-
Navigate to `Cursor Settings` -> `Tools & MCP` -> `New MCP Server`.
58-
Add to `~/.cursor/mcp_settings.json`:
57+
<a href="cursor://anysphere.cursor-deeplink/mcp/install?name=OpenFeature&config=eyJjb21tYW5kIjogIm5weCIsICJhcmdzIjogWyIteSIsICJAb3BlbmZlYXR1cmUvbWNwIl19Cg==" class="mcp-install-button" target="_blank" rel="noopener noreferrer">📦 Install in Cursor</a>
58+
59+
To open Cursor and automatically add the OpenFeature MCP, click the install button above.
60+
61+
Alternatively, navigate to `Cursor Settings` -> `Tools & MCP` -> `New MCP Server` and add to `~/.cursor/mcp_settings.json`:
5962

6063
```json
6164
{
@@ -70,7 +73,11 @@ Add to `~/.cursor/mcp_settings.json`:
7073

7174
### VS Code
7275

73-
Add to `.continue/config.json`:
76+
<a href="https://vscode.dev/redirect/mcp/install?name=OpenFeature&config=%7B%22command%22%3A%20%22npx%22%2C%20%22args%22%3A%20%5B%22-y%22%2C%20%22%40openfeature%2Fmcp%22%5D%7D" class="mcp-install-button" target="_blank" rel="noopener noreferrer">📦 Install in VS Code</a>
77+
78+
To open VS Code and automatically add the OpenFeature MCP, click the install button above.
79+
80+
Alternatively, add to `.continue/config.json`:
7481

7582
```json
7683
{
@@ -108,6 +115,35 @@ In the `Manage MCP servers` raw config, add:
108115
}
109116
```
110117

118+
### Codex CLI
119+
120+
Edit `~/.codex/config.toml`:
121+
122+
```toml
123+
[mcp_servers.openfeature]
124+
command = "npx"
125+
args = ["-y", "@openfeature/mcp"]
126+
```
127+
128+
Restart Codex CLI after saving.
129+
130+
### Gemini CLI
131+
132+
Edit `~/.gemini/settings.json`:
133+
134+
```json
135+
{
136+
"mcpServers": {
137+
"OpenFeature": {
138+
"command": "npx",
139+
"args": ["-y", "@openfeature/mcp"]
140+
}
141+
}
142+
}
143+
```
144+
145+
Restart Gemini CLI after saving.
146+
111147
### Claude Desktop
112148

113149
Edit your Claude Desktop config at:

docs/reference/sdks/client/kotlin.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ This content has been automatically generated from kotlin-sdk.
1010
Edits should be made here: https://github.com/open-feature/kotlin-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 27 2025 14:02:00 GMT-0400 (Eastern Daylight Time)
13+
Last updated at Tue Oct 28 2025 11:19:13 GMT-0400 (Eastern Daylight Time)
1414
-->
15+
import MCPInstall from '@site/src/partials/mcp-install';
16+
1517

1618
<p align="center" class="github-badges">
1719
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
@@ -31,6 +33,9 @@ Last updated at Mon Oct 27 2025 14:02:00 GMT-0400 (Eastern Daylight Time)
3133

3234
## Quick start
3335

36+
<MCPInstall sdkTechnology="kotlin" />
37+
38+
3439
### Requirements
3540

3641
The following [Kotlin Multiplatform Targets](https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-dsl-reference.html#targets) are supported:

docs/reference/sdks/client/swift.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ This content has been automatically generated from swift-sdk.
1010
Edits should be made here: https://github.com/open-feature/swift-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 27 2025 14:02:00 GMT-0400 (Eastern Daylight Time)
13+
Last updated at Tue Oct 28 2025 11:19:13 GMT-0400 (Eastern Daylight Time)
1414
-->
15+
import MCPInstall from '@site/src/partials/mcp-install';
16+
1517

1618
<p align="center" class="github-badges">
1719

@@ -31,6 +33,9 @@ Last updated at Mon Oct 27 2025 14:02:00 GMT-0400 (Eastern Daylight Time)
3133

3234
## Quick start
3335

36+
<MCPInstall sdkTechnology="swift" />
37+
38+
3439
### Requirements
3540

3641
This SDK supports the following Apple platforms:

docs/reference/sdks/client/web/angular.mdx

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 27 2025 14:02:00 GMT-0400 (Eastern Daylight Time)
13+
Last updated at Tue Oct 28 2025 11:19:13 GMT-0400 (Eastern Daylight Time)
1414
-->
1515

1616
<p align="center" class="github-badges">
@@ -40,22 +40,30 @@ In addition to the features provided by the [web sdk](/docs/reference/sdks/clien
4040

4141
- [Overview](#overview)
4242
- [Quick start](#quick-start)
43-
- [Requirements](#requirements)
44-
- [Install](#install)
45-
- [npm](#npm)
46-
- [yarn](#yarn)
47-
- [Required peer dependencies](#required-peer-dependencies)
48-
- [Usage](#usage)
49-
- [Module](#module)
50-
- [Minimal Example](#minimal-example)
51-
- [How to use](#how-to-use)
52-
- [Boolean Feature Flag](#boolean-feature-flag)
53-
- [Number Feature Flag](#number-feature-flag)
54-
- [String Feature Flag](#string-feature-flag)
55-
- [Object Feature Flag](#object-feature-flag)
56-
- [Opting-out of automatic re-rendering](#opting-out-of-automatic-re-rendering)
57-
- [Consuming the evaluation details](#consuming-the-evaluation-details)
58-
- [Setting Evaluation Context](#setting-evaluation-context)
43+
- [Requirements](#requirements)
44+
- [Install](#install)
45+
- [npm](#npm)
46+
- [yarn](#yarn)
47+
- [Required peer dependencies](#required-peer-dependencies)
48+
- [Usage](#usage)
49+
- [Module](#module)
50+
- [Minimal Example](#minimal-example)
51+
- [How to use](#how-to-use)
52+
- [Structural Directives](#structural-directives)
53+
- [Boolean Feature Flag](#boolean-feature-flag)
54+
- [Number Feature Flag](#number-feature-flag)
55+
- [String Feature Flag](#string-feature-flag)
56+
- [Object Feature Flag](#object-feature-flag)
57+
- [Opting-out of automatic re-rendering](#opting-out-of-automatic-re-rendering)
58+
- [Consuming the evaluation details](#consuming-the-evaluation-details)
59+
- [FeatureFlagService](#featureflagservice)
60+
- [Using with Observables](#using-with-observables)
61+
- [Using with Angular Signals](#using-with-angular-signals)
62+
- [Service Options](#service-options)
63+
- [Setting evaluation context](#setting-evaluation-context)
64+
- [Using a static object](#using-a-static-object)
65+
- [Using a factory function](#using-a-factory-function)
66+
- [Observability considerations](#observability-considerations)
5967
- [FAQ and troubleshooting](#faq-and-troubleshooting)
6068
- [Resources](#resources)
6169

@@ -422,6 +430,12 @@ const contextFactory = (): EvaluationContext => loadContextFromLocalStorage();
422430
export class AppModule {}
423431
```
424432

433+
##### Observability considerations
434+
435+
Angular's lifecycle can result in flags being evaluated multiple times as a user interacts with a page.
436+
If you are using an OpenFeature hook for telemetry, this can result in inflated evaluation metrics.
437+
The [OpenFeature debounce hook](https://github.com/open-feature/js-sdk-contrib/tree/main/libs/hooks/debounce) can help to reduce the amount of redundant evaluations reported to your observability platform by limiting the frequency at which evaluation metrics are reported.
438+
425439
## FAQ and troubleshooting
426440

427441
> I can import things form the `@openfeature/angular-sdk`, `@openfeature/web-sdk`, and `@openfeature/core`; which should I use?

docs/reference/sdks/client/web/index.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 27 2025 14:02:00 GMT-0400 (Eastern Daylight Time)
13+
Last updated at Tue Oct 28 2025 11:19:13 GMT-0400 (Eastern Daylight Time)
1414
-->
15+
import MCPInstall from '@site/src/partials/mcp-install';
16+
1517

1618
<p align="center" class="github-badges">
1719
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
@@ -39,6 +41,9 @@ Last updated at Mon Oct 27 2025 14:02:00 GMT-0400 (Eastern Daylight Time)
3941

4042
## Quick start
4143

44+
<MCPInstall sdkTechnology="javascript" />
45+
46+
4247
### Requirements
4348

4449
- ES2015-compatible web browser (Chrome, Edge, Firefox, etc)

docs/reference/sdks/client/web/react.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 27 2025 14:02:00 GMT-0400 (Eastern Daylight Time)
13+
Last updated at Tue Oct 28 2025 11:19:13 GMT-0400 (Eastern Daylight Time)
1414
-->
15+
import MCPInstall from '@site/src/partials/mcp-install';
16+
1517

1618
<p align="center" class="github-badges">
1719
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
@@ -52,12 +54,16 @@ In addition to the feature provided by the [web sdk](/docs/reference/sdks/client
5254
- [Re-rendering with Flag Configuration Changes](#re-rendering-with-flag-configuration-changes)
5355
- [Suspense Support](#suspense-support)
5456
- [Tracking](#tracking)
57+
- [Observability Considerations](#observability-considerations)
5558
- [Testing](#testing)
5659
- [FAQ and troubleshooting](#faq-and-troubleshooting)
5760
- [Resources](#resources)
5861

5962
## Quick start
6063

64+
<MCPInstall sdkTechnology="react" />
65+
66+
6167
### Requirements
6268

6369
- ES2015-compatible web browser (Chrome, Edge, Firefox, etc)
@@ -300,6 +306,12 @@ function MyComponent() {
300306
}
301307
```
302308

309+
#### Observability Considerations
310+
311+
React's lifecycle can result in flags being evaluated multiple times as a user interacts with a page.
312+
If you are using an OpenFeature hook for telemetry, this can result in inflated evaluation metrics.
313+
The [OpenFeature debounce hook](https://github.com/open-feature/js-sdk-contrib/tree/main/libs/hooks/debounce) can help to reduce the amount of redundant evaluations reported to your observability platform by limiting the frequency at which evaluation metrics are reported.
314+
303315
### Testing
304316

305317
The React SDK includes a built-in context provider for testing.

docs/reference/sdks/server/dart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This content has been automatically generated from dart-server-sdk.
99
Edits should be made here: https://github.com/open-feature/dart-server-sdk
1010
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1111

12-
Last updated at Mon Oct 27 2025 14:02:00 GMT-0400 (Eastern Daylight Time)
12+
Last updated at Tue Oct 28 2025 11:19:13 GMT-0400 (Eastern Daylight Time)
1313
-->
1414

1515
<p align="center" class="github-badges">

docs/reference/sdks/server/dotnet.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ This content has been automatically generated from dotnet-sdk.
1010
Edits should be made here: https://github.com/open-feature/dotnet-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 27 2025 14:01:59 GMT-0400 (Eastern Daylight Time)
13+
Last updated at Tue Oct 28 2025 11:19:13 GMT-0400 (Eastern Daylight Time)
1414
-->
15+
import MCPInstall from '@site/src/partials/mcp-install';
16+
1517

1618
[![Specification](https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge)](https://github.com/open-feature/spec/releases/tag/v0.8.0)
1719
[
@@ -25,6 +27,9 @@ Last updated at Mon Oct 27 2025 14:01:59 GMT-0400 (Eastern Daylight Time)
2527

2628
## Quick start
2729

30+
<MCPInstall sdkTechnology="dotnet" />
31+
32+
2833
### Requirements
2934

3035
- .NET 8+

docs/reference/sdks/server/go.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ This content has been automatically generated from go-sdk.
99
Edits should be made here: https://github.com/open-feature/go-sdk
1010
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1111

12-
Last updated at Mon Oct 27 2025 14:01:59 GMT-0400 (Eastern Daylight Time)
12+
Last updated at Tue Oct 28 2025 11:19:13 GMT-0400 (Eastern Daylight Time)
1313
-->
14+
import MCPInstall from '@site/src/partials/mcp-install';
15+
1416

1517
<p align="center" class="github-badges">
1618
<a href="https://github.com/open-feature/spec/releases/tag/v0.7.0">
@@ -38,6 +40,9 @@ Last updated at Mon Oct 27 2025 14:01:59 GMT-0400 (Eastern Daylight Time)
3840

3941
## Quick start
4042

43+
<MCPInstall sdkTechnology="go" />
44+
45+
4146
### Requirements
4247

4348
Go language version: [1.24](https://go.dev/doc/devel/release#go1.24.0)

docs/reference/sdks/server/java.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ This content has been automatically generated from java-sdk.
99
Edits should be made here: https://github.com/open-feature/java-sdk
1010
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1111

12-
Last updated at Mon Oct 27 2025 14:01:59 GMT-0400 (Eastern Daylight Time)
12+
Last updated at Tue Oct 28 2025 11:19:12 GMT-0400 (Eastern Daylight Time)
1313
-->
14+
import MCPInstall from '@site/src/partials/mcp-install';
15+
1416

1517
<p align="center" class="github-badges">
1618
<a href="https://github.com/open-feature/spec/releases/tag/v0.7.0">
@@ -40,6 +42,9 @@ Last updated at Mon Oct 27 2025 14:01:59 GMT-0400 (Eastern Daylight Time)
4042

4143
## Quick start
4244

45+
<MCPInstall sdkTechnology="java" />
46+
47+
4348
### Requirements
4449

4550
- Java 11+ (compiler target is 11)

0 commit comments

Comments
 (0)