ubeats-bo-mcp

ubeats-bo-mcp

MCP server that provides tool-based access to the UBEats Backoffice API (reports, orders, and catalog) with automatic Keycloak SSO authentication, enabling users to query delivery and financial data via natural language.

Category
访问服务器

README

ubeats-bo-mcp

MCP server for the UBEats Backoffice (office.ubeats.mn, API host https://ubeats-bo-api.ubcabtech.com). Built on the same pattern as ubcab-bo-mcp: one self-contained api/index.ts that runs either over stdio (local / Claude Desktop) or as a bearer-guarded Streamable HTTP endpoint on Vercel.

Auth

Keycloak SSO — verified 2026-08-18 against a live BO session:

Issuer https://sso.ubcabtech.com/realms/ubcab-bo
OIDC client (azp) ubeats-bo
Token endpoint {SSO}/realms/{REALM}/protocol/openid-connect/token
Origin/Referer sent https://office.ubeats.mn

Access tokens live ~5 minutes; the server caches until ~30s before expiry and re-auths silently (refresh_token first, then password grant).

Tools (21)

Reports (8)

All seven report endpoints share one body shape:

POST /v1/api/reports/{report}/list
{ "filter": { "beginDate": "2026-08-17", "endDate": "2026-08-18", "city": "11" },
  "page": 1, "limit": 20 }

Three things that are easy to get wrong (all confirmed by live testing):

  1. page / limit are top-level, not inside pagination. Sending pagination: {page, limit} is silently ignored and you get the default 20 rows.
  2. endDate is exclusive. For a single day pass the next day. beginDate === endDate returns 996 "Begin date or end date is wrong!".
  3. Dates must be YYYY-MM-DD. ISO datetimes or "YYYY-MM-DD HH:mm:ss" return 996.

Unknown filter keys are silently ignored — no error, no filtering. Always sanity-check totals.

filter.city enum (Mongolian aimag/city codes, 11 = Улаанбаатар): 11 21 22 23 41 42 43 44 45 46 48 61 62 63 64 65 67 81 82 83 84 85

Tool Report
ubeats_report_driver_revenue Жолоочийн цалин бодолт (+driverRevenueDirectTransact filter, confirmed working)
ubeats_report_delivery Хүргэлтийн тайлан (returns feeChargeTotal, couponTotal, grandTotal)
ubeats_report_financial Санхүүгийн тайлан (29 columns, +includeCancelled)
ubeats_report_financial_short Санхүүгийн тайлан (хураангуй, 14 columns)
ubeats_report_items Хоолны тайлан (item-level)
ubeats_report_order_duration Мерчант захиалгын хугацаа
ubeats_report_orders Захиалгын дэлгэрэнгүй тайлан
ubeats_report_meta GET /reports/{report}/meta?action=list — column + filter definitions

Orders (6)

Cloud Kitchen and Merchant orders live in separate collections — a phone number can have orders in both, so search both.

ubeats_order_search / _get / _state_histories, ubeats_merchant_order_search / _get / _state_histories

Catalog (6)

ubeats_provider_search, ubeats_branch_search (filters: name, status), ubeats_merchant_search, ubeats_kitchen_search, ubeats_menu_search, ubeats_notification_search (filters: beginDate, endDate, sender, senderRole, receiverPhoneNumber)

Escape hatch (1)

ubeats_bo_request — arbitrary method/path against the BO API, with auth and headers handled. Use it to probe undocumented endpoints before adding a real tool.

Local run

npm install
npm run typecheck
cp .env.example .env      # fill in creds
npm run test:login        # live smoke test: auth + one driver-revenue page
npm run compile && npm start   # stdio MCP server

Vercel deploy

Zero-config: api/index.ts is the function, vercel.json rewrites everything to it. Three rules carried over from ubcab-bo-mcp (learned the hard way):

  1. No legacy builds + routes in vercel.json on a git-imported project — every path 404s. Use rewrites only.
  2. No build script in package.json — Vercel then looks for public/ and the deploy fails. Local compile is npm run compile.
  3. No imports from src/ — esbuild's Node16 resolver won't map .js → .ts and you get a 500. Everything lives in the one file.

Deploy by pushing to main (git integration), not from the CLI.

Env vars to set in Vercel: UBEATS_BO_USERNAME, UBEATS_BO_PASSWORD, UBEATS_BO_MCP_AUTH_TOKEN (openssl rand -hex 32).

Health check: GET /health → {"status":"ok","server":"ubeats-bo-mcp"}

Known gaps

  • order-duration's meta?action=list returns 998 permission_denied for some roles even though /list works. Read the columns off the response instead.
  • financial-report's includeCancelled maps to filter.state; the BO renders it as a checkbox but the backend effect was not confirmed live.
  • /v1/api/categories/list returns 998 for the account tested.
  • No products, delivery-tariffs, delivery-zones, feedbacks, or lots list route under /v1/api/ — those BO screens use different paths.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选