Slug MCP
An MCP server for banana slugs at UC Santa Cruz ππ
Ask AI about Slug MCP
Powered by Claude Β· Grounded in docs
I know everything about Slug MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
slug-mcp
An MCP server that gives AI assistants access to UC Santa Cruz campus services.
Dining menus, gym crowding, class schedules, study rooms, bus times, and more β all from one conversation.
Built with Rust and rmcp for the UCSC community.
Why?
UCSC students juggle 6+ different websites daily β PISA for classes, nutrition.sa.ucsc.edu for menus, LibCal for study rooms, campusrec for gym status, Metro for buses, the events calendar. None of them talk to each other.
slug-mcp puts all of these behind a single MCP interface. Your AI assistant can combine data across services to answer questions that no single UCSC website can:
"I have CSE 115A at 4pm in Baskin β what's for dinner nearby after class, and when's the next bus home from Science Hill?"
The assistant checks your class schedule for the room and time, pulls tonight's dining hall menus, cross-references dining hours with your class end time, and gets real-time bus ETAs from the nearest stop. One question, four services, ten seconds.
Try These
These prompts show what's possible when campus services are connected:
| Prompt | What happens behind the scenes |
|---|---|
| "I need to study for 3 hours today β find me a room near food" | Checks study room availability at both libraries, cross-references with dining hall hours and proximity, suggests a room + meal window |
| "Is it worth going to the gym right now or should I wait?" | Pulls live headcount from the rec center (updates every 2 min), checks the facility schedule for upcoming open-gym blocks |
| "What are my options for a high-protein dinner tonight?" | Gets tonight's menus across all 5 dining halls, looks up nutrition facts for the main proteins, ranks by protein-per-serving |
| "Who teaches CSE 130 and when are their office hours?" | Searches the class schedule for the instructor, then searches the campus directory for their office location and contact info |
| "I have $12 in Slug Points β where should I eat?" | Checks your meal balance, pulls current menus and dining hours, suggests halls that are open now |
| "Find me a GE class that fits between my Tuesday 10am and 2pm classes" | Searches for open GE courses in the current term filtered to TuTh, checks enrollment status, returns options that fit the gap |
| "Any cool events this week I can get to by bus?" | Searches upcoming campus events, checks bus routes and real-time ETAs from your stop |
Features
| Service | Tools |
|---|---|
| Dining | Menus for all 5 dining halls with dietary/allergen tags, nutrition facts per item, operating hours, Slug Points / Banana Bucks balance |
| Events | Search campus events by keyword or category, list upcoming events chronologically |
| Recreation | Live headcounts for gym, pool, fields, climbing wall, wellness center; facility schedules |
| Library | Study room availability at McHenry and S&E Library by time slot, room booking |
| Academics | Class search by subject, instructor, GE, course number, career level β enrollment counts, meeting times, instruction mode; faculty/staff directory |
| Classrooms | Find rooms by capacity, building, AV equipment, seating style, accessibility |
| Transit | Real-time bus arrival predictions by stop and route via Santa Cruz Metro |
| Field Research | NOAA tide predictions, NDBC buoy observations, CDIP waverider spectra, USGS real-time stream conditions, iNaturalist + eBird species observations, AirNow current AQI |
Quick Start
Prerequisites: Rust 1.75+, Chrome/Chromium (for authenticated tools only)
git clone git@github.com:pronei/slug-mcp.git
cd slug-mcp
cargo build --release
Client Setup
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"slug-mcp": {
"command": "/path/to/slug-mcp"
}
}
}
Claude Code
claude mcp add slug-mcp /path/to/slug-mcp
ChatGPT Desktop
Open ChatGPT > Settings > Beta Features > enable MCP Servers, then:
Settings > MCP Servers > Add Server > Command-line (stdio)
- Name:
slug-mcp - Command:
/path/to/slug-mcp
Any MCP-compatible client
Run /path/to/slug-mcp as a stdio subprocess β no arguments needed.
For remote connections, start the SSE server and point your client at the endpoint (see Running Your Own Server).
Authentication
Most tools work without login. Two tools require UCSC authentication:
- Meal balance β Slug Points / Banana Bucks
- Room booking β reserve study rooms
When you ask for something that needs auth, the assistant will call the login tool, which opens a Chrome window for CruzID + Duo MFA. The session is captured automatically and lasts 8 hours.
For remote/headless servers where a browser can't open, generate a portable token locally:
slug-mcp export-token # opens browser, prints base64 token
Then pass the token to the authenticate tool on the remote server.
Running Your Own Server
# Start the SSE server
./slug-mcp serve --sse --port 3000
For production, put a reverse proxy in front for TLS:
# Caddyfile
slug-mcp.example.com {
reverse_proxy localhost:3000
}
The server handles multiple concurrent clients. Each SSE session gets its own isolated auth state via the rmcp session factory. Shared resources (cache, HTTP client) are Arc-wrapped and thread-safe.
Architecture
src/
βββ main.rs # CLI (serve / export-token) + service wiring
βββ server.rs # MCP tool handlers (rmcp macros)
βββ cache.rs # Moka TTL cache
βββ auth/
β βββ mod.rs # AuthManager, SAML-aware HTTP client
β βββ browser.rs # Chrome CDP for Shibboleth + Duo login
β βββ session.rs # AES-256-GCM encrypted session storage
β βββ token.rs # Portable base64 token encode/decode
βββ dining/ # Menu scraping, nutrition, hours, balance
βββ events/ # Tribe Events REST API client
βββ recreation/ # Facility occupancy + schedules
βββ library/ # LibCal study room availability + booking
βββ academics/ # PISA class search + campus directory
βββ classrooms/ # Classroom directory + campus locations
βββ transit/ # Santa Cruz Metro real-time predictions
βββ tides/ # NOAA CO-OPS tide predictions
βββ buoy/ # NDBC realtime2 weather + ocean buoys
βββ wave_buoy/ # CDIP/NDBC .spec swell vs wind-wave
βββ usgs_water/ # USGS NWIS instantaneous stream conditions
βββ biodiversity/ # iNaturalist + eBird species observations
βββ air_quality/ # EPA AirNow current AQI by ZIP
Optional API keys
Several Santa Cruz / field-research tools need free registration with the upstream provider. Missing keys produce a friendly "not configured" message instead of erroring.
| Env var | Needed by | Get one |
|---|---|---|
SLUG_MCP_FIRMS_KEY | get_fire_detections | https://firms.modaps.eosdis.nasa.gov/api/area/ |
AIRNOW_API_KEY | get_air_quality | https://docs.airnowapi.org/ |
EBIRD_API_KEY | search_bird_observations | https://ebird.org/api/keygen |
Each module follows the pattern: scraper.rs (HTTP + HTML parsing) > mod.rs (service layer with caching) > server.rs (MCP tool handler).
