metu-course-info-mcp
# METU Course Info MCP Server
A Model Context Protocol (MCP) server for querying Middle East Technical University (METU / ODTÜ) course details, curriculum requirements, prerequisites, equivalents, and student course categories from the METU Student Portal (SAIS at `https://student.metu.edu.tr`).
---
## Features
This MCP server integrates with:
1. **View Program Course Details (64)**:
- Search across 200+ METU departments and academic semesters.
- List offered courses for any department and semester with credits, ECTS, level, and status.
- View detailed course sections, instructor assignments, schedules, and critical announcements.
- Query course prerequisites and required minimum passing grades.
- Query course replacement / equivalence (Denk Dersler) rules.
- View thesis work courses for graduate departments.
2. **View Student Course Categories (178)**:
- View the authenticated student's curriculum program types (e.g. Major / Minor).
- View course requirements and elective categories (Must Courses, Departmental Electives, Non-Departmental Electives, Free Electives).
- List specific courses required or permitted under each category for the student.
> **Note regarding View Course Capacity (158):**
> Program 158 uses image CAPTCHA verification on each lookup, and is omitted per current automated requirements.
---
## Installation
Using `uv`:
```bash
# Clone or navigate to the repository
cd /path/to/metu-course-info-mcp
# Create virtual environment and install
uv venv
uv pip install -e .
```
---
## Configuration
Create or update a `.env` file in the root directory:
```env
SAIS_USERNAME=your_metu_username # e.g. e123456
SAIS_PASSWORD=your_sais_password # your METU password
LOCALE=tr # tr or en
PORT=8300 # optional port for SSE transport
```
---
## Available MCP Tools
| Tool Name | Description |
| :--- | :--- |
| `get_departments_and_semesters` | Lists all METU departments (code & name) and available semesters (e.g. `20251` for 2025-2026 Fall). |
| `search_departments` | Search department code by name keyword (e.g. `"computer"` -> `571 - Computer Engineering`). |
| `list_program_courses` | Lists all courses offered by a department in a semester with Code, Name, ECTS, Credit, Level, and Type. |
| `get_course_info` | Retrieves section numbers, instructor names, syllabus link, and critical announcements for a course. |
| `get_course_prerequisites` | Retrieves prerequisite courses, set group numbers, and minimum passing grades (e.g. `DD`). |
| `get_course_replacements` | Retrieves auto-replacement and equivalent courses (Denk Dersler). |
| `get_thesis_courses` | Retrieves thesis work courses for a department. |
| `get_student_course_categories` | Retrieves current student's program types and curriculum categories. |
| `get_student_courses_by_category` | Retrieves courses listed under a category (Must Courses, Departmental Electives, etc.). |
---
## Running the Server
### Stdio Transport (Default for MCP Clients)
```bash
# Run using uv
uv run metu-course-info-mcp
# Or directly with Python
.venv/bin/python -m metu_course_info_mcp
```
### SSE Transport (HTTP Server)
```bash
uv run metu-course-info-mcp --transport sse --port 8300
```
---
## MCP Client Configuration
### Claude Desktop / Antigravity / Cursor Configuration
Add this to your MCP configuration file (`mcp_config.json` or `claude_desktop_config.json`):
```json
{
"mcpServers": {
"metu-course-info": {
"command": "/Users/ates/Documents/projects/metu-course-info-mcp/.venv/bin/python",
"args": ["-m", "metu_course_info_mcp"],
"env": {
"SAIS_USERNAME": "your_metu_username",
"SAIS_PASSWORD": "your_sais_password",
"LOCALE": "tr"
}
}
}
}
```
---
## Running Tests
```bash
uv run pytest -v
```
TDQS
Scored across 9 tools
Each tool targets a distinct task: department discovery, course listing, course details, prerequisites, replacements, and student category queries. Even the closely related list_program_courses and get_thesis_courses are clearly separated by their filtered scope.
The majority of tools follow a get_<entity> pattern, with search_departments and list_program_courses as understandable discovery-action variants. The mix of get/list/search is minor and predictable, so the naming remains coherent.
Nine tools is a well-scoped size for this domain, covering catalog browsing, course details, and student-specific curriculum queries without unnecessary overlap or bloat. Each tool earns its place.
The surface covers department lookup, course listings, detailed course information, prerequisites, replacements, and student course categories. Minor gaps like a keyword course search or section-level enrollment details exist, but the core workflows are complete.