vtop-mcp
by notdevank
README.md
# vtop-mcp
Ask your own VIT VTOP account real questions — **"what's my attendance in DBMS?"**,
**"when is my CAT-2?"**, **"how many marks did I lose in Assessment 2?"** — from
Claude, Cursor, or any MCP client, or straight from the terminal.
Read-only. It never registers courses, pays fees, or changes anything.
```
$ vtop attendance
│ BMEE210L │ Mechatronics and Measurement Systems │ 1/1 │ 100% │
│ BMEE212L │ Quality Control and Improvement │ — │ — │
$ vtop today
│ THU │ 08:00–08:50 │ THEORY │ BMEE409E (ETH) │ GDN120 │
│ THU │ 10:00–10:50 │ THEORY │ BMEE212L (TH) │ MB214 │
```
## Install
Needs Python 3.11+.
```bash
# recommended: an isolated tool install
uv tool install "git+https://github.com/notdevank/vtop-mcp"
# or
pipx install "git+https://github.com/notdevank/vtop-mcp"
# or inside a virtualenv
pip install "git+https://github.com/notdevank/vtop-mcp"
```
For the one-command login (below) add the browser extra:
```bash
uv tool install "vtop-mcp[browser]" --from "git+https://github.com/notdevank/vtop-mcp"
playwright install chromium
```
## Connect your account
VTOP protects its login with a CAPTCHA — sometimes an image, sometimes Google
reCAPTCHA v3 — so no program can sign in for you. This tool does the honest
thing instead: **you log in, it keeps the session.**
```bash
vtop login --browser
```
A browser window opens on the VTOP login page. Log in normally, solve the
CAPTCHA, and once the dashboard appears the session is captured and saved to
your machine. That is the whole setup.
If you would rather not install Playwright, `vtop login` (no flag) asks you to
paste the `JSESSIONID` cookie from a logged-in tab instead.
Check it anytime:
```bash
vtop status # ● live session age 4m
vtop doctor # portal reachable? which CAPTCHA is it serving?
```
VTOP sessions expire after a while. When one does, run `vtop login --browser`
again — nothing else changes.
## Use it from an agent
Print the exact config for your client:
```bash
vtop mcp-config --client claude # Claude Desktop
vtop mcp-config --client cursor # Cursor
vtop mcp-config --client dsh # DeepSeek Harness
```
The generic form is the usual MCP stdio stanza:
```json
{
"mcpServers": {
"vtop": {
"command": "/path/to/vtop-python",
"args": ["-m", "vtop_mcp.mcp_server"]
}
}
}
```
`vtop mcp-config` fills in the right interpreter path for your install — copying
it by hand from `which python` is the most common way this goes wrong.
**21 read-only tools:** `session_status`, `cgpa`, `courses`, `attendance`,
`semesters`, `timetable`, `classes_today`, `week`, `exams`, `marks`, `grades`,
`profile`, `fees`, `library_dues`, `transfers`, `list_screens`, `read_screen`,
`assignments`, `events`, `feedback`, `proctor_message`.
If the session has expired, tools say so plainly and tell you to run
`vtop login --browser`. An agent cannot re-authenticate, by design.
## Commands
| command | what it does |
| --- | --- |
| `vtop login [--browser]` | Connect (browser-assisted, or paste a cookie) |
| `vtop status` / `vtop logout` / `vtop doctor` | Session state and diagnostics |
| `vtop cgpa` | CGPA, earned credits, credits required |
| `vtop courses` | Current-semester courses with attendance |
| `vtop attendance [--semester]` | Attended/total per course, %, debar status |
| `vtop timetable [--semester]` | Slots, venues, faculty, credits |
| `vtop week` / `vtop today [--day MON]` | Real class times |
| `vtop exams [--semester]` | Dates, sessions, venues, seat numbers |
| `vtop marks [--semester] [--detail]` | Every assessment with weightage |
| `vtop grades` | Grade history by exam month, CGPA, credits |
| `vtop semesters` | Semester ids, newest first |
| `vtop fees` / `vtop library` / `vtop transfers` | Money |
| `vtop profile` | Profile fields |
| `vtop screens` / `vtop screen <route>` | All 116 VTOP menu screens, read generically |
| `vtop assignments` / `vtop events` / `vtop feedback` / `vtop proctor` | The rest |
Every command takes `--json` for scripting. Add `--semester <id or label>` when
you want a past term instead of the newest one.
## How it works
VTOP has no public API. This talks to the portal the way a browser does:
cookies, `_csrf` tokens, and `authorizedID`, over plain HTTP — no browser
needed after login.
Two design rules worth knowing:
- **Expiry is a redirect.** A bounce to `/vtop/login` becomes a precise
"session expired" instead of an HTML parse error.
- **Parsers are pinned to real markup.** Test fixtures are verbatim captures, so
a VTOP redesign fails a named test rather than silently returning wrong
numbers. Regenerate captures with `vtop capture`.
## Security
- Your password is never requested, stored, or sent by this program. Only the
session your browser created.
- The session file lives in your OS state directory (`~/.local/state/vtop-mcp`
on Linux, `~/Library/Application Support` on macOS, `%LOCALAPPDATA%` on
Windows), is `0600`, and is written atomically.
- Logs redact cookies, CSRF tokens and `authorizedID`.
- The generic screen reader masks any column labelled credential, password,
secret, token or OTP — VTOP's Credentials screen really does return your
default passwords in plaintext.
- Requests are paced (`0.8 s` minimum) and never retried on auth failures.
## Troubleshooting
| symptom | fix |
| --- | --- |
| `● expired` | `vtop login --browser` |
| `Browser login needs Playwright` | `pip install "vtop-mcp[browser]" && playwright install chromium` |
| Logged in in the browser but it keeps asking | You may have logged in in a different browser profile — use the window this tool opened |
| `VTOP served the login page instead of your account` | The cookie is stale; log in again |
| Numbers look wrong or empty | `vtop capture` dumps raw HTML; the parsers report which shape changed |
| On VIT Chennai / AP / Bhopal | `VTOP_BASE_URL=https://vtopcc.vit.ac.in` and `vtop login --base-url …`. Parsers are tuned for Vellore; expect rough edges. |
## Coverage
All 116 screens the portal publishes are reachable — 10 with purpose-built
parsers, the rest through `vtop screen`. See [docs/coverage.md](docs/coverage.md).
About 60 menu items are **actions** (registration, payments, leave requests).
They are deliberately not automated: an agent-facing bridge that can mutate your
academic record is a footgun.
## License
MIT. Unofficial — not affiliated with or endorsed by VIT.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues