Skip to main content
Glama

mcp-confluent

Official
by confluentinc
helpers.ts•922 B
import env, { Environment } from "@src/env.js"; /** * Ensures a parameter exists either from the provided value or environment variable. Favor the provided param over the environment variable when truthy. * @param envVarName - The name of the environment variable to check * @param errorMessage - The error message to throw if neither parameter nor environment variable exists * @param param - Optional parameter value to use instead of environment variable * @returns The parameter value or environment variable value with its original type * @throws {Error} When neither parameter nor environment variable exists */ export const getEnsuredParam = <T extends Environment[keyof Environment]>( envVarName: keyof Environment, errorMessage: string, param?: T, ): T => { const finalParam = param || env[envVarName]; if (!finalParam) { throw new Error(`${errorMessage}`); } return finalParam as T; };

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/confluentinc/mcp-confluent'

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