Skip to main content
Glama

MCP Bridge Server

index.js1.47 kB
#!/usr/bin/env node import { BridgeServer } from './server.js'; // Default configurations const bridgeServerConfig = { maxTaskAttempts: 3, taskTimeoutMs: 30000, // 30 seconds logLevel: 'info' }; const routerConfig = { defaultTargetType: 'claude', routingRules: { // Example routing rules 'tools/optimize_code': { targetType: 'claude', priority: 1 }, 'tools/execute_command': { targetType: 'cline', priority: 1 } } }; const stateManagerConfig = { cleanupIntervalMs: 60000, // 1 minute taskExpirationMs: 300000 // 5 minutes }; async function main() { try { // Create and start the bridge server const server = new BridgeServer(bridgeServerConfig, routerConfig, stateManagerConfig); // Handle process signals process.on('SIGINT', async () => { console.error('Received SIGINT. Shutting down...'); await server.stop(); process.exit(0); }); process.on('SIGTERM', async () => { console.error('Received SIGTERM. Shutting down...'); await server.stop(); process.exit(0); }); // Start the server await server.start(); } catch (error) { console.error('Failed to start server:', error); process.exit(1); } } // Start the server main().catch(console.error); //# sourceMappingURL=index.js.map

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/glassBead-tc/SubspaceDomain'

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