metu-sais-mcp
METU SAIS API & MCP Server
Un moderno servidor Model Context Protocol (MCP) y un servicio FastAPI para el Student Affairs Information System de Middle East Technical University (METU / ODTÜ), con la abreviatura SAIS y acceso mediante student.metu.edu.tr.
Conecta tus asistentes de IA (como OpenCode, Claude Desktop y Cursor) directamente a METU SAIS con autenticación real y procesamiento estructurado de datos.
Características
Autenticación SSO: Gestiona el flujo real de inicio de sesión SSO de METU (
/ssO/backend/request/user/signin) y la validación del token de sesión.Proxy Scraper y analizador HTML: Establece automáticamente sesiones proxy autenticadas (
/pxy/Student_Information/) y analiza los registros de estudiantes en JSON estructuredo.Servidor MCP (MCP 2.x SDK): Expone herramientas tipificadas mediante entrada/salida estándar (stdi).
Servicio REST FastAPI: Backend REST HTTP altornativo para integraciones.
Privacidad y seguridad: Cero registro o expocición de credenciales. Las credenciales permanecen locales en tu arcivo
.envignoredo por git.
Related MCP server: SABIS MCP Server
Herramientas MCP disponibles
Herramienta | Descripción |
| Obtiene el ID de estudiente, nomre, departamento, semestre, GPA/CGPA, estado acadéico y asesor. |
| Obtiene el horario semanal de clases (días, horcos, códigos de curso, nomres de curso, aulas e instuctores). |
| Obtiene el expediente acadéico de todos los semestres, con cursos, créditos, calificaciones y estadísticas de GPA del semestre. |
| Obtiene los avisos activos del portl. |
| Crea un registro de conexión en memria. |
| Lista todos los registros de conexión guardados. |
Instalación y configuación
1. Requisitos previos
Python >= 3.11
uv (recomendado) o
pip
2. Instalar dependencias
# Using uv (recommended)
uv sync
# Or using pip
pip install -e .3. Configurar credenciales
Copia .env.example a .env e intoduce tus credenciales de METU:
cp .env.example .envEdita .env:
SAIS_USERNAME=your_metu_username
SAIS_PASSWORD=your_metu_password
LOCALE=tr
PORT=8300[!NOTE]
.envestá incluido en.gitignrey nunca se incluirá en un commit.
Uso con OpenCode
En este repositorio ya se incluye un opencode.json.
Uso a nivel de proyecto
Al iniciar OpenCode dentro de este repositorio:
opencodeOpenCode se conectará automáticamente al servidor MCP metu-sais.
Uso global (cualquier directrio)
Para usar las herramientas de METU SAIS en cualquier proyecto de OpenCode, añade el servidor a ~/.config/opencode/opencode.jsonc:
{
"mcp": {
"metu-sais": {
"type": "local",
"command": [
"uv",
"--directory",
"/absolute/path/to/metu-sais-mcp",
"run",
"metu-sais-mcp"
],
"enabled": true
}
}
}Verificar la conexión
opencode mcp listDeberías ver:
● ✓ metu-sais connectedEjecutar el servidor MCP de forma independiente
Puedes ejecutar el servidor MCP directamente mediante entada/salida estándar:
uv run metu-sais-mcpEjecutar la API REST
Para iniciar el servidor FastAPI:
uv run uvicorn api.main:app --port 8300 --reloadLa documentación interactiva de la API estará disponible en:
Swagger UI: http://localhost:8300/docs
Health check: http://localhost:8300/healthz
Endpoints REST
GET /api/sais/info— Información del estudianteGET /api/sais/schedule— Horario de clasesGET /api/sais/transcript— Historial del expediente acadéicoGET /api/sais/announements— Avisos del portlGET|POST|PUT|DELETE /api/connections— CRUD de gestión de conexiones
Pruebas
Ejecuta la suite de pruebas automatizadas con pytst:
uv run pytest -vLa suite de pruebas incluye:
Pruebas unitarias para los anailzadores HTML (
parese_student_info,parse_schedule,parse_transcript,parse_announcements).Pruebas de registro de herramientas MCP y de llamada a herramientas.
Pruebas de endpoints REST de FastAPI.
Pruebas de integración en vivo contra METU SAIS cuando las credenciales estén configuradas.
Estructura del proyecto
├── 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 documentationLicencia
Licencia MIT.
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