Skip to main content
Glama

Github Project Manager

index.ts1.13 kB
#!/usr/bin/env node import { startSlackMcpServer, startSlackMcpServerSSE } from './server.js'; import { loadEnv } from './config/env.js'; /** * Main entry point for the Slack MCP server */ async function main() { try { // Load environment from command line or env vars const env = loadEnv(); console.log('Environment parsed and loaded'); // Start server with appropriate transport based on configuration if (env.RUN_SSE) { console.log(`Starting server with SSE transport on port ${env.PORT}`); await startSlackMcpServerSSE(env); } else { console.log('Starting server with stdio transport'); await startSlackMcpServer(env); } } catch (error) { if (error instanceof Error) { console.error(`Failed to start server: ${error.message}`); } else { console.error('Failed to start server with unknown error'); } process.exit(1); } } // Start the server main().catch((error) => { console.error('Error starting MCP server:', 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/Monsoft-Solutions/model-context-protocols'

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