Skip to main content
Glama
logger.ts1.26 kB
/** * Simple logger utility that wraps console methods * Avoids direct console usage which can interfere with MCP stdio */ export const logger = { // eslint-disable-next-line @typescript-eslint/no-explicit-any info: (message: string, ...args: any[]) => { process.stderr.write(`[INFO] ${message}\n`); if (args.length > 0) { process.stderr.write(`${JSON.stringify(args, null, 2)}\n`); } }, // eslint-disable-next-line @typescript-eslint/no-explicit-any error: (message: string, error?: any) => { process.stderr.write(`[ERROR] ${message}\n`); if (error) { process.stderr.write( `${error instanceof Error ? error.stack : JSON.stringify(error, null, 2)}\n` ); } }, // eslint-disable-next-line @typescript-eslint/no-explicit-any debug: (message: string, ...args: any[]) => { process.stderr.write(`[DEBUG] ${message}\n`); if (args.length > 0) { process.stderr.write(`${JSON.stringify(args, null, 2)}\n`); } }, // eslint-disable-next-line @typescript-eslint/no-explicit-any warn: (message: string, ...args: any[]) => { process.stderr.write(`[WARN] ${message}\n`); if (args.length > 0) { process.stderr.write(`${JSON.stringify(args, null, 2)}\n`); } }, };

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/gannonh/memento-mcp'

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