Skip to main content
Glama
index-dual.ts2.54 kB
#!/usr/bin/env node import { DualTransportMcpServer } from './server-dual-transport.js'; import { ConfigLoader } from './config/config-loader.js'; /** * Main entry point for the dual-transport MCP server * Supports both stdio and HTTPS with OAuth 2.0 */ async function main() { try { // Load configuration const config = ConfigLoader.getInstance().getConfig(); const isProduction = config.server.production; // Simplified logging in production mode if (isProduction) { console.log(`Umbrella MCP Server v2.0 starting in production mode`); console.log(`Transport: ${config.server.transport}, Port: ${config.server.port || 'stdio'}`); } else { console.log('🚀 Starting Umbrella MCP Server v2.0'); console.log('=' .repeat(60)); // Display startup configuration (debug mode only) console.log(`📋 Configuration loaded from config.json`); console.log(` Transport: ${config.server.transport}`); console.log(` Debug: ${config.server.debug}`); console.log(` Production: ${config.server.production}`); if (config.server.transport === 'https') { console.log(` Port: ${config.server.port}`); console.log(` Token Expiration: ${config.auth.tokenExpiration}s`); console.log(` Cloudflare Tunnel: ${config.cloudflare.enabled ? 'ENABLED' : 'DISABLED'}`); } console.log('=' .repeat(60)); } // Create and start the server const server = new DualTransportMcpServer(); await server.start(); if (isProduction) { console.log('Umbrella MCP Server started successfully'); } } catch (error: any) { console.error('Failed to start server:', error.message); if (!ConfigLoader.getInstance().getConfig().server.production) { console.error('Stack trace:', error.stack); } process.exit(1); } } // Handle uncaught exceptions process.on('uncaughtException', (error) => { const isProduction = ConfigLoader.getInstance().getConfig().server.production; if (isProduction) { console.error('Uncaught exception:', error.message); } else { console.error('❌ Uncaught exception:', error); } process.exit(1); }); process.on('unhandledRejection', (reason, promise) => { const isProduction = ConfigLoader.getInstance().getConfig().server.production; if (isProduction) { console.error('Unhandled rejection:', reason); } else { console.error('❌ Unhandled rejection at:', promise, 'reason:', reason); } process.exit(1); }); // Start the server main();

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/daviddraiumbrella/invoice-monitoring'

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