Skip to main content
Glama

Exa MCP Server

by joerup
config.ts1.08 kB
import { z } from 'zod'; /** * Configuration schema for Exa MCP Server */ const configSchema = z.object({ apiKey: z.string(), port: z.number().default(3000), enabledTools: z.array(z.string()).optional(), debug: z.boolean().default(false) }); /** * Load and validate configuration from environment variables * @returns Validated configuration object */ export function loadConfig() { // Try to load from environment variables const config = { apiKey: process.env.EXA_API_KEY || '', port: process.env.PORT ? parseInt(process.env.PORT, 10) : 3000, enabledTools: process.env.ENABLED_TOOLS?.split(',').map(s => s.trim()), debug: process.env.DEBUG === 'true' }; // Validate configuration try { return configSchema.parse(config); } catch (error) { if (!config.apiKey) { console.error('ERROR: EXA_API_KEY environment variable is required'); console.error('Please set it in your .env file or environment'); process.exit(1); } throw error; } }

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/joerup/exa-mcp'

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