Skip to main content
Glama
serviceFactory.ts727 B
import { GeminiService } from './gemini.js'; import { ImageService } from './imageService.js'; export interface GeminiImageServices { geminiService: GeminiService; imageService: ImageService; } class MissingEnvironmentError extends Error { constructor(variableName: string) { super(`${variableName} environment variable is required`); this.name = 'MissingEnvironmentError'; } } export function createGeminiImageServices(): GeminiImageServices { const apiKey = process.env.GOOGLE_API_KEY; if (!apiKey) { throw new MissingEnvironmentError('GOOGLE_API_KEY'); } return { geminiService: new GeminiService(apiKey), imageService: new ImageService(), }; } export { MissingEnvironmentError };

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/devexpert-io/gemini-image-mcp-server'

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