ntnu-mcp

ntnu-mcp

A read-only MCP server exposing NTNU course data to LLM assistants, enabling course catalog search, teaching schedules, weekly timetables, grade statistics, and course comparison tools.

Category
访问服务器

README

ntnu-mcp

A remote MCP server that exposes NTNU (Norwegian University of Science and Technology) course data to LLM assistants; course catalog search, teaching schedules, weekly timetables, grade statistics, course descriptions, exam logistics, and study programs with their official study plans, plus comparison tools for students choosing between courses. Runs as a Cloudflare Worker; no installation required on the client side.

Tools

Twelve tools, all read-only:

  • search_courses — free-text search of NTNU's course catalog for a given year; returns codes, names, campus, and exam dates.
  • get_course_schedule — every dated teaching activity (lectures, labs) for a course in a year, with Oslo-local times and rooms.
  • get_weekly_timetable — the recurring weekly timetable grid for a course: weekday, times, ISO-week ranges, and rooms.
  • get_grade_distribution — historical grade distribution for a course, per year and semester, with counts and percentages.
  • get_course_versions — the DBH-versioned course codes (e.g. TDT4100-1) behind a bare course code, useful when grade lookups come back empty.
  • get_semesters — NTNU's terms with ids like 26h/26v, teaching weeks, exam-period dates, and which term is current.
  • get_course_info — everything about a course except exam logistics: credits, level, campus, prerequisites, mandatory activities, content/learning outcomes, credit reductions, the study programs the teaching is planned for, contacts, and alert notices. English by default, language: "nb" for Norwegian.
  • get_exam_info — exam logistics for up to 10 courses in one call: every occasion (ordinary/re-sit) with date, start time, duration, permitted-aids code ("hjelpemiddelkode") with its meaning, exam system, and assigned rooms.
  • search_study_programs — search NTNU's ~400 study programs by text, level, and city; returns program codes for get_study_plan.
  • get_study_plan — the official plan for a program and cohort intake year: courses (codes, credits, mandatory/elective) per semester, with specialization choice points — the bridge from "I study X" to concrete course codes.
  • compare_courses — side-by-side comparison of several courses: name, campus, exam dates, weekly teaching hours, and latest grade distribution.
  • check_timetable_conflicts — pairwise check for weekly-schedule clashes and exam-date collisions across a set of courses, before registering for them.

Connecting

Paste the server's MCP URL into Claude's or ChatGPT's custom connector settings:

https://ntnu-mcp.martinsundal.no/mcp

The server requires no authentication, since it only serves public, read-only NTNU course data.

The server is also listed in the official MCP registry as io.github.MartinSA04/ntnu-mcp (see server.json); clients that browse the registry can discover it there. It is an unofficial community server, not affiliated with NTNU. Registry updates are tag-driven: npm version <patch|minor|major> && git push --follow-tags — the version script keeps server.json in sync, and the release workflow runs the check suite, deploys the Worker, re-publishes the registry entry (GitHub OIDC), and creates the GitHub Release.

Architecture

All NTNU upstream knowledge — endpoints, retry policy, parsing of the Liferay catalog, DBH grade statistics, and TP semester data — lives in the ntnu-api TypeScript client library, which this repo depends on as an npm package. Upstream fixes and new data sources land in ntnu-api, not here. This repo's only job is to call that typed client and shape its output for LLM consumption: English names with Norwegian fallback, Oslo-local timestamps, grade rows collapsed into per-term distribution tables, and guidance notes on empty results. This layering is set out in ntnu-api's TypeScript migration spec.

To keep load on NTNU's servers minimal, every upstream call is cached in two tiers (per-isolate memory in front of a shared Workers KV namespace), so each resource is fetched roughly once per TTL globally: catalog searches, timetables, and schedules for 1 hour; grade statistics and the semester list for 24 hours. KV failures degrade to memory-only caching, never to tool errors. In tests the cache runs memory-only.

Local development

Requires Node 22 (pinned via mise).

mise install     # installs the pinned Node version
npm install

Common tasks, available both as mise tasks and npm scripts:

mise run dev          # npm run dev       — wrangler dev, local worker with hot reload
mise run test          # npm test          — vitest, over captured fixtures (no live network)
mise run typecheck     # npm run typecheck — tsc --noEmit
mise run lint          # npm run lint      — biome check
mise run fmt           # npm run fmt       — biome check --write
mise run check         # lint + typecheck + test

Tests run under plain Node (not the Workers pool) with vitest, driving the tool functions directly against fetch fixtures captured verbatim from ntnu-api's test suite — no calls to real NTNU services are made in CI or locally.

Deploy

Pushes to main deploy automatically (the repo is connected to Cloudflare Workers Builds). For a manual deploy from a checkout:

npm run deploy   # wrangler deploy

Runs on Cloudflare's free plan: the MCP session state is backed by a Durable Object using SQLite storage, which is available on the free tier (no Workers Paid subscription required unless per-request CPU limits are hit at scale).

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选