Skip to main content
Glama

Telegram MCP Server

by DLHellMe
index.ts1.05 kB
#!/usr/bin/env node import { TelegramMCPServer } from './server.js'; import { logger } from './utils/logger.js'; async function main() { const server = new TelegramMCPServer(); // Handle shutdown gracefully process.on('SIGINT', async () => { logger.info('Received SIGINT, shutting down...'); await server.shutdown(); process.exit(0); }); process.on('SIGTERM', async () => { logger.info('Received SIGTERM, shutting down...'); await server.shutdown(); 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.run(); } catch (error) { logger.error('Failed to start server:', error); process.exit(1); } } main().catch((error) => { logger.error('Fatal error:', error); process.exit(1); });

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/DLHellMe/telegram-mcp-server'

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