Skip to main content
Glama

Bucket Feature Flags MCP Server

Official
by reflagcom
edgeClient.ts916 B
import { ReflagClient } from "./client"; import { ClientOptions } from "./types"; export type EdgeClientOptions = Omit< ClientOptions, "cacheStrategy" | "flushIntervalMs" | "batchOptions" >; /** * The EdgeClient is ReflagClient pre-configured to be used in edge runtimes, like * Cloudflare Workers. * * @example * ```ts * // set the REFLAG_SECRET_KEY environment variable or pass the secret key in the constructor * const client = new EdgeClient(); * * // evaluate a flag * const context = { * user: { id: "user-id" }, * company: { id: "company-id" }, * } * const { isEnabled } = client.getFlag(context, "flag-key"); * * ``` */ export class EdgeClient extends ReflagClient { constructor(options: EdgeClientOptions = {}) { const opts = { ...options, cacheStrategy: "in-request" as const, batchOptions: { intervalMs: 0, }, }; super(opts); } }

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