Skip to main content
Glama

Unleash MCP (Feature Toggle)

disable-feature-flag.ts960 B
import { client } from './unleash-client.js'; import { logger } from '../logger.js'; /** * Disable a feature flag in the specified environment * * @param projectId - The ID of the project containing the feature * @param featureName - The name of the feature to disable * @param environment - The environment in which to disable the feature * @returns The response from the Unleash API */ export async function disableFeatureFlag( projectId: string, featureName: string, environment: string ) { try { const endpoint = `/api/admin/projects/${projectId}/features/${featureName}/environments/${environment}/off`; const response = await client.post(endpoint); logger.info(`Successfully disabled feature flag '${featureName}' in environment '${environment}'`); return response.data; } catch (error) { logger.error(`Error disabling feature flag '${featureName}' in environment '${environment}':`, error); throw error; } }

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/cuongtl1992/unleash-mcp'

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