Skip to main content
Glama
index.ts1.05 kB
#!/usr/bin/env node import { SwaggerMcpServer } from './SwaggerMcpServer'; import { logger } from './utils/logger'; async function main() { const server = new SwaggerMcpServer(); // Handle shutdown gracefully process.on('SIGINT', async () => { logger.info('Received SIGINT, shutting down...'); await server.stop(); process.exit(0); }); process.on('SIGTERM', async () => { logger.info('Received SIGTERM, shutting down...'); await server.stop(); process.exit(0); }); // Handle uncaught errors process.on('uncaughtException', (error) => { logger.error('Uncaught exception:', error); process.exit(1); }); process.on('unhandledRejection', (reason, promise) => { logger.error('Unhandled rejection at:', promise, 'reason:', reason); process.exit(1); }); try { await server.start(); } catch (error) { logger.error('Failed to start server:', error); process.exit(1); } } // Run the server main().catch((error) => { logger.error('Fatal error:', error); 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/NakiriYuuzu/SwaggerMcp'

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