metu-sais-mcp
METU SAIS API & MCP Server
Ein moderner Model Context Protocol (MCP)-Server und FastAPI-Dienst für das Student Affairs Information System (SAIS / student.metu.edu.tr) der Middle East Technical University (METU / ODTÜ).
Verbindet Ihre KI-Assistenten (wie OpenCode, Claude Desktop und Cursor) direkt mit METU SAIS, mit echter Authentifizierung und strukturiertem Daten-Parsing.
Features
SSO-Authentifizierung: Übernimmt den echten METU-SSO-Anmeldeablauf (
/sso/backend/request/user/signin) und die Validierung von Sitzungstokens.Proxy-Scraper & HTML-Parser: Richtet automatisch authentifizierte Proxy-Sitzungen ein (
/proxy/Student_Information/) und parst Studentendatensätze in strukturiertes JSON.MCP-Server (MCP 2.x SDK): Stellt typisierte Tools über Standard-I/O (stdio) bereit.
FastAPI-REST-Dienst: Alternatives HTTP-REST-Backend für Integrationen.
Datenschutz & Sicherheit: Keinerlei Protokollierung oder Offenlegung von Anmeldedaten. Anmeldedaten bleiben lokal in Ihrer git-ignorierten
.env-Datei.
Related MCP server: SABIS MCP Server
Verfügbare MCP-Tools
Tool | Beschreibung |
| Ruft Studenten-ID, Name, Abteilung, Semester, GPA/CGPA, akademischen Status und Berater ab. |
| Ruft den wöchentlichen Stundenplan ab (Tage, Uhrzeiten, Kursnummern, Kursnamen, Klassenzimmer, Dozenten). |
| Ruft das akademische Transcript über alle Semester hinweg ab, mit Kursen, Leistungspunkten, Noten und Semester-GPA-Statistiken. |
| Ruft aktive Portal-Ankündigungen ab. |
| Erstellt einen In-Memory-Verbindungsdatensatz. |
| Listet alle gespeicherten Verbindungsdatensätze auf. |
Installation & Einrichtung
1. Voraussetzungen
Python >= 3.11
uv (empfohlen) oder
pip
2. Abhängigkeiten installieren
# Using uv (recommended)
uv sync
# Or using pip
pip install -e .3. Anmeldedaten konfigurieren
Kopieren Sie .env.example nach .env und geben Sie Ihre METU-Anmeldedaten ein:
cp .env.example .envBearbeiten Sie .env:
SAIS_USERNAME=your_metu_username
SAIS_PASSWORD=your_metu_password
LOCALE=tr
PORT=8300[!NOTE]
.envist in.gitignoreaufgeführt und wird niemals eingecheckt.
Verwendung mit OpenCode
Eine opencode.json ist bereits in diesem Repository enthalten.
Verwendung auf Projektebene
Wenn Sie OpenCode in diesem Repository starten:
opencodeOpenCode verbindet sich automatisch mit dem metu-sais-MCP-Server.
Globale Verwendung (beliebiges Verzeichnis)
Um die METU-SAIS-Tools projektübergreifend in OpenCode zu verwenden, fügen Sie den Server zu ~/.config/opencode/opencode.jsonc hinzu:
{
"mcp": {
"metu-sais": {
"type": "local",
"command": [
"uv",
"--directory",
"/absolute/path/to/metu-sais-mcp",
"run",
"metu-sais-mcp"
],
"enabled": true
}
}
}Verbindung prüfen
opencode mcp listSie sollten Folgendes sehen:
● ✓ metu-sais connectedAusführen des MCP-Servers im Standalone-Modus
Sie können den MCP-Server direkt über Standard-I/O ausführen:
uv run metu-sais-mcpAusführen der REST-API
Um den FastAPI-Server zu starten:
uv run uvicorn api.main:app --port 8300 --reloadDie interaktive API-Dokumentation ist verfügbar unter:
Swagger UI: http://localhost:8300/docs
Health check: http://localhost:8300/healthz
REST-Endpunkte
GET /api/sais/info— StudenteninformationenGET /api/sais/schedule— StundenplanGET /api/sais/transcript— Transcript-VerlaufGET /api/sais/announcements— Portal-AnkündigungenGET|POST|PUT|DELETE /api/connections— Verbindungsverwaltung (CRUD)
Testen
Führen Sie die automatisierte Testsuite mit pytest aus:
uv run pytest -vDie Testsuite umfasst:
Unit-Tests für HTML-Parser (
parse_student_info,parse_schedule,parse_transcript,parse_announcements).Tests zur MCP-Tool-Registrierung und zum Tool-Aufruf.
Tests für FastAPI-REST-Endpunkte.
Live-Integrationstests gegen METU SAIS, wenn Anmeldedaten konfiguriert sind.
Projektstruktur
├── sais/
│ ├── connector.py # Core SAIS authentication, proxy scraping, and HTML parsers
│ └── connections.py # Shared in-memory connection store
├── sais_mcp/
│ └── server.py # MCP stdio server definition and tool registrations
├── api/
│ └── main.py # FastAPI REST API wrapper
├── tests/
│ ├── test_connector.py # Scraper and HTML parser tests
│ ├── test_mcp_server.py# MCP server tests
│ └── test_api.py # FastAPI tests
├── .env.example # Environment variable template
├── opencode.json # OpenCode MCP configuration
├── pyproject.toml # Package dependencies and CLI entrypoints
└── README.md # Project documentationLizenz
MIT-Lizenz.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that enables AI agents to authenticate with and interact with Open eClass platform instances, supporting UoA's SSO authentication system for retrieving course information and performing basic platform operations.48
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to securely retrieve academic grades and course information from Sakarya University's SABIS student information system through automated web scraping.2ISC
- FlicenseNot gradedqualityDmaintenanceConnects AI assistants to the FAST-NUCES Flex Student Portal, enabling students to query their academic data including attendance, marks, transcript, and fee reports through natural language conversations.5
- FlicenseNot gradedqualityDmaintenanceEnables students to securely access and manage their academic data from Isparta University's OBS system, including grades, transcripts, announcements, and course information through natural language queries.1
Related MCP Connectors
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Connect e-commerce and marketing data to AI assistants via MCP.
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/atesahmet0/metu-sais-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server