Unofficial, headless command-line client for Marmara Üniversitesi's student-facing and public APIs. Prints JSON to stdout so it's easy to script or drive from an AI agent, and it can also run as an MCP server so agents like Claude can call each operation as a tool.
Disclaimer. This is a personal project. It is not affiliated with, authorized by, or endorsed by Marmara Üniversitesi. It talks to the same public/mobile endpoints the official app uses, with your own login credentials. Your password is never stored — only the returned tokens are cached locally in
~/.marmara/token.json(permissions0600). Use at your own risk, and only with your own account.
Requires Go 1.24+.
go build -o marmara ./cmd/marmara # or marmara.exe on WindowsPublic data needs no login:
marmara cafeteria # daily cafeteria menu
marmara clubs # student clubs
marmara club-events # upcoming club events (upstream currently 404)
marmara calendar # academic calendar / exam periods
marmara campus-maps # campus GPS markers (--types for categories)
marmara news # university news
marmara announcements # official announcements
marmara events # university events
marmara features # app feature toggles
marmara risk-report # health/risk reportYour own data needs a login first. Students log in with an o prefix before
the student number (e.g. o111111111), the same as BYS — the plain number
alone won't work.
marmara login # prompts for username/password (masked)
# or non-interactive, for scripts/agents:
MARMARA_USERNAME=... MARMARA_PASSWORD=... marmara login
marmara profile # your profile
marmara card # campus card status + numbers
marmara grades # active-term grade list
marmara grades detail --ders-id <OgrenciDersId>
marmara transcript
marmara schedule # weekly timetable (--table supported)
marmara exams # exams from every term (add past / future to filter)
marmara logout # revoke token + clear cacheOutput formatting:
- default: compact JSON on one line (easy for scripts/agents to parse)
--pretty: indented JSON--table: human-readable table for supported commands (transcript,grades,exams,schedule,cafeteria,card,profile,news,announcements,events,calendar); any command without a table view falls back to JSON automatically
Example:
$ marmara transcript --table
AD SOYAD (111111111) — Bilgisayar Mühendisliği
GANO 3.36 | 86.1/100 | 62 kredi / 62 ECTS tamamlandı
2025 Güz — YANO 3.30 (GANO 3.30)
Kod Ders Kr ECTS Harf Not
BLM1001 Bilgisayar Mühendisliğine Giriş 4 4 AA 93
...
The access token auto-refreshes when it's expired or near expiry, using the cached refresh token, so you rarely need to log in again.
A local, self-hosted browser UI over the same API layer — a clean dashboard for your transcript, grades, schedule, exams, cafeteria menu, calendar, news and more, plus a summary landing screen: GANO, today's lessons with upcoming exams right beside them (stacked on narrow screens) and today's menu. The exams page lists every term with Tümü / Yaklaşan / Geçmiş filter chips.
marmara serve --open # starts on http://127.0.0.1:8080 and opens a browser
marmara serve --port 9000 # pick a different port
marmara serve --host 0.0.0.0 # expose to local network (LAN)Binds to 127.0.0.1 by default (pass --host 0.0.0.0 for LAN access). If you already logged in via the CLI, the dashboard uses
the same cached token; otherwise it shows a login form. Your password is sent only
to the local server and never stored — only tokens are cached, exactly like CLI
login.
Run the binary in MCP mode over stdio:
marmara mcpRegister it with an MCP-aware client. For Claude Code:
claude mcp add marmara -- /full/path/to/marmara mcpEvery read command above is exposed as a tool (profile, grades, schedule,
exams, cafeteria, calendar, …); exams covers every enrolled term and takes an
optional filter (past / future). Log in once with marmara login first; the
MCP server reuses the same cached token.
Included: the native mobile Bearer API for your own academic data (profile, card, grades, transcript, schedule, exams) and genuinely public JSON (cafeteria, clubs, calendar, campus maps, news, announcements, events).
Deliberately excluded: anything that isn't a student's own data or a public endpoint, and any cross-student lookup — calls always act as the authenticated user and never take an arbitrary student ID.
grades detailmay fail upstream.NotDetayGetirthrows an unhandled exception (HTTP 500) on the BYS side. It has been seen for graded past-term courses and for ungraded active-term courses alike, with the id taken frommarmara grades, so it is a backend issue rather than a wrong id. The CLI/MCP report it as an explicit error rather than a bare 500. Because of this, class average, min/max and rank are not available yet (#13).club-eventsis down upstream. ESKS now returns 404 forkulup/kulupeglist.json; the command is kept until the new path is known.cafeteriahas two sources. SKS (sks.marmara.edu.tr/yemek/json) is tried first; if it times out, fails DNS or returns an unusable body, the BYS mobile endpoint (/v2/Public/Mobil/Yemekhane) is used instead. Both are normalised to the same flat day array, so--table, the dashboard and MCP see one shape.profileadvisor name is best-effort.KullaniciBilgileriexposesDanismanEMail(confirmed in the mobile build) but no confirmed display-name key;--tableshows the name only when the backend happens to include one. The photo URL is derived fromResimPathashttps://bys.marmara.edu.tr/upload/ogrfoto/<file>.
These were dropped because the university endpoints are unreliable or changed; they can be revisited if the backends stabilize:
- Personnel directory (
RehberBilgileri) — returns a server-side HTTP 500 on any real query; the required request shape is unknown and even valid-looking bodies throw. - AVESİS search (
/proxy/search) — now 404; the JSON search API path was removed or moved. - Support tickets (Destek) —
GetApplicationAttributesredirects to a web login (GET) or demands an application GUID we don't have (POST). Destek expects a browser web session, not this token-based client.
MIT — see LICENSE.
