Skip to main content
Glama
index.ts842 B
/** * Reddit MCP Buddy Server * Main entry point */ import { startStdioServer, startHttpServer } from './mcp-server.js'; // Determine transport mode from environment const isHttpMode = process.env.REDDIT_BUDDY_HTTP === 'true'; const port = parseInt(process.env.REDDIT_BUDDY_PORT || '3000', 10); // Handle unhandled errors process.on('unhandledRejection', (error) => { console.error('Unhandled rejection:', error); process.exit(1); }); process.on('uncaughtException', (error) => { console.error('Uncaught exception:', error); process.exit(1); }); // Start the appropriate server async function main() { try { if (isHttpMode) { await startHttpServer(port); } else { await startStdioServer(); } } catch (error) { console.error('Failed to start server:', error); process.exit(1); } } 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/karanb192/reddit-buddy-mcp'

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