ucsd-study-room
Automate UCSD study room booking at Price Center, Geisel Library, and WongAvery Library with your AI assistant or from the terminal.
What you can do:
- Search available rooms by date, time, location, and group size
- Book a room instantly
- Cancel reservations: Price Center with a reason, library rooms with the link from the confirmation email
- View your current reservations
Works with Claude Code, Codex CLI, Gemini CLI, Cursor, and any MCP-compatible client.
Supported Locations
| Location | Search | Book | View | Cancel |
|---|---|---|---|---|
| Price Center Study Rooms 1-8 | Yes | Yes | Yes | Yes |
| Geisel Library study rooms | Yes | Yes | Bookings made with this tool | With the link from the confirmation email |
| WongAvery Library study rooms | Yes | Yes | Bookings made with this tool | With the link from the confirmation email |
Library rooms are booked in 30-minute steps (start and end on :00 or :30), and the library applies its own booking limits.
The library's site has no page that lists your bookings, so this tool keeps its own record of the library rooms it books (~/.study-room/library_bookings.json). Bookings you make or cancel on the library website are not reflected in it. An AI assistant that can read your mail can pass the cancel links from the library's confirmation emails to check those bookings exactly.
Quick Start
Claude Code (Recommended)
Install as a plugin — no manual setup needed:
claude /plugin marketplace add TheoLee021/claude-plugins
claude /plugin install ucsd-study-room
The MCP server fetches the latest version from PyPI on each launch. To also receive plugin (skill) updates automatically, run /plugin, open Marketplaces, select theo-plugins, and choose Enable auto-update. Or update manually with /plugin marketplace update theo-plugins.
Then set up your account:
study-room config --name "Your Name" --email "you@ucsd.edu"
study-room login
That's it. Ask Claude: "Book a study room tomorrow from 2pm to 4pm"
Other MCP Clients
If you're using another MCP-compatible AI assistant (Codex CLI, Gemini CLI, Cursor, etc.), simply copy and paste this prompt:
Install the ucsd-study-room MCP server:
1. Run: uv tool install ucsd-study-room && uvx --from ucsd-study-room playwright install chromium
2. Add "study-room" to your MCP config: {"command": "uvx", "args": ["--from", "ucsd-study-room", "study-room-mcp"]}
3. Run: study-room config --name "MY NAME" --email "MY_EMAIL@ucsd.edu"
4. Run: study-room login
Replace MY NAME and MY_EMAIL@ucsd.edu with your actual name and UCSD email before pasting. Your AI assistant will handle the rest.
Once set up, just ask your AI assistant in natural language:
- "Search for available study rooms tomorrow from 2pm to 4pm"
- "Book Price Center Study Room on March 11 from 3pm to 5pm"
- "Find a room in Geisel for 4 people this Friday from 1pm to 3pm and book it"
- "Cancel my reservation on March 13"
- "Show my current reservations"
Requirements
- Python 3.11 or later
- Google Chrome installed
- UCSD account with Duo Push enabled
Platform Support
| Platform | Status | Notes |
|---|---|---|
| macOS | Fully supported | Credentials stored in Keychain |
| Windows | Supported | Credentials stored in Windows Credential Locker |
| Linux | Supported | Requires gnome-keyring or kwallet for credential storage; falls back to manual login if unavailable. Run playwright install --with-deps chromium for system dependencies. |
Manual Installation
uv tool install ucsd-study-room
uvx --from ucsd-study-room playwright install chromium
Alternative: pip install
pip install ucsd-study-room
playwright install chromium
If using pip, configure the MCP server with:
{
"study-room": {
"command": "study-room-mcp"
}
}
Updating
study-room update
Or manually: uv tool install ucsd-study-room@latest
Initial Setup
1. Set your contact info (required before booking):
study-room config --name "Your Name" --email "you@ucsd.edu"
2. Log in with your UCSD credentials (first time only):
study-room login
Enter your UCSD SSO credentials when prompted, then approve the Duo Push notification on your phone. Login runs in a headless browser — no window opens. Your session and credentials are saved for future use.
MCP Server Setup
The MCP server communicates over stdio and works with any MCP-compatible client. Add the following to your client's MCP configuration:
{
"study-room": {
"command": "uvx",
"args": ["--from", "ucsd-study-room", "study-room-mcp"]
}
}
Compatible Clients
| Client | Type | Config Location |
|---|---|---|
| Claude Code / Codex CLI / Gemini CLI | CLI | Each CLI's config file |
| Claude Desktop / Codex Desktop | Desktop App | Each app's settings |
| Cursor / Windsurf / Antigravity / Cline | IDE | Each IDE's MCP settings |
Once configured, you can use natural language to manage bookings:
- "Search for available study rooms tomorrow from 2pm to 4pm"
- "Book Price Center Study Room 3 on March 11 from 3pm to 5pm"
- "Cancel my reservation on March 13"
- "Are there any rooms open this Friday afternoon?"
Available MCP Tools
| Tool | Description |
|---|---|
search_rooms |
Search for available rooms by date and time range, optionally by location and group size |
book_room |
Book a specific room at any location (use after search_rooms) |
cancel_reservation |
Cancel a Price Center reservation by ID or date with a cancel reason, or a library booking with its cancel link |
my_events |
List current reservations at every location; optionally check library bookings by cancel link and show past ones |
login |
Authenticate via UCSD SSO + Duo Push |
CLI Usage
Commands
| Command | Description |
|---|---|
study-room login |
SSO login with Duo Push (headless) |
study-room search |
Search available rooms with --date, --start, --end; narrow with --location, --people |
study-room search --book |
Search and book a room interactively |
study-room cancel |
Cancel a reservation interactively or with --date, --reason; a library booking with --link |
study-room events |
Show current reservations at every location; --past adds past library bookings |
study-room config |
View or set user info (--name, --email, --attendees) |
study-room status |
Check whether the current session is valid |
study-room update |
Update to the latest version from PyPI |
Examples
Search for available rooms:
study-room search --date 2026-03-11 --start 15:00 --end 17:00
Search one location for a group:
study-room search --date 2026-03-11 --start 15:00 --end 17:00 --location geisel --people 4
--location is one of price_center, geisel, wongavery. Without it, every location is searched.
Search and book interactively:
study-room search --date 2026-03-11 --start 15:00 --end 17:00 --book
study-room search --date 2026-03-11 --start 15:00 --end 17:00 --location wongavery --book
Cancel a reservation:
study-room cancel # interactive selection
study-room cancel --date 2026-03-13 # by date (prompts for reason)
study-room cancel --date 2026-03-13 --reason "Changed Date"
study-room cancel --link "https://ucsd.libcal.com/equipment/cancel?id=..." # library booking
A library booking is cancelled with the "To cancel this booking visit" link in the library's confirmation email. Picking a library booking in the interactive list asks for that link.
How It Works
- Browser automation -- Uses Playwright with real Chrome (
channel="chrome") in headless mode to interact with the EMS Cloud booking system. - Authentication -- Navigates to the UCSD SAML SSO page, submits credentials, and waits for Duo Push approval. The whole flow, including Duo's "trust this device" prompt, runs headless.
- Session management -- After authentication, cookies and browser storage state are saved to
~/.study-room/. Credentials are stored in the system keyring via thekeyringlibrary (macOS Keychain, Windows Credential Locker, or Linux SecretService). Sessions are valid for 7 days. - Auto re-login -- When a session expires during a search or booking operation, the tool loads credentials from the system keyring and re-authenticates with Duo Push in the same headless browser.
- Room search (Price Center) -- Navigates to the EMS booking page, fills in date and time fields, and parses available rooms by inspecting the DOM for booking buttons.
- Booking (Price Center) -- Clicks the add-to-cart button for the selected room, fills in the reservation form (name, email, terms), and submits the reservation.
- Cancellation -- Navigates to My Events, clicks the reservation link, selects a cancel reason from the dropdown, and confirms the cancellation.
- Library rooms -- Geisel and WongAvery rooms come from the library's LibCal site instead of EMS. Search reads LibCal's public availability data, so it needs no login or browser. Booking selects the time, signs in with the same UCSD SSO session in a headless browser, and submits LibCal's booking form. Each confirmed booking is written to a local record, which is what
eventslists; before listing, the record is compared with LibCal's public availability and a booking whose time is open again is marked cancelled. Cancelling reads the cancel link's page and posts the cancellation, with no login or browser.
Configuration
Configuration is stored in ~/.study-room/config.yaml. Default target rooms are Price Center Study Room 1 through 8.
name: "Your Name"
email: "you@ucsd.edu"
default_attendees: 1
rooms:
- Price Center Study Room 1
- Price Center Study Room 2
- Price Center Study Room 3
- Price Center Study Room 4
- Price Center Study Room 5
- Price Center Study Room 6
- Price Center Study Room 7
- Price Center Study Room 8
Contributing
Contributions are welcome. To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes
- Push to the branch and open a pull request
Please make sure existing tests pass before submitting.
License
This project is licensed under the MIT License. See LICENSE for details.
Metadata
Release files for ucsd-study-room 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ucsd_study_room-0.6.0.tar.gz | 61.2 kB | Without provenance | Details for ucsd_study_room-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ucsd_study_room-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for ucsd_study_room-0.6.0-py3-none-any.whl |
Total release size: 103.7 kB
Release files / ucsd_study_room-0.6.0.tar.gz
| Download URL | ucsd_study_room-0.6.0.tar.gz |
|---|---|
| Size | 61.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3f56147828b76739a644a55fa278e1814d056102eae67a20f6b2b1111d5e847
|
|
BLAKE2b-256 checksum How to use checksums |
c240f6426310b8ebba61bd231183055150fa6225a550e68c8affdf2dd47b26d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ucsd_study_room-0.6.0-py3-none-any.whl
| Download URL | ucsd_study_room-0.6.0-py3-none-any.whl |
|---|---|
| Size | 42.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83cd4a7361d5ebaaf63cb90903743b7d8ba4e2eb759bb400779a325ef4898fe7
|
|
BLAKE2b-256 checksum How to use checksums |
4914778b3e13c2bd29fd98432353b345f33164502e346e928a14768c49bfef01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for ucsd-study-room 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.