Skip to main content
Glama
Sadaf987

School Attendance MCP Server

by Sadaf987
main.ts1.37 kB
import 'reflect-metadata'; import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import { McpController } from './mcp/mcp.controller'; import { AttendanceService } from './services/attendance.service'; import { GithubService } from './services/github.service'; async function bootstrap() { const app = await NestFactory.create(AppModule); // Manually create and set up the controller with its dependencies const attendanceService = new AttendanceService(); const githubService = new GithubService(); const mcpController = new McpController(); // @ts-ignore - Bypass private property access mcpController.attendanceService = attendanceService; // @ts-ignore - Bypass private property access mcpController.githubService = githubService; // Get the app controller instance and replace it with our manually created one const appController = app.get(McpController); Object.assign(appController, mcpController); // Enable CORS for codex to connect app.enableCors({ origin: '*', methods: 'GET, POST, OPTIONS', allowedHeaders: 'Content-Type', }); const port = process.env.PORT || 3001; await app.listen(port, '0.0.0.0'); console.log(`MCP server listening at http://localhost:${port}`); console.log(`Server is accessible from codex at http://localhost:${port}/mcp`); } bootstrap();

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/Sadaf987/github_sdk'

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