Connect Marea to your AI client
Marea runs an MCP server athttps://mcp.mareaalcalina.com/mcp. Connect it once and your AI client manages your page for you.
What the AI can do: list your products and prices; add or edit products (title, description, price, sale price, category, stock, photo by URL); hide a sold-out item and bring it back; change hours, delivery, pickup and dine-in, branding and categories; create a new page and publish it when you say so.
What it cannot do yet: read or manage orders and customers; delete a product (hide it instead); upload a photo from your computer (a public image URL works); change the WhatsApp number that receives orders (set at creation, changed in the dashboard).
Publishing needs the same two things as in the dashboard: accepted terms and a plan that can publish. If either is missing, the AI shows you the link to fix it.
ChatGPT
1
Open connectors
In ChatGPT settings, open Connectors (on some plans it lives under Apps or developer mode).
2
Add the server
Create a connector with this URL and choose OAuth. There is no client id or secret to paste.
3
Connect
Sign in to Marea in the window that opens and press Autorizar.
Claude (claude.ai, Desktop, mobile)
1
Open connectors
Settings (Ajustes), then Connectors (Conectores), then add a custom connector.
2
Add the server
Name it
Marea and paste the same URL:3
Connect
Click Connect, sign in with the account that owns your page, and press Autorizar.
Claude Code, Cursor, VS Code
Add the URL as an HTTP MCP server with no headers. The first call returns a401 with an OAuth challenge and the client opens your browser to sign in.
Check it worked, then try these
Ask “¿Qué cuenta de Marea tienes conectada?”. The AI callsmarea.whoami and answers with your email and plan. Then:
- “¿Qué productos tengo en mi menú y a qué precio?”
- “Sube el precio de los tacos al pastor a 45 pesos.”
- “Oculta el flan, se nos acabó.”
- “Cambia el horario del domingo a 9:00 a 17:00.”
- “Agrega ‘Agua de horchata’ a 25 pesos en la categoría Bebidas.”
- “Publica mi página.” (the AI asks you to confirm; publishing is customer visible)
Developers and agents without a browser
Pass a key as a bearer header:mk_user_* for your own account, mk_dev_* only if you create Marea accounts for other people. Mint keys at mareaalcalina.com/developers/keys; see API keys.
- Claude Desktop (config file)
- OpenAI Agents SDK
- curl
The tools
An OAuth connection only lists the tools its scopes cover. There is no bootstrap scope:
marea.bootstrap_user needs a developer key. Email verification stays on REST because the six digit code needs the person in the loop.
For AI agents
- Read first:
llms.txtandAGENTS.md. Every page also serves as Markdown at<page>.md. - Tool descriptions are the spec. Every argument is described;
businessTypeandcurrencylist their accepted values. Readtools/listonce per session. - Ids are prefixed and opaque: pages
stf_…, productsprd_…. Get them from list tools or from what a create call returns. Never construct one. - Start with
marea.list_storefronts. If there is more than one page, ask which one before writing. - Updates are patches, except arrays. Omitted fields keep their value, but
categories,blocksand eachscheduleday are replaced whole. To add a category, read the current list and send it complete. - Hide, do not delete.
hide: trueonmarea.update_producttakes an item off the menu and keeps it. - Results are JSON in
content[0].textand, on success,structuredContent. REST errors returnisError: truewith the envelope (type,code,message,nextActions[],upgrade) in_meta.error; schema failures return a plain-32602message naming the field. Branch oncode; shownextActions[]andupgrade.upgradeUrlverbatim. - Publishing needs a person. Confirm before calling
marea.publish_storefront; never chain it after an edit. Expect451(terms) or402(plan) and surface the link. - Retries: set
_idempotencyKey(UUID v4) on any write you might retry; the same key within 24h returns the original result. Back off on429forRetry-Afterseconds._acceptLanguageonly affects bootstrap defaults; error messages are English. - Language: merchants are Spanish-speaking (Mexico, Colombia, Costa Rica, Peru). Product names, categories and
businessTypevalues are Spanish.
Disconnect
From the AI client’s connector settings, or from the dashboard: each connection is a key named after the app (for exampleClaude · claude.ai) under Desarrolladores, Claves API. Delete it and the app loses access on its next call.
Troubleshooting
- “Couldn’t reach the server”: check the URL ends in
/mcp.GETanswers405; that is expected. - “Authorization failed” or the consent page loops: sign in to Marea with the account that owns the page, then retry. The consent page shows the host of the app that is asking.
- Publish blocked:
402means the plan cannot publish (upgrade link in the response);451means the terms are not accepted (dashboard link in the response). - Tools disappeared: the connection’s key was deleted in the dashboard. Reconnect from the client.
401with a static key: the header was dropped by an editor, or the key was revoked. Re-paste or mint a new key.429: waitRetry-Afterseconds. See Rate limits.
Discovery and transport
Streamable HTTP, stateless,POST only. OAuth clients discover everything from the WWW-Authenticate challenge on a 401. For clients built by hand:
Registration: Client ID Metadata Documents (preferred) or Dynamic Client Registration. Redirect URIs: any
https:// URI, or loopback with any port. Access tokens last 60 minutes; refresh tokens 90 days and rotate. Registry listing: com.mareaalcalina/storefront.
Next steps
- Add and edit products, the REST view of the product tools.
- Publish a storefront, the 402, 422 and 451 gates.
- API keys, including the keys an AI connection creates.