Skip to main content
Glama

iGuat-MCP

A read-only MCP (Model Context Protocol) service for iGuihang campus data. Built on Python, FastMCP, and Streamable HTTP, it wraps timetable, class, and campus queries into standard tools callable by AI clients.

This project only provides query capabilities and does not modify the WeChat mini program or upstream academic data.

Features

  • Get the full term list, including the current and next term

  • Search classes by major, grade, and class keyword

  • Get the timetable for a specified class, term, and week

  • Query the timetable for a specified person, removing identity fields before returning

  • Infer the campus from major information

  • Built-in TTL timetable cache, concurrency limits, and health checks

  • Protect the MCP and admin APIs with a Bearer API Key

  • Support hot-updating the upstream token through the admin API

  • Support deployment via Docker, environment variables, and Docker Secrets

Related MCP server: gaokao-helper-worker-mcp

MCP Tools

Tool

Description

get_xnxq

Get the full term list, including the current and next term

get_current_term

Get the current term

search_classes

Search classes by criteria

get_class_schedule

Get the timetable for a specified class, term, and week

get_ta_schedule

Query the timetable by name or student ID; identity fields are removed from the response

infer_major_campus

Infer the campus from major information

Tech Stack

  • Python 3.11+

  • MCP / FastMCP

  • HTTPX

  • Uvicorn

  • Pytest

  • Docker

Quick Start

Run Locally

git clone https://github.com/Strayed2SE/iGuat-MCP.git
cd iGuat-MCP

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -e ".[test]"

cp .env.example .env
# 按下方说明配置环境变量后启动
python server.py

The service listens on 0.0.0.0:8000 by default:

  • MCP: http://127.0.0.1:8000/mcp

  • Health check: http://127.0.0.1:8000/healthz

MCP client request headers:

Authorization: Bearer <MCP_PUBLIC_API_KEY>

Docker

docker build -t iguat-mcp .
docker run --rm -p 8000:8000 --env-file .env iguat-mcp

For production, use the NAME_FILE form to load sensitive configuration from Docker Secrets or read-only files:

docker run --rm -p 8000:8000 \
  -e IGUAT_USER_TOKEN_FILE=/run/secrets/iguat_token \
  -e IGUAT_MAIN_SIGN_KEY_FILE=/run/secrets/main_sign_key \
  -e MCP_PUBLIC_API_KEY_FILE=/run/secrets/public_key \
  -e MCP_ADMIN_API_KEY_FILE=/run/secrets/admin_key \
  --mount type=bind,src=/secure/secrets,dst=/run/secrets,ro \
  iguat-mcp

Configuration

Copy .env.example and set as needed:

Variable

Purpose

IGUAT_USER_TOKEN

Upstream query token

IGUAT_MAIN_SIGN_KEY

Main API signing key

IGUAT_CLASS_SIGN_KEY

Class API signing key

IGUAT_CSM_SIGN_KEY

CSM API signing key

IGUAT_ALUMNI_SIGN_KEY

Alumni API signing key

IGUAT_SITE_SIGN_KEY

Site API signing key

MCP_PUBLIC_API_KEY

MCP client access key

MCP_ADMIN_API_KEY

Admin API access key

MCP_HOST / MCP_PORT

Service listen address and port

MCP_CACHE_TTL

Timetable cache TTL in seconds; set to 0 to disable caching

MCP_MAX_CONCURRENCY

Maximum concurrency

MCP_MAX_MAJOR_CLASSES

Major class query limit

IGUAT_TRUST_ENV

Whether to read system proxy and certificate environment variables

Update Upstream Token

When the upstream token expires, admins can update the in-memory token without restarting the service:

curl -X PUT http://127.0.0.1:8000/admin/token \
  -H "Authorization: Bearer <MCP_ADMIN_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"token":"<NEW_TOKEN>"}'

Testing

pip install -e ".[test]"
pytest -q

Security Notes

  • Do not commit real tokens, signing keys, API Keys, or .env to the repository.

  • The service does not return tokens, signatures, or personally identifiable fields to MCP clients.

  • System proxy environment is not read by default; set IGUAT_TRUST_ENV=1 only if your deployment environment actually needs it.

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Read-only MCP server for ClassQuill, a tutoring-business-management platform.

  • XFA's remote MCP server — query device posture, compliance, policies & CVEs. Read-only.

  • A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Strayed2SE/iGuat-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server