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.
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):
page/limitare top-level, not insidepagination. Sendingpagination: {page, limit}is silently ignored and you get the default 20 rows.endDateis exclusive. For a single day pass the next day.beginDate === endDatereturns996 "Begin date or end date is wrong!".- 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):
- No legacy
builds+routesinvercel.jsonon a git-imported project — every path 404s. Userewritesonly. - No
buildscript in package.json — Vercel then looks forpublic/and the deploy fails. Local compile isnpm run compile. - No imports from
src/— esbuild's Node16 resolver won't map.js→.tsand 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'smeta?action=listreturns998 permission_deniedfor some roles even though/listworks. Read the columns off the response instead.financial-report'sincludeCancelledmaps tofilter.state; the BO renders it as a checkbox but the backend effect was not confirmed live./v1/api/categories/listreturns998for the account tested.- No
products,delivery-tariffs,delivery-zones,feedbacks, orlotslist route under/v1/api/— those BO screens use different paths.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.