Skip to main content
Glama
Om-Shree-0709

GitHub MCP TypeScript SDK Server

quick-start.js1.62 kB
#!/usr/bin/env node /** * Quick Start Script for GitHub MCP Server * This script helps users get up and running quickly */ import { config } from "dotenv"; import { existsSync, readFileSync } from "fs"; import { spawn } from "child_process"; import { fileURLToPath } from "url"; import { dirname, join } from "path"; // Load environment variables from .env file config(); const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); console.log("🚀 GitHub MCP Server - Quick Start\n"); // Check if .env exists const envPath = join(__dirname, ".env"); if (!existsSync(envPath)) { console.log("⚠️ No .env file found. Please run setup first:"); console.log(" npm run setup\n"); process.exit(1); } // Check if dist exists const distPath = join(__dirname, "dist"); if (!existsSync(distPath)) { console.log("🔨 Building server..."); const build = spawn("npm", ["run", "build"], { stdio: "inherit" }); build.on("close", (code) => { if (code === 0) { console.log("✅ Build successful!"); startServer(); } else { console.log("❌ Build failed!"); process.exit(1); } }); } else { startServer(); } function startServer() { console.log("\n🚀 Starting GitHub MCP Server...\n"); const server = spawn("npm", ["start"], { stdio: "inherit" }); server.on("close", (code) => { if (code !== 0) { console.log(`\n❌ Server exited with code ${code}`); } }); // Handle Ctrl+C process.on("SIGINT", () => { console.log("\n👋 Shutting down server..."); server.kill(); process.exit(0); }); }

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/Om-Shree-0709/Github-MCP-Ts-SDK'

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