Skip to main content
Glama

CodeAnalysis MCP Server

by 0xjcf
server-main.ts1.32 kB
/** * MCP Server Main Entry Point * * This is the main entry point for the MCP server. It uses the startServer * function to create and connect an MCP server with auto-detected backends. * * Environment variables: * - PORT: HTTP port for the server (default: 3000) * - STDIO_TRANSPORT: Use stdio transport instead of HTTP (set to "true") * - REDIS_URL: Redis connection URL (default: redis://localhost:6379) * - FORCE_MEMORY_SESSION: Force in-memory session storage (set to "true") * - VERBOSE: Show verbose logs (set to "true") */ import { startServer } from "./server/startServer.js"; // Parse environment variables const options = { useStdio: process.env.STDIO_TRANSPORT === "true", port: process.env.PORT ? parseInt(process.env.PORT, 10) : 3000, redisUrl: process.env.REDIS_URL, forceMemorySessionStore: process.env.FORCE_MEMORY_SESSION === "true", verbose: process.env.VERBOSE === "true", }; console.log("Starting MCP server with options:", { ...options, // Hide sensitive information from logs redisUrl: options.redisUrl ? "[CONFIGURED]" : undefined, }); // Start the server startServer(options) .then(({ server }) => { console.log("MCP server started successfully"); }) .catch((error) => { console.error("Failed to start 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/0xjcf/MCP_CodeAnalysis'

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