Skip to main content

Connect Marea to your AI client

Marea runs an MCP server at https://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 a 401 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 calls marea.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)
Hours, delivery, pickup and dine-in changes go live immediately. Design changes wait for publish.

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.

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.txt and AGENTS.md. Every page also serves as Markdown at <page>.md.
  • Tool descriptions are the spec. Every argument is described; businessType and currency list their accepted values. Read tools/list once per session.
  • Ids are prefixed and opaque: pages stf_…, products prd_…. 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, blocks and each schedule day are replaced whole. To add a category, read the current list and send it complete.
  • Hide, do not delete. hide: true on marea.update_product takes an item off the menu and keeps it.
  • Results are JSON in content[0].text and, on success, structuredContent. REST errors return isError: true with the envelope (type, code, message, nextActions[], upgrade) in _meta.error; schema failures return a plain -32602 message naming the field. Branch on code; show nextActions[] and upgrade.upgradeUrl verbatim.
  • Publishing needs a person. Confirm before calling marea.publish_storefront; never chain it after an edit. Expect 451 (terms) or 402 (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 on 429 for Retry-After seconds. _acceptLanguage only affects bootstrap defaults; error messages are English.
  • Language: merchants are Spanish-speaking (Mexico, Colombia, Costa Rica, Peru). Product names, categories and businessType values are Spanish.

Disconnect

From the AI client’s connector settings, or from the dashboard: each connection is a key named after the app (for example Claude · 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. GET answers 405; 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: 402 means the plan cannot publish (upgrade link in the response); 451 means 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.
  • 401 with a static key: the header was dropped by an editor, or the key was revoked. Re-paste or mint a new key.
  • 429: wait Retry-After seconds. 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