Skip to main content
Glama
by kj455
index.ts1.14 kB
#!/usr/bin/env node import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js' import { createServer } from './server' import './env' const run = async () => { const { server } = createServer() const transport = new StdioServerTransport() const shutdown = async () => { console.error('Shutting down...') await server.close() } const signals: NodeJS.Signals[] = ['SIGINT', 'SIGTERM'] signals.forEach((signal) => { process.on(signal, () => shutdown().then(() => process.exit(0))) }) process.on('uncaughtException', (error) => { console.error('Uncaught exception:', error) shutdown().finally(() => process.exit(1)) }) process.on('unhandledRejection', (reason) => { console.error('Unhandled rejection:', reason) shutdown().finally(() => process.exit(1)) }) try { await server.connect(transport) console.error('Kibela MCP Server running on stdio') } catch (error) { console.error('Failed to start server:', error) await shutdown() process.exit(1) } } run().catch((error) => { console.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/kj455/mcp-kibela'

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