Skip to main content
Glama

Reddit MCP Server

by ozipi
index.ts•1.62 kB
#!/usr/bin/env node /** * @file Main entry point for the Reddit MCP server * @module index * * @remarks * This is the executable entry point for the Reddit MCP server when run directly. * It loads environment variables and starts the HTTP server on the configured port. * * The server can be started using: * - `npm start` - Production mode * - `npm run dev` - Development mode with auto-reload * - `node dist/index.js` - Direct execution * * Required environment variables: * - REDDIT_CLIENT_ID: OAuth2 client ID from Reddit app * - REDDIT_CLIENT_SECRET: OAuth2 client secret * - JWT_SECRET: Secret for signing JWT tokens * * @see {@link https://modelcontextprotocol.io} Model Context Protocol Documentation */ import dotenv from 'dotenv'; dotenv.config(); import { startServer } from './server.js'; import { CONFIG } from './server/config.js'; import { getVersionInfo } from './version.js'; // Log version information on startup const versionInfo = getVersionInfo(); console.log('\n='.repeat(60)); console.log(`šŸš€ Starting ${versionInfo.name} v${versionInfo.version}`); console.log(`šŸ“… Build Date: ${versionInfo.buildDate}`); console.log(`✨ Features: ${versionInfo.features.join(', ')}`); console.log('='.repeat(60) + '\n'); // Start the server const port = parseInt(CONFIG.PORT, 10); (async () => { try { const server = await startServer(port); server.on('error', (error) => { console.error('Failed to start server:', error); process.exit(1); }); } catch (error) { console.error('Failed to initialize 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/ozipi/brainloop-mcp-server-v2'

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