Skip to main content
Glama
meican-mcp

meican-mcp

by cxOrz

meican-mcp

MCP Badge

美餐(Meican)MCP Server。支持查询餐次、餐厅、菜单、订单,以及下单和取消订单。

可用工具

工具

用途

meican_whoami

查询组织信息和取餐地址。

meican_list_meal_tabs

查询某天可用餐次。

meican_list_restaurants

查询某个餐次下可用餐厅。

meican_show_menu

查询某个餐厅在指定餐次下的菜单。

meican_list_orders

查询某天已有订单和未支付项目摘要。

meican_show_order

查询单个订单详情。

meican_place_order

下单。调用前必须向用户确认。

meican_cancel_order

取消订单。调用前必须向用户确认。

工具返回一个 MCP text content block,内容是 JSON 字符串:

{ "ok": true, "data": {} }

失败时:

{ "ok": false, "error": { "message": "...", "status": 400, "body": {}, "kind": "MeicanError" } }

token 过期时会自动刷新并保存,无需手动更新环境变量。

Related MCP server: CookUnity MCP

快速使用

{
  "mcpServers": {
    "meican": {
      "command": "npx",
      "args": ["-y", "meican-mcp"],
      "env": {
        "MEICAN_CLIENT_ID": "...",
        "MEICAN_CLIENT_SECRET": "...",
        "MEICAN_ACCESS_TOKEN": "...",
        "MEICAN_REFRESH_TOKEN": "...",
        "MEICAN_NAMESPACE": "..."
      }
    }
  }
}

MEICAN_ACCESS_TOKEN 对应美餐的 cookie sat,MEICAN_REFRESH_TOKEN 对应美餐的 cookie srt。

本地配置

推荐将登录信息放在本地配置文件中:

  • Linux/macOS:~/.config/meican-mcp/config.json

  • Windows:%APPDATA%\meican-mcp\config.json

{
  "clientId": "...",
  "clientSecret": "...",
  "accessToken": "...",
  "refreshToken": "...",
  "namespace": "..."
}

accessToken 对应美餐 cookie sat,refreshToken 对应 cookie srt。token 过期后, server 会自动刷新并更新这个文件。

本地配置优先于环境变量。需要修改配置文件位置时,可设置 MEICAN_CONFIG_FILE。

环境变量

变量

必填

说明

MEICAN_CLIENT_ID

否

美餐 OAuth client id;也可配置 clientId。两处至少提供一处。

MEICAN_CLIENT_SECRET

否

美餐 OAuth client secret;也可配置 clientSecret。两处至少提供一处。

MEICAN_ACCESS_TOKEN

否

美餐 sat cookie;也可配置 accessToken 或在调用时传入。

MEICAN_REFRESH_TOKEN

否

美餐 srt cookie;也可配置 refreshToken 或在调用时传入。

MEICAN_NAMESPACE

否

默认组织/站点 namespace。也可以在工具调用参数里传。

MEICAN_API_BASE_URL

否

默认 https://www.meican.com/forward/api。

MEICAN_CONFIG_FILE

否

覆盖本地配置文件的完整路径。

HTTP 模式相关:

变量

必填

说明

MCP_API_KEY

是

HTTP /mcp 的 Bearer token,随便生成一个,不带 token 的不允许调用。

BIND_HOST

否

默认 127.0.0.1。容器内通常用 0.0.0.0。

PORT

否

默认 3000。

LOG_LEVEL

否

默认 info。可选 debug、info、warn、error。

HTTP 模式

npm install
cp .env.example .env
# 编辑 .env
npm run build
npm start

健康检查:

curl http://127.0.0.1:3000/healthz

HTTP MCP 配置示例:

{
  "mcpServers": {
    "meican": {
      "url": "http://127.0.0.1:3000/mcp",
      "headers": {
        "Authorization": "Bearer ${MCP_API_KEY}"
      }
    }
  }
}

Available Tools

8 tools
meican_cancel_orderA

Cancel a meal order. DESTRUCTIVE: this removes the order. ALWAYS confirm with the user before calling.

Inputs: order_unique_id (required), type, namespace, access_token, +1 more.

meican_list_meal_tabsA

List meal sessions ('餐次', e.g. 午餐, 晚餐) available for a given date. Each tab has a tab_unique_id and a target_time (the order deadline as 'YYYY-MM-DD HH:MM') which you pass verbatim to subsequent tools. Use this FIRST when the user wants to order or view orders for a day. If existing_order is non-null for a tab, the user has already ordered from it — surface that instead of placing a duplicate.

Inputs: date, namespace, access_token, refresh_token.

meican_list_ordersA

List the current user's existing Meican orders for a date plus any unpaid items. Call this BEFORE meican_place_order to avoid duplicates.

Inputs: date, namespace, access_token, refresh_token.

meican_list_restaurantsA

List restaurants serving in one meal session. Returns each restaurant's unique_id and name. Get the args from meican_list_meal_tabs.

Inputs: target_time (required), tab_unique_id (required), namespace, access_token, +1 more.

meican_place_orderA

Place a meal order. DESTRUCTIVE: this may charge the user or consume an organization subsidy. ALWAYS confirm dish names, counts, total price, target time, and pickup address with the user BEFORE calling this. Set dry_run: true first to inspect the payload without submitting.

Inputs: dishes (required), target_time (required), tab_unique_id (required), address_unique_id (required), +5 more.

meican_show_menuA

Show one restaurant's full menu for a meal session. Returns dishes grouped by section. You need dish_id values from here to place an order.

Inputs: target_time (required), tab_unique_id (required), restaurant_unique_id (required), namespace, +2 more.

meican_show_orderA

Show full status of one order by its uniqueId, including pickup location, current pay status, and dishes. Use after placing an order to confirm it succeeded (expect status_info='NEW_ORDER', pay_status='SUCCESS').

Inputs: order_unique_id (required), namespace, access_token, refresh_token.

meican_whoamiA

Look up the current user's organization info and ALL delivery addresses on Meican. Call this once per user to discover their suggested_default_address (= most recently used pickup point); store the returned unique_id on the user's profile and pass it as address_unique_id to meican_place_order.

Inputs: namespace, access_token, refresh_token.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: cancel, list tabs, list orders, list restaurants, place order, show menu, show order details, and look up user info. No two tools have overlapping functionality.

    Naming Consistency5/5

    All tools follow the consistent pattern 'meican_verb_noun' with snake_case, making it easy to predict tool names and understand their actions.

    Tool Count5/5

    8 tools is appropriate for a meal ordering service, covering essential actions without being overwhelming or too sparse.

    Completeness4/5

    The set covers the full ordering lifecycle: browsing sessions, restaurants, menus, placing orders, viewing orders, and canceling. A minor gap is the lack of an update/modify order tool, but core workflows are well-supported.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    Appeared in Searches