UMich Dining

io.github.esreddy2由 GitHub 帳號 esreddy2 發布v2.0.0更新於 Oct 29, 2026

Menus, traits, allergens, nutrition and hours of the ten University of Michigan dining halls.

已驗證Streamable HTTP可網頁執行位置與生活網頁搜尋與抓取

概覽

AI 產生的概覽

讀取密西根大學餐廳的即時菜單、營業時間、餐點屬性、過敏原與營養資訊,供助理查詢。

可以做什麼
  • 列出十間餐廳的地址、聯絡方式、無麩質食品櫃狀況以及目前是否供餐
  • 依餐期、餐檯與餐點取得某間餐廳的菜單,含屬性、過敏原、營養密度與碳足跡等級
  • 依餐點名稱在全部或指定餐廳搜尋,並依過敏原、屬性、營養素、熱量或碳足跡篩選菜單
  • 查詢某天的供餐時段及每週固定時間表,並找出目前正在供餐的餐廳
  • 取得單一餐點的完整營養標示,並以資源形式讀取餐廳清單與過敏原/屬性分類表
適用情境
適合學生、教職員與訪客詢問密西根大學某間餐廳正在供應什麼、哪些餐點是純素、清真或無麩質、某道餐點的熱量或鈉含量,以及餐廳何時營業。它只涵蓋一所學校,與密西根大學餐飲無關的問題幫助不大。
執行需求
可作為託管的 Streamable HTTP 端點使用,也可透過 npx 在本機執行,需要 Node.js 20.18.1 或更新版本;不需帳號、API 金鑰或身分驗證。需要能連線至餐飲網站的網路。選用環境變數可調整 User-Agent、基礎網址、時區、逾時、快取目錄與範圍抓取上限。
安裝前請注意
過敏原標記來自網站,不區分「含有」與「可能含有」,沒有成分表,缺少標記也不代表不含該過敏原;沒有任何工具聲稱餐點安全,請以現場標示為準。資料擷取自第三方網站,可能過期或不完整,範圍查詢可能只回傳部分結果。除非關閉,否則會在本機寫入磁碟快取。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 UMich Dining,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.esreddy2%2Fumich-dining-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "umich-dining": {
      "type": "http",
      "url": "https://umich-dining-mcp.duckdns.org/mcp"
    }
  }
}

README

umich-dining-mcp

[npm] [CI] [Live site]

An MCP server for the dining halls of the University of Michigan in Ann Arbor. It answers what is being served, which dishes are vegan or halal, what a dish contains, how many calories it has, and when each hall is open.

Every answer is read live from dining.umich.edu. Pages are kept in memory for a few minutes so that ten questions cost one visit, but nothing is written to disk and no menu is mirrored.

TransportsLocal stdio and hosted Streamable HTTP
RuntimeNode.js 20.18.1 or newer
Hallsthe ten dining halls
Registryio.github.esreddy2/umich-dining-mcp

Install

bash
npm install -g umich-dining-mcp

or run it without installing anything:

bash
npx -y umich-dining-mcp

Claude Code

bash
claude mcp add umich-dining -- npx -y umich-dining-mcp

Cursor

~/.cursor/mcp.json:

json
{  "mcpServers": {    "umich-dining": {      "command": "npx",      "args": ["-y", "umich-dining-mcp"]    }  }}

VS Code

.vscode/mcp.json:

json
{  "servers": {    "umich-dining": {      "type": "stdio",      "command": "npx",      "args": ["-y", "umich-dining-mcp"]    }  }}

Any other client that starts MCP servers over stdio takes the same mcpServers entry as Cursor, with npx -y umich-dining-mcp as the command.

Tools

ToolWhat it does
list_locationsThe ten halls with address, phone, e-mail, map link, today's service periods, whether they are open right now, and whether they have a gluten-free pantry.
get_menuThe menu of one hall for the meal it is serving right now: meals, stations and dishes, with the coded traits and allergens, the density and carbon tiers, the calories and the serving size. Name one meal or several to get them instead.
search_dishesFind dishes by name, in the halls that are named or across all of them (case-insensitive substring match), on one day or over a range.
filter_dishesFilter the menus by allergen, trait, nutrient density, carbon footprint, nutrients, calories and sodium, in the halls that are named or across all of them, on one day or over a range.
list_nutrition_fieldsThe supported nutrient names, their units and the Daily Value basis of the micronutrients.
get_hoursThe service periods of a day plus the regular weekly schedule. A hall that cannot be read is reported in failures; the others are still returned.
find_open_nowWhich halls are serving at a given time of day.
get_item_nutritionThe full nutrition panel of a single dish.

Resources

ResourceContent
umich://dining-hallsThe hall registry as JSON, with the code of every hall.
umich://taxonomyThe 15 allergens and 14 traits with their codes and display labels, the trait implication closure and the allergen caveat.

Example questions

What is serving at Bursley for dinner tonight?
Which halls are open right now?
Find vegan dishes at South Quad that do not contain soy.
What are the ingredients of the Oatmeal at Bursley? How many calories?
When is Markley open on Saturday?
Show me dishes with more than 500 mg of sodium.
Which halls serve tiramisu between the 24th and the 26th?

The response contract

The rows of search_dishes and filter_dishes carry small integers instead of names, and a key block at the top of the response maps every code back to its slug. The key lists only what that response uses. The codes are frozen for the life of the contract.

json
{  "key": { "halls": { "1": "bursley" }, "meals": { "3": "Lunch" },           "stations": { "7": "Grill" }, "traits": { "5": "vegan" },           "allergens": { "7": "milk" } },  "units": { "calories": "kcal", "protein": "g" },  "note": "Allergen codes: check key.allergens before reporting; site data is advisory.",  "date": "2026-10-21",  "matches": [    [1, 3, 7, "Grilled Chicken", [5], [7], 3, 320, "1 Each (113g)", 113, 32]  ]}

A row is an array; its fixed positions are named in each tool description and the variable nutrient tail is carried once per response as nutrients. The member names of a named row are two and a half times the data of the row, repeated on every row: a named row cost 216 bytes, an array row costs 72.

  • The halls are 1..10 in the order of the registry below, the meals are 1 (Breakfast), 2 (Brunch), 3 (Lunch) and 4 (Dinner), the allergens are 1..15 and the six boolean traits are 1..6 (glutenfree, halal, kosher, spicy, vegan, vegetarian). A meal label the site invents takes the next free code, from 5. The stations have a frozen vocabulary too: the same station carries the same code in every response, so a code can be remembered.
  • mhealthyTier is 1 (Nutrient Dense Low) to 5 (Nutrient Dense High). The scale is fixed and described in the tool descriptions and in umich://taxonomy.
  • A row carries the carbon tier (carbonFootprint) only when the call constrains it with max_carbon or sorts by carbonFootprint; otherwise it is left out to keep the row small.
  • The traits array carries the six boolean traits only; the density tier is lifted into its own numeric field.
  • The units map gives the unit of every nutrient the response returns. A micronutrient is an amount like every other nutrient: the site publishes the percent of the Daily Value, and the row carries the amount that percent stands for — 15 %DV of an 18 mg Daily Value of iron is 2.7 in mg. The percent is still available under its own name, %DV, in a threshold.
  • A search or a filter takes the halls it covers: one hall, several halls, or no hall at all for every one of them. The rows come back in the order that was asked for, and limit takes the first of them: the default is 50 rows, and the answer says how many matched and how to see the rest.
  • The row always carries the calories and the serving size. Every other nutrient, the sodium included, is asked for by name with include_nutrients — the sodium has nothing that makes it more interesting than the protein. A nutrient a filter constrained is always returned, whether or not it was asked for.
  • A single-day response carries date; a range response carries dateRange and each row carries the dates it appeared on.
  • A dish without a published value is reported as null, never as zero. A trace or a < value is not a value at all.

get_menu and the sweep tools return the same compact row, so a row means the same thing wherever it is read. get_item_nutrition is the tool that returns the raw nutrition panel, of one dish.

A whole menu is far smaller this way: the menu of South Quad went from 60,266 bytes to 8,817, and the menu of Bursley from 42,141 to 6,573. The panel of a single dish is one call to get_item_nutrition.

The halls

idHallidHall
bursleyBursleysouth-quadSouth Quad
east-quadEast Quadtwigs-at-oxfordTwigs at Oxford
markleyMarkleywolverine-villageWolverine Village
mosher-jordanMosher-Jordanlawyers-clubLawyers Club
north-quadNorth Quadmartha-cookMartha Cook

The id is what get_menu, get_hours and search_dishes expect. The code of a hall is its position in this list, counted from one.

Dates

The site publishes menus from three days ago to fourteen days ahead. Outside that range the site does not answer with an error, it answers with a different day's menu, so a date outside the range is refused before anything is fetched, with a message that names the range the site offers. When the page states which day it rendered, that day is compared with the one you asked for and a mismatch is an error rather than a wrong answer.

A range is asked for with from and to; to omitted means the last published day. The two cannot be combined with date. A range that does not fit in one call is read in windows with offset; the coverage block of the answer names the offset of the next window.

Time

Every time the server reports is campus time: the time zone of Ann Arbor, America/Detroit, which is Eastern Standard Time and Eastern Daylight Time in the summer. The day the site publishes, the mealtimes, and the "today" of a cache entry are all read in that zone.

The zone of the machine the server runs on does not matter. A server in Chicago and a server in UTC answer the same question the same way, and the test suite checks that by running the meal selection under several host zones. Set UMICH_DINING_TIMEZONE only to point the server at a mirror of the site in another zone.

Filters

ParameterMeaning
exclude_allergensKeeps only the dishes that do not carry any of the listed allergens.
require_traitsKeeps only the dishes that carry every listed trait.
min_mhealthyMinimum nutrient-density tier, 1..5 (3 = "Nutrient Dense Medium or better").
max_carbonMaximum carbon footprint: 1 (low), 2 (medium) or 3 (high).
nutrientsA range per nutrient, e.g. {"protein": {"min": 20, "unit": "g"}}. The unit defaults to the nutrient's own and is checked.
include_nutrientsThe nutrients to return, by canonical key or by published name, or all. Defaults to the ones the filter used; a constrained nutrient is always returned.
queryA case-insensitive substring of the dish name.
meal, stationNarrow the sweep to one meal or one station.
sort_by, sort_orderThe field to sort on and the direction.

A constraint on a nutrient excludes the dishes that publish no value for it: an unknown value is never a zero.

The cost of a range

A range query reads one page per hall per day, and the site is fetched at most two pages a second. A query that needs more upstream pages than UMICH_DINING_MAX_RANGE_FETCHES (default 12) returns the rows it could serve and a coverage block that says how much was served:

json
"coverage": { "requested": 30, "cached": 18, "fetchedNow": 12, "pending": 0, "failed": 0,              "stale": 0, "offset": 0, "pages": 30, "nextOffset": null }

The numbers add up: every page the query asked for was cached, fetched, left pending or failed. nextOffset is where the rest of the range begins, so a wide range is read in windows: ask again with offset set to that number.

The persistent cache exists for this: the pages of the published window are kept on disk and warmed in the background, so a range query is usually served without touching the site.

Allergens

Allergen data is only as good as the site. The menu page flags the allergens the kitchen reported for a dish, but it does not distinguish "contains" from "may contain", there are no ingredient lists, and a missing flag is not an absence of the allergen. The site's own guidance is: "Look for the signs posted near each food serving area for a list of menu options with allergens highlighted in red." "Gluten Free" means the dish is made without gluten, not that it is safe for someone with coeliac disease. Dedicated gluten-free pantries exist at South Quad, East Quad, Mosher-Jordan and Bursley.

The caveat is in the description of every tool that returns allergen data and in umich://taxonomy. A response that carries allergens repeats one line reminding the reader to resolve the codes; the long caveat is not repeated in every body. No tool ever claims that a dish is safe.

Two further points about the traits, because the site is careful about them: a vegan dish is reported as vegetarian as well, since the site keeps the two apart, and no other trait implies another (halal does not imply vegetarian, and neither does kosher).

Configuration

Environment variableDefaultMeaning
UMICH_DINING_USER_AGENTpython-requests/2.32.3The User-Agent to use.
UMICH_DINING_BASE_URLhttps://dining.umich.eduThe site to read.
UMICH_DINING_TIMEZONEAmerica/DetroitThe time zone of the campus: the day the site publishes and the mealtimes are read in it.
UMICH_DINING_TIMEOUT_MS20000Per-request timeout.
UMICH_DINING_MAX_RETRIES3Retries after the first attempt.
UMICH_DINING_MAX_CONCURRENCY2Requests in flight.
UMICH_DINING_MIN_GAP_MS500Minimum gap between requests.
UMICH_DINING_TTL_TODAY_MS900000Cache lifetime of today's menu.
UMICH_DINING_TTL_FUTURE_MS21600000Cache lifetime of a future menu.
UMICH_DINING_TTL_PAST_MS86400000Cache lifetime of a past menu.
UMICH_DINING_TTL_REGULAR_HOURS_MS86400000Cache lifetime of the weekly schedule.
UMICH_DINING_MAX_RANGE_FETCHES12Upstream pages a single range query may fetch.
UMICH_DINING_CACHE_DIR~/.cache/umich-dining-mcpThe persistent cache. off switches it off.
UMICH_DINING_CACHE_MAX_AGE_DAYS30How long a cache entry is kept.
UMICH_DINING_CACHE_MAX_SIZE_MB200The largest the persistent cache may grow.
UMICH_DINING_CACHE_PRUNE_INTERVAL_MS3600000How often the persistent cache is pruned.

How it treats the site

dining.umich.edu is somebody else's website, so the server stays gentle with it:

  • Two requests in flight, 500 ms apart at most. The limit is global to the process.
  • A cache with in-flight de-duplication. Ten questions about the same hall cost one request. Today's menu is cached for 15 minutes, a future menu for 6 hours, a past menu for 24 hours and the weekly hours for 24 hours.
  • Stale on error. If the site cannot be reached and a cached copy exists, the copy is served and marked as stale instead of failing the question.
  • One User-Agent. The site answers HTTP 200 to a small set of clients only; python-requests/2.32.3 is the one that has been measured to work, while a generic fetch agent and a headless browser both get 403. It is not the server's real identity, which is why it is configurable.

Occupancy

get_dining_occupancy reports real-time fullness for the halls that carry sensors (Bursley, East Quad, South Quad, Mosher-Jordan, Twigs at Oxford):

json
{ "hall": "bursley" }

It returns the current count, daily patron flow, total capacity, percent full, and the time of the reading. A hall with no sensor is simply omitted.

Short forms

Hall names, nutrients, and traits accept short, case-insensitive aliases:

  • Halls: mojo, south, east, lawyers, cook, twigs, wovlerine, ...
  • Nutrients: cals, kcals, carbs, fiber, protein/prot, na/salt, ...
  • Traits: gf, veg.

Descriptions are unchanged; the server resolves the alias before validating.

Data source

Menus, hours, locations, nutrition, and occupancy are read from the U-M dining mobile API, with the public site scraper retained as a fallback. Answers are still read live and cached for a few minutes.

Contributing

Pull requests are welcome. The test suite, the fixtures and the release process are described in CONTRIBUTING.md.

License

MIT, see LICENSE.

來源:README.md,提交 7087e0d

工具

7

list_locations

List dining halls

List the ten University of Michigan dining halls with their address, phone, e-mail, map link, the service periods published for the requested day, whether they are serving right now, and whether they have a gluten-free pantry. Cafes, markets, bakeries, grills, prices and meal plans are out of scope.

輸入參數date

get_menu

Get a dining hall menu

Get the menu of one dining hall: meals, stations and dishes, with each dish's traits (Vegan, Halal, Gluten Free, Nutrient Dense tier, Carbon Footprint tier), allergens and nutrition panel. The date defaults to today; the site publishes menus for today-3 days to today+14 days.

輸入參數datehall必填meal

search_dishes

Search dishes

Search dish names across the dining halls, or within one hall. The match is a case-insensitive substring match on the dish name.

輸入參數datehalllimitquery必填

filter_dishes

Filter dishes

Filter the dining hall menus by allergen, trait, nutrient density, carbon footprint and calories. exclude_allergens removes dishes that carry any of the listed allergens; require_traits keeps only dishes that carry every listed trait; min_mhealthy is the lowest acceptable nutrient-density tier (3 = Nutrient Dense Medium or better); max_carbon is the highest acceptable carbon footprint; max_calories and max_sodium_mg are numeric caps that exclude dishes without published values. Allergen data is only as good as the site. The menu page flags the allergens the kitchen reported for a dish, but the data does not distinguish "contains" from "may contain", there are no ingredient lists, and it is not safe to treat a missing flag as an absence of the allergen. The site's own guidance is: "Look for the signs posted near each food serving area for a list of menu options with allergens highlighted in red." The "Gluten Free" trait means the dish is made without gluten, not that it is safe for someone with coeliac disease. Dedicated gluten-free pantries exist only at South Quad, East Quad, Mosher-Jordan and Bursley.

輸入參數datehalllimitmax_carbonmax_caloriesmin_mhealthymax_sodium_mgrequire_traitsexclude_allergens

get_hours

Get dining hall hours

Get the service periods published for a dining hall on the requested day, together with the hall's regular weekly schedule. Without a hall argument every hall is returned.

輸入參數datehall

find_open_now

Find halls that are open now

Return the dining halls that are serving at the current time, and the ones that are not, with the service periods of today.

無需輸入參數。

get_item_nutrition

Get a dish nutrition panel

Get the full nutrition panel of one dish, including the serving size, calories, the fat, cholesterol, sodium, carbohydrate and protein values and the micronutrients. The dish name is matched case-insensitively; an exact match wins, otherwise a unique substring match is used and an ambiguous name is reported rather than guessed.

輸入參數datehall必填item必填

版本歷史

2
  1. v2.0.0最新Oct 29, 2026
  2. v0.1.1Oct 21, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分