Skip to main content
Glama
index.ts908 B
#!/usr/bin/env node import { main } from './main/index.js'; import logger, { initLogger } from './utils/logger.js'; // Check for --console flag early (before full CLI parsing) // This redirects logs to console instead of log files (for troubleshooting only) const consoleMode = process.argv.includes('--console'); // Initialize logging system first, before any other operations initLogger(consoleMode); logger.info('Starting...'); try { // Start the server await main(); } catch (error) { logger.error('Failed to start MCP server', { error: error instanceof Error ? error.message : String(error), stack: error instanceof Error ? error.stack : undefined, }); // Also output to stderr so users can see the error even if logging fails const errorMessage = error instanceof Error ? error.message : String(error); process.stderr.write(`Error: ${errorMessage}\n`); process.exit(1); }

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/p1va/symbols-mcp'

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