BrauoOue/mcp-server
If you are the rightful owner of mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This project implements a Model Context Protocol (MCP) server for a Student Management System, enabling interaction with Large Language Models (LLMs) through a standardized interface.
Student Management System - MCP Server
This project implements a Model Context Protocol (MCP) server for a Student Management System. The MCP server provides tools that allow Large Language Models (LLMs) like ChatGPT and Claude to interact with any system through a standardized interface.
Project Overview
Backend System
The project consists of a Django REST API backend that manages:
- Students: Student records with personal information, index numbers, year of study, and enrollment dates
- Professors: Faculty members with different types (professor/assistant) and contact information
- Courses: Academic courses with descriptions and credit values
- Course Instances: Specific instances of courses for particular academic years with assigned professors and assistants
- Enrollments: Student registrations in course instances with grade tracking
The backend provides comprehensive CRUD operations for all entities and includes advanced features like:
- Student enrollment/unenrollment management
- Grade assignment and updates
- Complex queries (e.g., finding all enrollments for a student)
- Cascade deletion handling for data integrity
MCP Server
The MCP server acts as a bridge between LLMs and the Django backend, providing over 25 tools organized into categories:
- List Operations: Retrieve all students, professors, courses, course instances
- Detail Operations: Get specific records by ID, index, email, or name
- Create Operations: Add new students, professors, courses, and course instances
- Update Operations: Enroll/unenroll students, update grades, edit course information
- Delete Operations: Remove records with proper cascade handling
- System Operations: Check backend connectivity and system status
Installation and Setup
Option 1: Docker (Recommended)
This is the easiest way to run the entire system with all dependencies properly configured.
Prerequisites
- Docker
- Docker Compose
Steps
- Clone the repository:
git clone https://github.com/BrauoOue/mcp-server.git
cd mcp-server
- Build and start the services:
docker-compose up --build
This will start:
- Django backend on port 8000
- MCP server on port 8765
The services will automatically connect to each other within the Docker network.
Managing the Docker Services
# Stop services
docker-compose down
# View logs
docker-compose logs django-backend
docker-compose logs mcp-server
# Restart specific service
docker-compose restart mcp-server
Option 2: Local Development
Prerequisites
- Python 3.11+
- pip
Backend Setup
- Navigate to the backend directory:
cd backend
- Install dependencies:
pip install -r requirements.txt
- Run migrations:
python manage.py migrate
- Start the Django server:
python manage.py runserver
The backend will be available at http://localhost:8000
MCP Server Setup
- Open a new terminal and navigate to the MCP directory:
cd mcp
- Install dependencies:
pip install -r requirements.txt
- Start the MCP server:
# For local development (localhost only)
python mcp_server.py
The MCP server will be available at http://localhost:8765
Exposing the MCP Server
To use the MCP server with ChatGPT, Claude, or other external tools, you need to make it accessible over the internet. The simplest way is using ngrok.
Using ngrok
-
Install ngrok from https://ngrok.com/
-
Expose the MCP server:
ngrok http 8765
- ngrok will provide a public URL like
https://abc123.ngrok.io. Your MCP endpoint will be:
https://abc123.ngrok.io/mcp
Keep ngrok running while you want to use the MCP server with external tools.
ChatGPT Integration
Prerequisites
- ChatGPT Plus or Pro subscription
- Developer Mode access
Setup Instructions
1. Enable Developer Mode
- Open ChatGPT and go to Settings → Connectors
- Under Advanced, toggle Developer Mode to enabled
2. Create Connector
- In Settings → Connectors, click Create
- Enter the following information:
- Name: Student Management System
- Server URL:
https://your-ngrok-url.ngrok.io/mcp/ - Check I trust this provider
- Add authentication if needed (none required for this project)
- Click Create
3. Use in Chat
- Start a new chat in ChatGPT
- Click the + button → More → Developer Mode
- Enable your MCP server connector (this must be done for each new chat)
- The MCP tools are now available for use
Example Usage
Once connected, you can interact with the student management system using natural language:
Student Management
"List all students in the system"
"Get details for student with index 20240001"
"Create a new student named John Doe with email john.doe@university.edu and index 20240015"
"Delete the student with index 20240001"
Course Management
"Show me all available courses"
"Create a new course called 'Advanced Algorithms' with 8 credits"
"Search for courses containing 'database' in the name"
"Update the course Advanced Algorithms to have 6 credits instead of 8"
Professor Management
"List all professors"
"Find the professor with email jane.smith@university.edu"
"Add a new assistant professor named Dr. Alice Johnson"
"Delete professor with email jane.smith@university.edu"
Course Instance Management
"Show all course instances for the current academic year"
"Create a course instance for 'Data Structures' in 2024/2025 with professor with email jane.smith@university.edu and assistant with email nicole.smith@university.edu"
"Get details for the 'Machine Learning' course in academic year 2024/2025"
Enrollment Management
"Enroll student with index 256001 in course Advance Programming 2025/2026"
"Show all enrollments for student with index 256001"
"Update the grade for student with index 256001 in course Advance Programming 2025/2026 to 8.5"
"Unenroll student with index 256001 from course Advance Programming 2025/2026"
System Monitoring
"Check the system status"
Real ChatGPT Conversation Example
For a comprehensive demonstration of the system in action, see this real ChatGPT conversation where the MCP server was used extensively: Live ChatGPT Demo
This conversation showcases real-world usage patterns including:
- System status checking and troubleshooting
- Creating and managing students, professors, and courses
- Setting up course instances with proper academic years
- Student enrollment workflows
- Grade management and updates
- Complex queries combining multiple operations
- Error handling and validation scenarios
The demo shows how naturally you can interact with the system using conversational language, and how the MCP server handles various edge cases and provides helpful feedback.
API Endpoints
The Django backend provides the following main endpoints:
Students
GET /api/students/- List all studentsPOST /api/students/create/- Create new studentGET /api/students/{index}/- Get student by indexGET /api/students/{index}/enrollments/- Get student enrollmentsDELETE /api/students/{index}/delete/- Delete student
Professors
GET /api/professors/- List all professorsPOST /api/professors/create/- Create new professorGET /api/professors/email/{email}/- Get professor by emailDELETE /api/professors/{id}/delete/- Delete professor
Courses
GET /api/courses/- List all coursesPOST /api/courses/create/- Create new courseGET /api/courses/name/{name}/- Search course by namePATCH /api/courses/{id}/edit/- Update courseDELETE /api/courses/{id}/delete/- Delete course
Course Instances
GET /api/course-instances/- List all course instancesPOST /api/course-instances/create/- Create new course instanceGET /api/course-instances/{course_name}/{academic_year}/- Get specific instanceDELETE /api/course-instances/{id}/delete/- Delete course instance
Enrollments
GET /api/enrollments/- List all enrollmentsPOST /api/enrollments/enroll/- Enroll studentDELETE /api/enrollments/unenroll/{student_id}/{course_instance_id}/- Unenroll studentPATCH /api/enrollments/grade/{student_id}/{course_instance_id}/- Update grade
Detailed Documentation
For comprehensive technical documentation, refer to the metadata/ folder which contains detailed guides:
- API Endpoints Documentation: Complete specifications for all Django REST API endpoints with request/response examples, parameter descriptions, and error codes
- MCP Tools Documentation: Detailed explanations of all available MCP tools, their parameters, return values, and usage examples. These markdown files provide in-depth technical references that complement this README's quick-start approach.
Troubleshooting
Common Issues
MCP Server not accessible from ChatGPT:
- Ensure ngrok is running and the URL is correct
- Verify the connector is enabled in the ChatGPT chat session
Django backend connection errors:
- Ensure the Django server is running on port 8000
- Check that migrations have been applied
- For Docker: verify containers can communicate (check
docker-compose logs)
Permission errors in Docker:
- On Linux/Mac, you might need to adjust file permissions
- Try running
sudo docker-compose up --build
Logs and Debugging
Docker logs:
docker-compose logs django-backend
docker-compose logs mcp-server
Check MCP server status:
Visit http://localhost:8765/mcp in your browser to verify the server is running.
Test Django backend:
Visit http://localhost:8000/admin to check if the API is responding.
Technology Stack
- Backend: Django 5.1.6, Django REST Framework
- MCP Server: FastMCP, Python 3.11
- Database: SQLite (development), easily configurable for PostgreSQL/MySQL
- Containerization: Docker, Docker Compose
- Networking: ngrok for external exposure
Project Creators
This project was developed by:
- Viktor Kostadinoski (itonkdong) - Student
- Andrea Stevanoska (Andrea-444) - Student
- Ivan Kitanovski - Teacher and Mentor
We are students and teachers at FINKI/FSCE (Faculty of Computer Science and Engineering) in Skopje, North Macedonia. This project serves as both a learning exercise and demonstration of modern software development practices, including REST API design, containerization, and emerging technologies like the Model Context Protocol (MCP).
Contributing
This project serves as a demonstration of MCP server capabilities and Django REST API development. Feel free to extend it with additional features like:
- Authentication and authorization
- More complex queries and reporting
- File upload capabilities
License
This project is provided as-is for educational and demonstration purposes.