Skip to main content
Glama
yyu0310

NCCU Course MCP

by yyu0310

NCCU Course MCP

An MCP server for querying NCCU (National Chengchi University) course listings (qrysub.nccu.edu.tw) programmatically, so an AI assistant or a student can search courses in plain language instead of fighting the web UI.

Course data is fetched live from the public course API on every query; there is no local course database. The only shipped data file is dept_codes.json, a snapshot mapping department codes to names (regenerate any time with build_dept_codes.py).

Tools

  • search_all(semester, keyword="", week="", language="", dept="", kind="", core_ge="", teacher=""): school-wide flexible search. The keyword is matched server-side against course names, teachers, notes, and full course ids; narrow further by weekday, teaching language, requirement kind, core-GE flag, or exact teacher. Use this when you don't know which unit offers a course.

  • check_schedule(semester, course_ids, extra_times=[]): deterministic conflict check. Give full course ids; returns conflicts + a weekly grid. TA session times mined from course notes are included automatically.

  • list_departments(query=""): list offering-unit codes (departments, school-wide subjects, general education, PE, credit programs); filter by a name substring.

  • search_courses(semester, dept, keyword=""): courses for one offering unit.

    • semester: academic-year + term, e.g. 1151 = AY115 term 1.

    • dept: unit name or code (e.g. 財務管理學系, 357, or 107 = school-wide Economics).

  • get_syllabus(syllabus_url): fetch a course's full syllabus as plain text (description, objectives, learning outcomes, weekly schedule). Restricted to nccu.edu.tw URLs.

Every course comes with structured fields: slots (parsed period list, so models never hand-parse strings like 三CD78) and note_facts (facts mined from the free-text notes: TA session time, exam dates, department priority, add-restriction, English-taught). Query recipes and domain knowledge live in QUERY_GUIDE.md.

Related MCP server: scottylabs-mcp

Install

Using Claude Code? Paste this repo's URL and say "install this MCP server", and it will read the command below and run it for you. Otherwise, copy one command.

Runs straight from GitHub for Claude Code:

claude mcp add nccu-course -- uvx --from git+https://github.com/yyu0310/nccu-course-mcp nccu-course-mcp

Don't have uv? Install it once: curl -LsSf https://astral.sh/uv/install.sh | sh

No-uv fallback: pip only

Works with any Python 3.10+ (uses pipx to keep it isolated):

pipx install git+https://github.com/yyu0310/nccu-course-mcp
claude mcp add nccu-course -- nccu-course-mcp

Or add to any MCP client's config (e.g. Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "nccu-course": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/yyu0310/nccu-course-mcp", "nccu-course-mcp"]
    }
  }
}

From source

git clone https://github.com/yyu0310/nccu-course-mcp && cd nccu-course-mcp
python -m venv .venv && ./.venv/bin/pip install -e .
./.venv/bin/python src/nccu_course_mcp/test_server.py   # live self-test
claude mcp add nccu-course -- ./.venv/bin/nccu-course-mcp

Notes

  • The upstream server uses legacy TLS renegotiation; the client enables OP_LEGACY_SERVER_CONNECT to connect.

  • Broad queries are capped at 500 rows upstream, so queries are always scoped per department.

  • Uses only NCCU's public course catalog. It touches no private system and no login.

Available Tools

3 tools
get_syllabusA

讀取一門課的教學大綱全文(純文字)。

syllabus_url 用 search_courses 回傳的 syllabus_url 欄位。 內容含課程簡介、課程目標與學習成效、每週進度、評分方式等,可據以判斷課程性質。

ParametersJSON Schema
NameRequiredDescriptionDefault
syllabus_urlYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must cover behavioral traits. It mentions plain text output and content categories but does not disclose other aspects like authentication, rate limits, or destructive potential. Adequate but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences efficiently convey purpose, input source, and content. No redundant information; each sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and an output schema present, the description fully addresses what the tool does, how to use it, and what it returns. Complete for the given context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 0% parameter description coverage, so description adds crucial meaning by specifying that syllabus_url comes from search_courses. This compensates well for the schema's lack of detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool reads the full syllabus text of a course, listing typical contents. It distinguishes itself from siblings (list_departments, search_courses) by focusing on retrieval of detailed syllabus data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs that syllabus_url should come from search_courses, providing clear sourcing direction. Lacks explicit when-not-to-use or alternative tools, but the guidance is strong given the sibling context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_departmentsA

列出政大系所代碼表(snapshot)。傳 query 以官方系名子字串篩(如『財務』『法律』;用全名非簡稱)。

回傳每筆: code(三碼)、name(中文系名)、level(大學部/研究所/學程)、course_count(snapshot 當時開課數)。 code 首碼=學院、中間碼=學制(0大學部/5碩士)、可直接餵給 search_courses。

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries burden. Mentions 'snapshot' implying read-only read, but does not explicitly state that it is non-destructive or what the snapshot entails. Could be more transparent about behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is compact, front-loaded with purpose, then parameter, then return fields. Slightly dense due to code encoding details, but still concise overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given one parameter and an output schema, description covers the core: purpose, parameter usage, return fields. Could elaborate on 'snapshot' meaning or limitations, but adequate for the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but description fully explains the query parameter: default empty, filters by official department name substring, and gives examples ('財務', '法律'). Adds meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool lists department codes (snapshot) and distinguishes from siblings like search_courses and get_syllabus by specifying the resource (department codes) and the operation (list).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides guidance on using the query parameter for filtering by official department name substring, with examples. Also hints that the code can be fed to search_courses. Lacks explicit when-not-to-use scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_coursesA

查某系所某學期的開課清單(即時查政大 API)。

參數: semester: 學期碼,格式『學年+學期』,如 1151 = 115學年第1學期、1142 = 114學年第2學期。 dept: 系所中文名或三碼代碼,如『財務管理學系』或『357』。用 list_departments 查代碼。 keyword: 選填。以關鍵字篩課名/教師/備註(如『交易』『個案』)。

回傳: {semester, dept_code, dept_name, count, courses:[...]}。 每門課含 course_id/name/teacher/time/credits/kind/target/classroom/language/note/ remain_url(即時餘額需另開)/syllabus_url。

ParametersJSON Schema
NameRequiredDescriptionDefault
deptYes
keywordNo
semesterYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses that the tool performs a real-time query against a specific API, describes the return structure, and notes that remain_url requires a separate action. No annotations are provided, so the description carries the burden, and it does so adequately without contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with a header, parameter list, and return format. Uses bullet points for readability. Slightly verbose but every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers all important aspects: parameters, return structure, and related tool. Lacks edge-case handling (e.g., error scenarios) but is sufficient for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description compensates by detailing each parameter with format and examples (e.g., semester format '1151', dept examples '財務管理學系' or '357', keyword optional). Adds meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb (查/查詢), resource (開課清單/courses), and scope (by department and semester). It explicitly references the API source and distinguishes from sibling tools like list_departments for department code lookup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on how to use parameters: semester format, dept as name or code, and keyword as optional. Directs the user to list_departments for code lookup. Does not specify when to avoid using this tool, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedget_syllabus
    • First observedlist_departments
    • First observedsearch_courses

TDQS

A4.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a distinct purpose: listing departments, searching courses, and retrieving syllabus. No two tools overlap in functionality.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (list_departments, search_courses, get_syllabus), making them predictable.

Tool Count4/5

Three tools is slightly minimal but appropriate for a focused read-only server. The tools cover the essential query flow without unnecessary extras.

Completeness4/5

The tool surface covers the core workflow (list departments, search courses, get syllabus). Minor gaps like direct course detail retrieval are addressed by search_courses returning rich data.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers