Skip to main content
Glama

WAHA MCP Server

by seejux
config.ts1.11 kB
import dotenv from "dotenv"; // Load environment variables from .env file dotenv.config(); export interface WAHAConfig { wahaBaseUrl: string; wahaApiKey: string; wahaSession: string; } /** * Validate and load configuration from environment variables */ function loadConfig(): WAHAConfig { const wahaBaseUrl = process.env.WAHA_BASE_URL; const wahaApiKey = process.env.WAHA_API_KEY; const wahaSession = process.env.WAHA_SESSION || "default"; // Validate required configuration if (!wahaBaseUrl) { throw new Error( "WAHA_BASE_URL environment variable is required. Please set it in .env file or environment." ); } if (!wahaApiKey) { throw new Error( "WAHA_API_KEY environment variable is required. Please set it in .env file or environment." ); } // Ensure base URL doesn't end with a slash const normalizedBaseUrl = wahaBaseUrl.endsWith("/") ? wahaBaseUrl.slice(0, -1) : wahaBaseUrl; return { wahaBaseUrl: normalizedBaseUrl, wahaApiKey, wahaSession, }; } // Export the configuration singleton export const config = loadConfig();

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/seejux/waha-mcp'

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