Skip to main content
Glama
reflagcom

Bucket Feature Flags MCP Server

Official
by reflagcom
Context.tsx1.25 kB
"use client"; import { OpenFeature } from "@openfeature/react-sdk"; import React from "react"; const initialContext = { trackingKey: "user42", companyName: "Acme Inc.", companyPlan: "enterprise", companyId: "company42", }; export const Context = () => { const [context, setContext] = React.useState<any>( JSON.stringify(initialContext, null, 2), ); let validJson = true; try { validJson = JSON.parse(context); } catch (e) { validJson = false; } return ( <div className="flex flex-col border border-gray-300 p-6 rounded-xl size-full dark:border-neutral-800 dark:bg-zinc-800/30"> <h3 className="text-xl mb-4">Context:</h3> <textarea className="min-h-[200px]" value={context} onChange={(e) => setContext(e.target.value)} ></textarea> <button disabled={!validJson} className="border-solid m-auto max-w-60 border-2 border-indigo-600 rounded-lg p-2 mt-4 disabled:opacity-50" onClick={() => OpenFeature.setContext(JSON.parse(context))} > Update Context </button> <span className="text-gray-600"> Open the developer console to see what happens when you update the context. </span> </div> ); };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/reflagcom/bucket-javascript-sdk'

If you have feedback or need assistance with the MCP directory API, please join our Discord server