MCP Canteen Server
The MCP Canteen Server allows you to retrieve employee canteen attendance data with the following capabilities:
Query meal attendance: Get breakfast, lunch, and total meal counts for specified date ranges
Date specification options:
Custom date ranges using
start_dateandend_datein YYYYMMDD formatRelative periods like
today,yesterday,this_week,last_month
API integration: Requires proper environment variables for authentication
Error handling: Provides diagnostic information for various failure scenarios
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Canteen Servershow me lunch attendance for this week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
餐厅数据 MCP Server
本服务用于查询职工餐厅就餐人数数据,提供指定日期范围内的早餐和午餐就餐人数统计。
docs: https://modelcontextprotocol.io/quickstart/server
安装
通过 pip 安装
pip install mcp-server-canteen通过 uv 安装
uv pip install mcp-server-canteen开发环境安装
git clone https://github.com/wrdan/mcp-server-canteen.git
cd mcp-server-canteen
uv pip install -e .Related MCP server: mit-dining-mcp
环境变量配置
在使用服务之前,需要配置以下环境变量:
CANTEEN_API_TOKEN: API认证令牌CANTEEN_API_BASE: API基础URL
环境变量获取方式
联系系统管理员获取 API 认证令牌
API基础URL通常由系统管理员提供
设置环境变量
Windows
set CANTEEN_API_TOKEN=your_token
set CANTEEN_API_BASE=your_base_urlLinux/Mac
export CANTEEN_API_TOKEN=your_token
export CANTEEN_API_BASE=your_base_url服务运行
使用 uv 运行
uv run mcp-server-canteen使用 Python 运行
python -m mcp_server_canteen.server功能说明
服务提供以下功能:
get_canteen_data: 查询指定日期范围内的餐厅就餐人数数据参数:
start_date: 开始日期,格式为YYYYMMDD(如20250331)end_date: 结束日期,格式为YYYYMMDD(如20250331)period: 相对时间范围,可选值:today: 今天yesterday: 昨天day_before_yesterday: 前天this_week: 本周last_week: 上周this_month: 本月last_month: 上月
返回: 包含早餐人数、午餐人数和总计人数的文本统计
使用 Claude for Desktop 作为客户端测试
配置
打开并编辑文件: ~/Library/Application\ Support/Claude/claude_desktop_config.json,内容如下:
"mcpServers": {
"canteen": {
"command": "uvx",
"args": ["mcp-server-canteen"],
"env": {
"CANTEEN_API_TOKEN": "CANTEEN_API_TOKEN",
"CANTEEN_API_BASE": "ANTEEN_API_BASE"
}
}
}"mcpServers": {
"canteen": {
"command": "uv",
"args": ["run", "mcp-server-canteen"],
"env": {
"CANTEEN_API_TOKEN": "CANTEEN_API_TOKEN",
"CANTEEN_API_BASE": "ANTEEN_API_BASE"
}
}
}"mcpServers": {
"canteen": {
"command": "python",
"args": ["-m", "mcp-server-canteen.server"],
"env": {
"CANTEEN_API_TOKEN": "CANTEEN_API_TOKEN",
"CANTEEN_API_BASE": "ANTEEN_API_BASE"
}
}
}重启 Claude for Desktop
重启不报错,且有锤子图标显示可用的 MCP Tool,即为成功;否则,查看日志排查
错误处理
常见错误及解决方案
环境变量未设置
错误信息:
缺少必要的环境变量配置解决方案:确保已正确设置所有必需的环境变量
日期格式错误
错误信息:
日期格式不正确,请使用YYYYMMDD格式解决方案:检查日期格式是否正确,例如:20240321
API请求失败
错误信息:
HTTP请求失败或API返回错误解决方案:
检查网络连接
验证API令牌是否正确
确认API基础URL是否正确
服务器连接失败
错误信息:
无法连接到MCP服务器解决方案:
确保服务器正在运行
检查端口是否被占用
验证配置文件是否正确
Claude for Desktop 日志
日志文件夹:~/Library/Logs/Claude
来自具体 MCP Server 的日志:mcp-server-canteen.log
MCP 连接通用日志:mcp.log
工作原理
客户将您的查询发送给 Claude
Claude 分析可用的工具并决定使用哪一个
客户端通过 MCP 服务器执行所选工具
结果被发回给 Claude
Claude 制定了自然语言响应
答案已经展示给你了!
Available Tools
1 toolget_canteen_dataC
获取餐厅就餐人数数据
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | No | ||
| period | No | ||
| start_date | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. The description only states it 'gets data' without revealing whether this is a read-only operation, whether it requires authentication, what rate limits might apply, what format the data returns in, or any error conditions. For a data retrieval tool with 3 parameters and no annotation coverage, this is insufficient behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - a single Chinese phrase that directly states the tool's function. There's no wasted language or unnecessary elaboration. While it may be too brief for complete understanding, as a standalone statement it's efficiently structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 3 parameters with 0% schema coverage, no annotations, no output schema, and no sibling tools, the description is incomplete. It doesn't explain what the parameters mean, what data format is returned, any behavioral constraints, or usage context. For a data retrieval tool with multiple filtering parameters, this minimal description leaves too many unanswered questions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, meaning none of the 3 parameters (start_date, end_date, period) have descriptions in the schema. The tool description provides absolutely no information about these parameters - it doesn't mention date ranges, time periods, or any filtering criteria. The description fails to compensate for the complete lack of schema documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '获取餐厅就餐人数数据' (Get canteen dining population data) states a clear purpose - retrieving data about restaurant/canteen attendance. It includes a verb ('获取' - get) and resource ('餐厅就餐人数数据' - canteen dining population data). However, it's somewhat vague about what specific data is returned (just 'data' without specifying format or granularity) and since there are no sibling tools, we cannot assess differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There are no sibling tools mentioned, so no comparison is possible, but the description doesn't indicate any prerequisites, constraints, or typical use cases. It simply states what the tool does without context about appropriate usage scenarios.
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 tool update
v1.0.0- First observed
get_canteen_data
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'get_canteen_data' has a clear, distinct purpose of retrieving canteen occupancy data.
The naming follows a consistent verb_noun pattern with 'get_canteen_data'. Since there is only one tool, it inherently maintains perfect consistency without any deviations or mixed conventions.
A single tool is too few for a server named 'MCP Canteen Server', which suggests a broader scope for managing canteen-related data. This minimal toolset likely leaves significant functionality gaps, such as updating or analyzing data, making it feel incomplete for the domain.
The toolset is severely incomplete for a canteen management domain. It only provides data retrieval ('get_canteen_data'), with no tools for creating, updating, or deleting data, or for other operations like menu management or reservation handling, leading to dead ends for agents.
Maintenance
Related MCP Connectors
Looks up the National Family Farming Registry (CAF) of an individual from the CPF. Platform-hosted,
Looks up the National Family Farming Registry (CAF) of a company from the CNPJ. Platform-hosted, no
Consolidates the social benefits received by an individual from the CPF. Platform-hosted, no credent
MDA CAF: Unidade Familiar de Produção Agrária (UFPA), official-source lookup. Platform-hosted, pay p
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides structured access to canteen lunch menus for specific dates through a simple API integration.110 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides real-time access to menus from all six MIT Bon Appétit dining halls. It enables users to query daily or weekly schedules and filter options by specific dietary requirements such as vegan, halal, or gluten-free.24 npm1MIT
- AlicenseAqualityDmaintenanceEnables LLMs to interact with the IIIT Hyderabad Mess System to manage meal registrations, view menus, and track billing. It supports conversational commands for tasks like cancelling meals, estimating nutrition, and checking account balances.455AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceProvides tools to interact with the strava.cz meal ordering system, enabling users to view menus, check and place orders, and manage their canteen account.1MIT