Back to MCP directory
publicPublicdnsLocal runtime

tandoor-mcp-server

Tandoor MCP Server是一个用于与Tandoor食谱管理器交互的模型上下文协议服务器,支持创建食谱、管理膳食计划、搜索食谱、获取详细信息以及管理购物清单等功能。

article

README

🚀 Tandoor 餐厅管理系统 API 文档

Tandoor 餐厅管理系统提供了一套全面的 API 接口,可用于管理餐厅的日常运营,涵盖菜单、订单、库存和员工等多个方面。本 API 文档详细介绍了各个接口的功能、参数及使用方法,助你高效使用该系统。

🚀 快速开始

安装依赖

确保你已经安装了 Node.js 和 npm。然后运行以下命令安装所需的依赖:

npm install express axios cors dotenv

配置环境变量

创建一个 .env 文件,并添加你的 Tandoor API 令牌:

TANDOOR_API_TOKEN=your-api-token

✨ 主要特性

  • 提供全面的 API 接口,覆盖餐厅运营的多个关键方面。
  • 支持菜单管理、订单创建与处理、库存更新以及员工信息管理。
  • 具备完善的错误处理机制,方便调试和问题排查。
  • 提供测试脚本,可验证服务器功能是否正常。

📦 安装指南

安装依赖

确保你已经安装了 Node.js 和 npm。然后运行以下命令安装所需的依赖:

npm install express axios cors dotenv

配置环境变量

创建一个 .env 文件,并添加你的 Tandoor API 令牌:

TANDOOR_API_TOKEN=your-api-token

💻 使用示例

基础用法

获取菜单

获取餐厅的当前菜单。

{
  "menuItems": [
    {
      "id": 1,
      "name": "Margherita Pizza",
      "price": 12.99,
      "description": "Classic Italian pizza with tomatoes, mozzarella and basil.",
      "category": "Pizza"
    },
    // 更多菜品...
  ]
}

创建新订单

创建一个新的餐厅订单。

{
  "orderItems": [
    {
      "foodId": number,
      "quantity": number,
      "price": number
    },
    // 更多菜品...
  ],
  "customerId": number,
  "totalAmount": number,
  "paymentMethod": string
}

更新库存

更新餐厅的库存信息。

{
  "foodId": number,
  "newQuantity": number
}

高级用法

获取员工列表

获取餐厅的所有员工信息。

{
  "employeeList": [
    {
      "id": 1,
      "firstName": "John",
      "lastName": "Doe",
      "role": "Chef"
    },
    // 更多员工...
  ]
}

更新员工信息

更新指定员工的信息。

{
  "firstName": string,
  "lastName": string,
  "role": string
}

📚 详细文档

基础接口

获取菜单

  • 请求方法:GET
  • 请求路径:/api/menu
  • 查询参数:无
  • 返回格式:JSON

创建新订单

  • 请求方法:POST
  • 请求路径:/api/order
  • 请求参数:见基础用法示例
  • 返回格式:JSON

更新库存

  • 请求方法:PUT
  • 请求路径:/api/inventory
  • 请求参数:见基础用法示例
  • 返回格式:JSON

高级功能

获取员工列表

  • 请求方法:GET
  • 请求路径:/api/employees
  • 查询参数:无
  • 返回格式:JSON

更新员工信息

  • 请求方法:PUT
  • 请求路径:/api/employees/:id
  • 请求参数:见高级用法示例
  • 返回格式:JSON

错误处理

错误码

  • 400 Bad Request:请求参数错误或缺失。
  • 401 Unauthorized:未授权访问。
  • 404 Not Found:资源不存在。
  • 500 Internal Server Error:服务器内部错误。

示例错误响应

{
  "error": {
    "code": 400,
    "message": "Missing required parameter 'customerId'"
  }
}

测试

我们提供了一个测试脚本,用于验证服务器功能是否正常运行:

npm run test

测试脚本提供了以下功能:

  1. 列出所有可用的 API 接口。
  2. 测试创建新订单。
  3. 测试更新库存。

故障排除

如果在使用过程中遇到问题,请按照以下步骤排查:

  1. 确保服务器已正确启动并显示 [Setup] Tandoor Management System server running on stdio.
  2. 检查你的 Tandoor API 令牌是否正确配置。
  3. 查看终端中的错误信息,获取更多调试线索。
  4. 使用测试脚本验证服务器功能,排除 MCP 系统的问题。

通过以上文档,你可以全面了解和使用 Tandoor 餐厅管理系统的各项功能。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client