MCP server for USOS (Uniwersytecki System Obsługi Studiów)
Project description
USOS Model Context Protocol (MCP) Server
A standardized Model Context Protocol (MCP) server that bridges the official USOS API (Uniwersytecki System Obsługi Studiów) with generative AI clients (such as Claude Code, Claude Desktop, Cursor, and web-based assistants via tunnels).
This server allows students of Polish universities to query their schedules, track academic grades, monitor ECTS accumulation, search for lecturer contact data, and review study programs through natural language conversations.
Project Overview & Architecture
The Problem
The USOSweb interface, while functional, presents nested tables, complex directories, and disparate systems for tracking grades, schedules, and program stages. Students frequently navigate multiple sub-menus to compile study progress, locate contact details, or coordinate schedules.
The Solution: USOS MCP Server
By wrapping the official USOS API in an MCP interface, this server translates complex REST-like endpoints into declarative Tools, Resources, and Prompts. This empowers local LLM agents to act as interactive academic advisors, personal schedulers, and administrative guides.
Design Principles
- Zero Middle-Man Hosting (RODO/GDPR-Shield): Academic records, grades, and student IDs are highly private data. Because this MCP server runs locally on the student's machine, the data flow occurs solely between the university's official API servers and the local client. Your code does not collect or process student data in any external database, radically simplifying RODO compliance.
- Multi-Target Architecture: Rather than hardcoding a single university's system, the server accepts a dynamic base URL and isolated API keys (e.g., University of Warsaw, Jagiellonian University, Warsaw University of Technology).
- State Persistence: OAuth 1.0a access tokens and university profiles are safely persisted in a local configuration file (e.g.,
~/.usos-mcp.json) securely on the student's system.
Contributing
We welcome contributions! This server is built with a modular registry pattern that makes adding new USOS API integrations simple.
See CONTRIBUTING.md for a guide on how to add your own tools, prompts, and resources.
Usage with MCP Clients (e.g., Cursor)
You can connect this server to any MCP-compatible client like Cursor.
Authenticating with USOS
Use the setup_user_authentication prompt to guide the user through OAuth setup. It should be run one step at a time and wait for the user's response before continuing.
Sample conversation:
Assistant: Use the `setup_user_authentication` prompt and follow these steps strictly to authenticate the user with the USOS API. Perform one step at a time and wait for the user's response before proceeding.
1. Ask the user for the name of their university.
2. Once provided, use the `usos://universities/supported` resource to find their university and its `base_url`.
3. Instruct the user to visit `<base_url>/developers`, log in, register a new application, and obtain a Consumer Key and Consumer Secret.
4. Wait for the user to provide the consumer key and secret.
5. Use the `get_oauth_request_token` tool with the found `base_url`, `consumer_key`, and `consumer_secret`.
6. Provide the `authorize_url` to the user and ask them to authorize the app and copy the PIN.
7. Wait for the user to provide the PIN.
8. Use the `get_oauth_access_token` tool with the `base_url`, `consumer_key`, `consumer_secret`, `oauth_token`, `oauth_token_secret`, and `pin`.
9. Return a JSON snippet for their MCP client config
10. Remind the user to keep these values private and restart their MCP client after saving them.
Option A: Running via PyPI (Recommended)
If you have uv installed, you can use uvx to fetch and run the package dynamically without manual installation:
"usos": {
"command": "uvx",
"args": ["--from", "usos-mcp", "server"],
"env": {
"USOS_API_BASE_URL": "...",
"USOS_API_CONSUMER_KEY": "...",
"USOS_API_CONSUMER_SECRET": "..."
}
}
Option B: Running via Docker
If you prefer not to install Python/uv locally, you can use the Docker image. The -i flag is required for MCP to communicate over standard input/output.
"usos": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "USOS_API_BASE_URL=...",
"-e", "USOS_API_CONSUMER_KEY=...",
"-e", "USOS_API_CONSUMER_SECRET=...",
"ghcr.io/skalskidaniel/usos-mcp:latest"
]
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file usos_mcp-0.3.0.tar.gz.
File metadata
- Download URL: usos_mcp-0.3.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37a65543219c8418cf871820636756e4e08e1eabb57b1235c3d4d28aa0f66b6d
|
|
| MD5 |
f527f1d9b2da1bf4e95674f669fc6cae
|
|
| BLAKE2b-256 |
e0df2bf9831f72b001513d06d1526437dc1e28e553dfbb76b11100052dba2a38
|
File details
Details for the file usos_mcp-0.3.0-py3-none-any.whl.
File metadata
- Download URL: usos_mcp-0.3.0-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31b9e99168cb2e5173a58e9a415fee8dd07ec75dbb17037399580f6a375ca2c4
|
|
| MD5 |
e17d6025871b0834e072b128875b5175
|
|
| BLAKE2b-256 |
ef7ff724886f4dcbe1a5f1a53c0c09b54546a36bdd517918236244ff0c4baa99
|