Ordio MCP
Ordio MCP——模型上下文协议服务器,向AI助手公开Ordio数据和操作。
Ordio MCP转向 订单 餐厅运营平台变成了一套结构化的工具、资源和提示,任何人工智能助手都可以使用。让克劳德(或任何有MCP能力的代理人)检查库存、起草采购订单、安排轮班或运行差异报告——这可以在您的组织范围内安全地完成。
什么是MCP?
这 模型上下文协议 是将AI助手连接到外部系统的开放标准。MCP服务器通过简单的JSON-RPC接口公开功能(工具、资源、提示);MCP客户端(如Claude Desktop、Claude Code或Windsurf)连接到服务器,并让模型代表用户调用这些功能。
亮点
- 约145个工具,涵盖库存、食谱、供应商、订单、发票、任务、团队、轮班、警报、厨房板、人工智能提取、报告和分析
- 5个组织资源,用于一目了然的上下文(配置文件、库存摘要、活动警报、团队摘要、每日指标)
- 6个提示工作流程(库存审核、采购订单工作流程、排班、日终结算、配方成本计算、新菜单项设置)
- stdio和SSE传输
- 针对Ordio REST API的严格per-request组织范围界定和Bearer-token身份验证
可用工具
工具按域分组。完整列表位于 src/tools/.
| 组 | 计数 | 示例 |
|---|---|---|
| 库存 | 6 | list_inventory, create_inventory_item, batch_update_inventory |
| 食谱 | 5 | list_recipes, create_recipe, update_recipe |
| 配方批次 | 5 | list_recipe_batches, create_recipe_batch |
| 供应商 | 5 | list_vendors, create_vendor |
| 类别 | 5 | list_categories, create_category |
| 采购订单 | 5 | list_orders, create_order |
| 发票 | 5 | list_invoices, create_invoice |
| 任务 | 5 | list_tasks, create_task |
| 团队 | 9 | list_team_members, list_departments, create_department |
| 移位 | 5 | list_shifts, create_shift |
| 轮班请求 | 5 | list_shift_requests, create_shift_request |
| 警报 | 9 | list_alerts, dismiss_alert, create_alert_configuration |
| 菜单项 | 5 | list_menu_items, create_menu_item |
| 厨房板 | 14 | list_kitchen_orders, bump_order, list_routing_rules |
| 计数会话 | 5 | list_count_sessions, create_count_session |
| 存储位置 | 5 | list_storage_locations, create_storage_location |
| 单位 | 5 | list_units, create_unit |
| 销售和劳动力 | 8 | list_sales_data, list_labor_daily_summary, list_timesheets |
| 活动 | 3 | list_activity, log_activity |
| 设置 | 4 | get_settings, upsert_setting |
| 报告 | 3 | get_variance_report, get_ap_aging_report, get_cost_analysis |
| 温度日志 | 2 | list_temperature_logs, create_temperature_log |
| 设备 | 4 | list_equipment, create_equipment |
| 人工智能与自动化 | 11 | ai_process_invoice, ai_extract_recipes, ai_generate_recipe |
| 搜索 | 1 | semantic_search |
| 分析 | 6 | inventory_health_dashboard, food_cost_analysis, daily_operations_briefing |
资源
| URI | 描述 |
|---|---|
ordio://org/profile | 组织简介和设置 |
ordio://org/inventory-summary | 项目总数,库存低,过期 |
ordio://org/active-alerts | 当前活动/未解决的警报 |
ordio://org/team-summary | 团队人数和今天的日程安排 |
ordio://org/daily-metrics | 今天的警报、任务、库存运行状况 |
提示
inventory-audit, purchase-order-workflow, shift-scheduling, end-of-day-closing, recipe-costing, new-menu-item-setup.
安装和配置
克劳德代码
claude mcp add ordio \
--env ORDIO_API_KEY=sk_live_... \
--env ORDIO_ORG_ID=org_xxxxxxxxxx \
-- node /absolute/path/to/ordio-mcp/dist/index.js克劳德桌面版
添加 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)或 %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"ordio": {
"command": "node",
"args": ["/absolute/path/to/ordio-mcp/dist/index.js"],
"env": {
"ORDIO_API_KEY": "sk_live_...",
"ORDIO_ORG_ID": "org_xxxxxxxxxx"
}
}
}
}重新启动客户端以获取新服务器。
先建造
git clone https://github.com/Abhilashachar/ordio-mcp.git
cd ordio-mcp
npm install
npm run build认证
向Ordio REST API发送的每个请求都使用 Authorization: Bearer ${ORDIO_API_KEY} 其范围为 ORDIO_ORG_ID。您需要:
| 变量 | 必填 | 默认 | 描述 |
|---|---|---|---|
ORDIO_API_KEY | yes | - | Clerk发行的API密钥用作承载令牌 |
ORDIO_ORG_ID | 是 | -- | 组织ID;所有的工具调用都适用于此组织 |
ORDIO_API_BASE_URL | 没有 | https://api.getordio.com | 临时部署或自托管部署的覆盖 |
ORDIO_MCP_TRANSPORT | 没有 | stdio | stdio 或 sse |
ORDIO_MCP_PORT | 没有 | 3100 | SSE HTTP服务器的端口 |
将API密钥视为密码-它授予对配置的组织的完全访问权限。
运输
- 标准 (默认):Claude Desktop、Claude Code和Windsurf使用的标准MCP传输。
- 上海证券交易所:为远程或基于浏览器的客户端提供服务器发送事件的HTTP服务器。启用
ORDIO_MCP_TRANSPORT=sse.
本地开发
npm install
cp env.example .env # fill in ORDIO_API_KEY and ORDIO_ORG_ID
npm run dev # tsx watch — no build step
npm run typecheck # tsc --noEmit
npm run lint # eslint src/
npm test # vitest源布局:
src/
index.ts MCP server entrypoint + tool registration
config.ts Environment loading
client.ts Thin REST client (Bearer auth, org scoping)
tools/ One module per domain (inventory, recipes, ...)
resources/ Organization resources
prompts/ Workflow prompts
transports/sse.ts SSE HTTP transport
utils/ Error and response helpers状态
活跃。版本 0.2.0.API和工具名称在 1.0 释放。欢迎提出问题和意见。
许可证
根据MIT许可证发布。
