Provides tools for committing files to repositories, fetching repository information, creating and listing branches, retrieving file contents, and listing commits through the GitHub API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@School Attendance MCP Servermark attendance for student 12345 as present today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
School Attendance MCP Server
An MCP (Model Context Protocol) server that provides tools for managing school attendance and interacting with GitHub repositories.
Features
MCP Protocol Implementation: Custom-built MCP server using NestJS
GitHub Integration: Tools for committing files and fetching repository information
Attendance Management: Tool for marking student attendance
Codex Compatible: Works with Cursor/codex and other MCP clients
Setup
1. Install Dependencies
2. Environment Variables
Create a .env file in the root directory:
Getting a GitHub Token:
Go to https://github.com/settings/tokens
Generate a new token (classic)
Select
reposcope (for full repository access)Copy the token to your
.envfile
3. Running the Server
Development mode:
Production mode:
Start (default):
The server starts on http://localhost:3001 and exposes:
MCP Endpoint:
http://localhost:3001/mcpStatus Endpoint:
http://localhost:3001/mcp/status
Available Tools
1. mark_attendance
Mark attendance for a student with date and status.
Parameters:
studentId(string): Student IDdate(string): Date in YYYY-MM-DD formatstatus(string):present,absent, orlate
Example:
2. commit_changes
Commit files to a GitHub repository.
Parameters:
repoOwner(string): GitHub username/organizationrepoName(string): Repository namebranchName(string): Branch name (e.g.,main,master)commitMessage(string): Commit messagefilesToCommit(array): Array of files withpathandcontent
Example:
3. get_repo_info
Get information about a GitHub repository.
Parameters:
repoOwner(string): GitHub username/organizationrepoName(string): Repository name
Example:
Connecting to Codex/Cursor
Configuration
Add to ~/.cursor/mcp.json:
Testing Connection
Expected response:
Implementation Details
Architecture
Key Components
MCP Controller (
src/mcp/mcp.controller.ts):Custom MCP protocol implementation
Handles
initialize,tools/list,tools/callmethodsJSON-RPC 2.0 message format
CORS enabled for codex connectivity
Services (
src/services/):attendance.service.ts: Attendance managementgithub.service.ts: GitHub operations using@octokit/rest
App Module (
src/app.module.ts):Main application module
Configures NestJS modules and dependencies
Uses
@nestjs/configfor environment variables
Dependencies:
@nestjs/core,@nestjs/common: NestJS framework@nestjs/platform-express: Express adapter for NestJS@nestjs/config: Configuration management@octokit/rest: GitHub API SDK
MCP Protocol Methods
The server implements the following MCP protocol methods:
initialize: Server initialization and capability negotiationtools/list: Returns list of available tools with schemastools/call: Executes a tool with provided arguments
Request Format
All requests follow JSON-RPC 2.0 format:
Response Format
All responses follow MCP protocol format:
Testing
See TESTING.md for detailed testing instructions.
Quick test:
Project Structure
Notes
Built with NestJS framework for better structure and maintainability
The MCP protocol is implemented manually (no MCP SDK used)
GitHub operations use
@octokit/restSDKServer binds to
0.0.0.0for external accessibilityCORS is enabled to allow codex connections
Uses dependency injection for better testability and modularity