Connect via MCP

MCP (Model Context Protocol) is the open standard AI assistants use to work with external services. Instead of writing HTTP requests against the REST API, your AI agent (Claude, Cursor, …) sees DuckHub as a set of ready-made, typed toolsbuild_menu, set_image, publish_menu — and can build and manage a complete menu from a conversation.

The DuckHub MCP server is hosted — there is nothing to install or run. You add one URL to your AI client and authenticate with the same dk_live_ API key the REST API uses.

Endpoint#

http
POST https://mcp.duck-hub.com/mcp

If the mcp. subdomain is not yet resolvable in your network, the same server is also reachable at https://api.duck-hub.com/mcp.

Transport: Streamable HTTP (stateless). Authentication: the Authorization: Bearer dk_live_... header — the server forwards it to the API on every tool call, so all the usual rate limits, plan limits and the audit log apply unchanged.

Add it to your client#

Get your API key from the DuckHub app → Integrations page, then:

bash
claude mcp add --transport http duckhub https://mcp.duck-hub.com/mcp \
  --header "Authorization: Bearer dk_live_your_api_key"

claude.ai (web) and ChatGPT connect custom MCP servers through OAuth only — API-key entry is not supported there. OAuth sign-in ("Connect your DuckHub account") is planned as a later phase; until then use one of the clients above.

Read-only access#

The Integrations page can also issue a read-only key (same dk_live_ format). With it every read tool works normally, and every write tool fails with 403 READ_ONLY_KEY — the API refuses the write before touching anything. Write tools are also marked with standard MCP annotations (readOnlyHint / destructiveHint), so well-behaved clients can filter or confirm them up front. Use a read-only key for agents that should analyse the menu but never change it.

What the tools cover#

All 39 tools wrap the v1 REST API — same behavior, same limits:

GroupTools
Discover & readget_reference, get_menu, list_products, get_product, list_categories, list_publications, get_audit_log
Build the menubuild_menu (bulk sync), set_product, delete_product, set_modifier_group, delete_modifier_group, list_modifier_groups
Settingsget_settings + 7 task-scoped update_* tools (settings)
Mediaset_image — product / banner / logo (media)
Translationsset_translations, get_translations (translations)
Merchandisingpromotions / banners / tables — list_* / set_* / delete_* (merchandising)
Go livepublish_menu, rollback_publish, cleanup_menu (publish)
Orderslist_orders, get_order, update_order_status — paid plans (orders)

Agents should call get_reference first: it returns every allowed enum value, your venue's plan limits and current usage, and the money conventions — everything the other tools assume.

Things agents get wrong#

  • Money is integers in minor units12.50 is sent as 1250 (kopecks/cents). Everywhere.
  • Nothing is guest-visible until you publish. build_menu and friends edit the draft; publish_menu makes it live (and keeps a rollback snapshot).
  • Dry-run first. build_menu and cleanup_menu accept dryRun: true — full validation and a preview with zero writes. Use it before large or first-time payloads.
  • cleanup_menu arrays are KEEP-lists — everything not listed gets hidden or deleted. Read the tool description carefully.
  • Orders tools need a paid plan — on the free plan they return 403 PAID_PLAN_REQUIRED.
  • Composite tools make several API calls internallyset_promotion (one per item) and the settings update_* tools (read + write) each count multiple requests toward your venue's rate budget.

Errors follow the standard error envelope and every tool error includes a short recovery hint, so agents can usually fix their own mistakes.