Skip to main content
Glama
config.ts938 B
import dotenv from 'dotenv'; dotenv.config(); export interface Config { tududuApiUrl: string; tududuApiKey?: string; tududuEmail?: string; tududuPassword?: string; logLevel: string; } export function getConfig(): Config { const tududuApiUrl = process.env.TUDUDI_API_URL; const tududuApiKey = process.env.TUDUDI_API_KEY; const tududuEmail = process.env.TUDUDI_EMAIL; const tududuPassword = process.env.TUDUDI_PASSWORD; if (!tududuApiUrl) { throw new Error('TUDUDI_API_URL environment variable is required'); } // Support either API key OR email/password authentication if (!tududuApiKey && (!tududuEmail || !tududuPassword)) { throw new Error( 'Either TUDUDI_API_KEY or both TUDUDI_EMAIL and TUDUDI_PASSWORD environment variables are required' ); } return { tududuApiUrl, tududuApiKey, tududuEmail, tududuPassword, logLevel: process.env.LOG_LEVEL || 'info', }; }

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/jerrytunin/tududi-mcp'

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