Begadfor AI agents

Connecting a person's Begad account

The public server needs nothing. The account server (https://begad.ae/api/agent/mcp/account) shows the person's own orders, cart and wishlist, and create_cart there puts items straight into their Begad cart. It uses OAuth 2.1 with PKCE, as the MCP specification describes, so Claude and ChatGPT handle it on their own: add the account server URL and the person is sent to Begad to sign in and approve.

What the person sees #

They sign in on begad.ae (password, Google, Apple), then a page names the assistant and what it may do, with Allow and Cancel. It also says the assistant can never place orders, pay, or see addresses, phone numbers or cards. They can disconnect it any time under My Account > Connected assistants; that stops it at once.

Endpoints #

Resource metadatahttps://begad.ae/.well-known/oauth-protected-resource/api/agent/mcp/account
Server metadatahttps://begad.ae/.well-known/oauth-authorization-server
Register a client (RFC 7591)POST https://begad.ae/api/agent/oauth/register
Authorizehttps://begad.ae/api/agent/oauth/authorize
TokenPOST https://begad.ae/api/agent/oauth/token
Revoke (RFC 7009)POST https://begad.ae/api/agent/oauth/revoke

Scopes #

ScopeAllows
shoppingSearch and build cart links
cartRead the person's cart and add to it
ordersRead their orders and delivery status
wishlistRead their wishlist

Leave scope out to ask for all four. The person approves them together.

Your own client #

# 1. Register once
curl -s -X POST https://begad.ae/api/agent/oauth/register -H 'Content-Type: application/json' \
  -d '{"client_name":"My shopping agent","redirect_uris":["http://127.0.0.1:8765/callback"]}'
# 2. Send the person to
#    https://begad.ae/api/agent/oauth/authorize?response_type=code&client_id=...&redirect_uri=...&code_challenge=...&code_challenge_method=S256&state=...
# 3. Exchange the code
curl -s -X POST https://begad.ae/api/agent/oauth/token \
  -d grant_type=authorization_code -d client_id=... -d code=... -d code_verifier=... -d redirect_uri=...