
Umd Mcp
io.github.avivkellerv0.0.1更新於 Oct 1, 2026
MCP server exposing University of Maryland data
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Umd Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
umd-mcp
An MCP server exposing University of Maryland data: courses and grades (PlanetTerp, the Schedule of Classes, the Testudo student portal, ELMS), dining menus and news, Shuttle-UM routes and timetables, athletics, the campus calendar, TerpLink organizations and events, RecWell facilities, the University Senate, and the campus directory.
Development
Using with a client
Add to your MCP client config (e.g. Claude Desktop, Claude Code):
Signing in
Some UMD services need a signed-in user. The login tool opens a browser window that umd-mcp
controls (Chrome or Edge, on its own profile under ~/.umd-mcp/browser-profile) at the UMD
Shibboleth IdP, with a CAS service URL pointing at a one-shot listener on 127.0.0.1. Once the
user finishes signing in (including Duo) the IdP redirects back with a service ticket, which the
server validates against serviceValidate to learn who signed in.
While that single sign-on session is fresh, login then visits every connected service (see
below) in the same window so each app can set its own session cookie, and copies those cookies
into a per-service Session. The window closes by itself. The profile persists, so later logins
are usually silent. logout forgets everything and clears the profile's cookies.
Why a browser: CAS only issues a ticket for the service named in the login URL, and each app turns its ticket into a cookie for its own origin. The only way for the server to hold those cookies is to be the browser that receives them.
The callback host is localtest.dev.umd.edu, a public DNS name UMD IT publishes that resolves
to 127.0.0.1. It is used instead of localhost because the IdP sits behind an AWS WAF that
rejects any service URL containing localhost with a 403.
Environment variables:
UMD_MCP_BROWSER: path to a Chromium executable, if Chrome or Edge are not installed.UMD_MCP_PROFILE_DIR: where to keep the browser profile.CANVAS_TOKEN: a Canvas personal access token (from ELMS profile settings). When set, the ELMS tools use it as a bearer token and need no browser sign-in.
Tools
Tool names are <integration>_<method>, except the sign-in tools. Integrations marked
"(login)" need the login tool first; the rest work anonymously.
shibboleth
planetterp
nutrition
testudo-soc
testudo (login)
athletics
calendar
dining
directory (login)
elms (login)
recwell
senate
terplink
transportation
Adding an integration
An integration is a folder under src/integrations/ that wraps one upstream and declares the
tools it contributes:
Subclass Integration from src/integrations/base.ts, declare name and baseUrl, and mark
each tool method with @tool(). The MCP tool name is <name>_<method> (pass name in the
spec to override). Then add the class to createIntegrations() in src/integrations/index.ts.
Everything in the spec is advertised to the client so the model knows what a tool does, what it takes, and what it returns before calling it:
descriptionandtitleare passed through;annotationsare merged over the defaults (read-only, open-world).inputbecomes the tool'sinputSchema. The decorator checks at compile time that the method's parameter type accepts the parsed shape.output(optional) becomes the tool'soutputSchema. The decorator checks at compile time that the method returns a matching object. At runtime the value is validated against the shape and returned both asstructuredContentand as a JSON text block for clients that only read text. Fields not in the shape are dropped.
Conventions the existing integrations follow:
.describe()every input and output field; the text ends up in the JSON Schema the model reads. End descriptions with "No login needed." or "Requires login.".- Use
z.enumwherever the upstream's value set is known, via aCODE: 'value'table anddecode()fromsrc/common.ts, so an unexpected upstream value surfaces as a tool error. - Reuse the shared schemas in
src/common.ts(term,courseId,sectionId,weekday,isoDate,pagination, ...) and the helpers insrc/lib/:text.ts(blank-to-null trimming, joining),html.ts(HTML to plain text),scrape.ts(cheerio text, links and tables). Reach for an npm package before writing a parser by hand. this.get(path, query)fetches JSON andthis.getText()HTML relative tobaseUrl;this.request()is the general form for POSTs. HTTP errors and output-schema mismatches become tool error results automatically; overridehandleError()to customise that.
Integrations behind single sign-on
If the upstream needs a UMD login, declare a service on the integration. login then signs
in to it along with everything else, and this.get() / this.getText() / this.request()
carry the app's cookies. Before the user signs in, or after the app rejects the session, they
throw AuthRequiredError, which becomes a tool error telling the model to call login.
Project layout
來源:README.md,提交 624dc4c
工具
0版本歷史
1- v0.0.1最新Oct 1, 2026
