GG Checkout MCP Server
Officialby ggCheckout
README.md
# GG Checkout MCP Server
> Complete Model Context Protocol server for managing the GG Checkout platform via AI agents — 217 tools across 23 domains.
## Overview
The GG Checkout MCP server enables AI agents (Claude Code, Cursor, Claude Desktop) to manage the entire GG Checkout platform through natural language: products, checkouts, payments, members area, funnels, WhatsApp, billing, and more.
## Prerequisites
- Node.js >= 18.0.0
- A GG Checkout account with an active API Key
## Installation
### NPX (Recommended)
```bash
npx -y ggcheckout-mcp@latest
```
### Global Install
```bash
npm install -g ggcheckout-mcp
```
## Getting Your API Key
1. Visit [ggcheckout.com](https://www.ggcheckout.com/)
2. Go to **Settings** → **MCP / API Key**
3. Generate your API Key (format: `ggck_live_...`)
4. **Important:** Copy and save your API key immediately — it won't be shown again!
## Configuration
### Claude Code
> **Upgrading?** Use `ggcheckout-mcp@latest`, as in the snippet below: plain
> `npx -y ggcheckout-mcp` reuses whatever copy `npx` cached first and can keep you on an
> old version indefinitely. With `@latest`, restarting your MCP client picks up the newest
> release. That includes minor releases, which can carry breaking changes (0.3.0 changed
> `create_checkout` to take `productId` instead of `id`, and checkout reads return
> `productId` instead of `id`), so read [CHANGELOG.md](./CHANGELOG.md) first. To stay on a
> version, pin it, for example `ggcheckout-mcp@0.5.0`; you then have to update it by hand.
```json
{
"mcpServers": {
"ggcheckout": {
"command": "npx",
"args": ["-y", "ggcheckout-mcp@latest"],
"env": {
"GGCHECKOUT_API_KEY": "ggck_live_your_key_here"
}
}
}
}
```
### Claude Desktop
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
Same format as above.
### Cursor / Other Clients
```bash
export GGCHECKOUT_API_KEY="ggck_live_your_key_here"
```
### Custom API URL
```bash
export GGCHECKOUT_API_URL="https://your-staging.example.com"
```
### Payments API (PIX charges)
The six payments-API tools (`list_wallets`, `create_pix_charge`, `get_payment_intent`,
`list_payment_intents`, `cancel_payment_intent`, `get_payments_api_limits`) use their own secret key, created in
**Tools → Gateways → Payments API** (Ferramentas › Gateways › API de pagamentos). They are only registered when it is set, and `GGCHECKOUT_API_KEY` is never
used for them.
```bash
export GG_PAYMENTS_API_KEY="ggpk_test_your_key_here" # ggpk_test_ = simulated, ggpk_live_ = real money
export GG_PAYMENTS_API_URL="https://api.ggcheckout.app/v1" # optional, this is the default
```
The key must be `ggpk_live_` or `ggpk_test_` followed by letters and digits only. The value of the URL includes the `/v1` base path. The URL must be `https` (plain `http` is accepted only for `localhost` / `127.0.0.1`); the server
refuses to start otherwise.
### Upload folder
`upload_media` and `upload_members_area_file` read files from the machine running this server, and only from the
folder named here. Without it the tool refuses every upload: what an agent reads (a page, a PDF) can
carry instructions, so the server never reads an arbitrary path. A file that is itself a symbolic
link is refused, and a path that leads outside the folder through a link is too.
```bash
export GGCHECKOUT_UPLOAD_ROOT="/home/me/course-import"
```
### Inline views (MCP Apps)
In a client that supports [MCP Apps](https://modelcontextprotocol.io/extensions/apps) (Claude
Desktop and claude.ai, among others), some tools also draw their answer inside the chat. Nothing
needs configuring, and clients without MCP Apps (Claude Code, Cursor) keep receiving the same text
answer as before.
| View | Tools | What it shows |
|------|-------|---------------|
| Sales | `get_dashboard_stats`, `get_dashboard_charts` | Only the part the user asked about: the period's numbers with the change against the previous one (`get_dashboard_stats`), or the `focus` of `get_dashboard_charts` (`revenue` over time with a hover tooltip, `approval` per method, top `products`, `states`, `refunds`). Without a `focus`, the whole panel. The period buttons call the same tool, with the same focus, again. |
| Funnel | `get_funnel_lead_stats`, `get_funnel_lead_analytics` | As the funnel editor's Leads tab: the five lead cards (visitors, leads, interaction rate, qualified, completed), or the conversion per step, each bar sized by its visitors and colored by its drop-off (the worst one red). |
| Payments | `get_payments_paginated`, `list_payments`, `get_payment` | As the dashboard's payments list: customer and offer, date, amount, status badge, gateway with its logo and method. The search and the next page call `get_payments_paginated` again (with `searchTerm` and the `nextCursor`); `list_payments` answers that same first page, so it pages and searches the same way. A row opens the payment's detail (customer, payment, order bumps), which `get_payment` draws on its own. |
| Billing | `get_billing_status`, `get_billing_balance`, `list_invoices`, `get_invoice`, `list_credits` | As the seller's billing page: the account balance (signed, green credit or red to pay), the use of the credit limit with its 15% tolerance, the credit level and the next one, and the grace or blocked banner (`get_billing_status`, `get_billing_balance`). The invoice history with status badges, a row opening the invoice's breakdown (`list_invoices`, `get_invoice`). The credit statement (`list_credits`), each closing drawn as its receipt, with older lines loaded through `before`. |
| Domains | `list_custom_domains`, `get_custom_domain`, `add_custom_domain`, `verify_custom_domain` | As the domain settings: each domain with its status badge, created date and what is missing; a row opens the DNS instructions (the CNAME's name and value, each copied on a click, and the notes). "Verificar DNS" calls `verify_custom_domain` and says what is still missing: the CNAME not seen yet, or the certificate still being issued. |
| WhatsApp deliveries | `get_delivery_status`, `resend_delivery` | As the payment detail's WhatsApp data: the summary and a card per message (kind, status badge, sent, delivered and read times, attempts, error). The resend button asks first and calls `resend_delivery`, then reads the deliveries again. |
| Gateways | `list_checkout_wallets`, `get_gateway_fallback_stats` | As the charge order: each wallet with its PIX and card gateways in order (logo, Principal or Reserva, locked, disconnected) and each one's last-day rate colored on the Seasons scale, read through `get_gateway_fallback_stats`. The stats alone draw the stability ranking, by stability or by paid PIX, flagging the unstable gateways. |
| Rewards | `calculate_rewards`, `redeem_reward` | As the rewards trail: total revenue, the way to the next stop, and each stop (community, WhatsApp group, bracelet, plaques) with its art and state (conquered, "Você está aqui", locked with what is missing). The unlocked WhatsApp group is redeemed through `redeem_reward` and its invite opened by the client. |
| Offers | `list_upsells`, `list_downsells` | The product's post-purchase funnel in order: checkout, each upsell (price with the original struck, timer, number of products, active), what declining it does, the downsells a declined "stop" upsell opens, and success. Either tool reads the other list of the same product to complete the map. |
| Members area | `get_members_area`, `list_modules`, `list_sections`, `list_lessons` | The course tree with the seller's names: an API module is a "carrossel" and a section a "módulo". The area's students, active students and average completion, then carousels, modules and lessons (type, duration, release or lock). Opening a carousel or a module reads the level below. |
| Telegram flow | `get_telegram_flow`, `list_telegram_flows` | A flow drawn read-only where the bot's flow editor keeps each node: the editor's node cards (category color, icon, preview line, labeled outputs such as Aprovado / Expirou or each button) and the edges colored by the output they leave from; an edge that loops back up or would cross a node runs down its own lane on the right. The list opens any flow in place. |
| WhatsApp chips | `list_whatsapp_numbers`, `get_whatsapp_number`, `get_pairing_code` | The chips as the dashboard's Chips screen: "N chips pedem ação" on top (marked for removal, soonest first, then active chips that do not send), "N chips ativos / 20", and each chip with its name, masked number, type (WhatsApp GG or Meta oficial), status explained on hover (a chip marked for removal reads its countdown), the first operation that uses it (read through `list_whatsapp_sessions`, or "Não vinculado") and how many. An active QR code chip in the handshake (where the dashboard shows its QR) is connected in place with a pairing code, since the server never passes the QR on: the seller types the chip's number, types the code on the phone, and the chip is read until it connects. A dropped chip is restarted first ("Reiniciar", which asks first); "Desativar" / "Reativar" go through `update_whatsapp_number`, the list's "Verificar status" through `check_whatsapp_numbers` and "Atualizar" reads the list again. A connected chip lists the operations that use it. |
| WhatsApp funnels | `list_whatsapp_funnels`, `get_whatsapp_funnel` | The dashboard's "Funis": each funnel with when it starts, its messages count, operation and state, paged, with "Atualizar" and "+ Novo funil" (the dashboard's models, created with `create_whatsapp_funnel`, or a blank draft). A funnel opens in the dashboard's editor: blocks Começa, Espera, WhatsApp and Fim with "+ Adicionar", a "+" between messages and arrows that move a message with its wait, a Propriedades panel per block (trigger and operation, wait presets, variable chips and text, the sending pace, stop on reply and send window, the store's signature, coupon and emoji) and a Prévia of the customer's chat. "Salvar" asks first, re-reads the funnel and refuses when it changed elsewhere since it was shown, then saves it whole with `update_whatsapp_funnel`; "Funil ligado" (after saving) and "Excluir" ask first and go through `toggle_whatsapp_funnel` and `delete_whatsapp_funnel`. |
| WhatsApp operations | `list_whatsapp_sessions`, `get_whatsapp_session` | The dashboard's "Operações" (sessions in the API): each operation with its state as the dashboard words it (Enviando, Reserva fora, Em reserva, Sem cobertura; read from its chips through `list_whatsapp_numbers`), its primary chip, fallbacks and products. The detail shows "Chips da operação" in the order they send, moved with arrows, plus "Adicionar chip" and remove, and "Produtos atendidos" (titles read through `list_products`) with add and remove. Every write asks first in the card, is refused (and the operation reloaded) when the operation changed since the card showed it, and goes through `update_whatsapp_session`, `add_whatsapp_session_number`, `remove_whatsapp_session_number` or `set_whatsapp_session_products`. |
| PIX | `create_pix_charge`, `get_payment_intent`, `cancel_payment_intent`, `add_credit`, `get_credit_topup`, `pay_invoice` | QR code, copy-and-paste button, time left, and the status, polled every 5 s (10 s for test-mode charges, which have a smaller read limit) through `get_payment_intent`, `get_credit_topup`, `list_credits` or `get_invoice` until it is paid or expires. `cancel_payment_intent` draws the canceled charge. |
| Payments API | `get_payments_api_limits`, `list_wallets`, `list_payment_intents` | Requests per minute per bucket (used / limit, when a full bucket frees its next request, LIVE/TESTE, max per charge), wallets with their active PIX count, and charges with status; each list starts with the requests-per-minute strip; "Mais" pages, a row opens the charge's PIX view. |
| Tracking | `explain_tracking`, `diagnose_tracking` | How a sale's metrics travel to Meta, TikTok, Google Ads and UTMify, as sections with expandable items and the common problems; or the diagnosis of an account, checkout, funnel or payment: findings sorted critical, warning, info, ok (icon and text), the tracking tokens with mode and health, the sale's UTMs and click ids, and the last 24 hours of errors. |
| UTM links | `build_tracking_link` | The link to sell from with UTMs: the text to copy (the ad's "Parâmetros de URL", the Google tracking template, or the whole link for a manual one), the clean destination, "Onde colar" steps, the parameters table with where each came from, and the notes. |
| WhatsApp inbox | `open_whatsapp_inbox` (and the app-only `list_whatsapp_conversations`, `list_whatsapp_messages`, `send_whatsapp_reply`, `mark_whatsapp_conversation_read`, `get_whatsapp_conversation_funnel`, `start_whatsapp_conversation_funnel`, `stop_whatsapp_conversation_funnel`, `set_whatsapp_conversation_opt_out`) | The seller's conversations: the list (name or masked phone, last text, unread, "Pediu para sair"), a thread with its composer, and the funnel actions (run a manual funnel, stop it, "Parar funil e não enviar mais", "Voltar a enviar"). Read again every 10 s while visible (the list while no conversation is open, then the open conversation), for up to 15 minutes of visible time or until the API answers 429 or 503 with a `Retry-After`, with "Atualizar" to resume: the reads spend the account's API key budget. Message text is shown as text only. The model gets only the counts. See "WhatsApp inbox" below. |
The views run in the client's sandbox with no network access: their data only arrives through
the client, from the tool result or from the tool calls listed above. All of them are one React
app (`ui/`, built into `dist/views/app.html` and served as the `ui://ggcheckout/app.html`
resource), which picks the view by the tool that answered.
### Versioning and the API
- Every request this server makes carries `User-Agent: ggcheckout-mcp/<version>`, so the API
knows which release is calling.
- Each API refuses every request from versions below the minimum it supports: the dashboard API
(saas) from 0.6.0 on this release, the payments public API from 0.5.0 (its tools did not change).
The refusal says so and asks you to update.
- Both APIs tell an outdated install so in their response headers (`X-GG-MCP-Latest` and
`X-GG-MCP-Update`); the tool result then ends with a short `update:` line so your assistant can
suggest updating. The version must be a newer semver and the text is fixed (with `@latest` in the
config, restart the client; a global install runs `npm i -g ggcheckout-mcp@latest`; a pinned version
is changed in the config): no header text is shown. There is no npm registry check.
**For maintainers**
- Never remove or change the format of the `User-Agent` header: the API's version check reads it.
- Every release: raise `LATEST_GGCHECKOUT_MCP_VERSION` in ggCheckout/saas-checkout
(`lib/apiKeys/ggcheckoutMcpVersion.ts`) and `DEFAULT_MCP_LATEST_VERSION` in ggCheckout/ggcheckout-core
(`crates/ggcheckout-http-public-api/src/config.rs`). The `update:` notice comes only from them: with
no registry poll, a release nobody announces there shows the notice to no install, with no error
anywhere (an install with `@latest` in its config still gets the release when the client restarts).
- Every release that changes what a write sends to the API must be considered as the new
minimum supported version on the server, and that decision is recorded in the release's
CHANGELOG entry.
---
## Example prompts / Exemplos de pedidos
Ask in Portuguese or English; the assistant picks the tools. The tools listed next to each prompt
are enough to fulfil it. Tools that create something act on your real account; the PIX charge in the
last row is simulated with a test key (see the note after the table).
Peça em português ou em inglês; o assistente escolhe as ferramentas. As ferramentas listadas ao
lado de cada pedido bastam para atendê-lo. As que criam algo agem na sua conta de verdade; a
cobrança PIX da última linha é simulada com uma chave de teste (veja a nota depois da tabela).
| Português | English | Tools |
|---|---|---|
| "Liste todos os meus produtos" | "Show me all my products" | `list_products` |
| "Crie o produto 'Curso de Excel': descrição 'Do básico ao avançado', R$ 97,00, sem desconto, entrega em https://example.com/excel" | "Create the product 'Excel Course': description 'From basics to advanced', R$97.00, no discount, delivered at https://example.com/excel" | `create_product` |
| "Crie um checkout para o produto 'Curso de Excel' a R$ 97,00, cobrando PIX e cartão pela carteira 'Principal'" | "Create a checkout for the 'Excel Course' product at R$97.00, charging PIX and card through my 'Principal' wallet" | `list_products`, `list_checkout_wallets`, `create_checkout` |
| "Quanto eu vendi hoje?" | "How much did I sell today?" | `get_dashboard_stats` |
| "Mostre os últimos 20 pagamentos aprovados deste mês" | "Show the last 20 paid payments from this month" | `get_my_business_id`, `get_payments_paginated` |
| "Procure os pagamentos do e-mail maria@example.com" | "Find the payments from maria@example.com" | `get_my_business_id`, `get_payments_paginated` |
| "Crie o cupom BEMVINDO10 com 10% de desconto em todos os produtos" | "Create the coupon WELCOME10 with 10% off all products" | `create_discount` |
| "Crie um webhook em https://example.com/webhook para os eventos pix.paid e card.paid" | "Create a webhook at https://example.com/webhook for the pix.paid and card.paid events" | `create_webhook` |
| "Crie uma cobrança PIX de R$ 49,90 do pedido 1234 na carteira 'Loja' para Maria Souza (maria@example.com, CPF 000.000.000-00, telefone 11000000000)" | "Create a R$49.90 PIX charge for order 1234 on my 'Loja' wallet for Maria Souza (maria@example.com, CPF 000.000.000-00, phone 11000000000)" | `list_wallets`, `create_pix_charge` |
The last one needs `GG_PAYMENTS_API_KEY` ([Payments API](#payments-api-pix-charges)); a `ggpk_test_`
key creates a simulated charge, a `ggpk_live_` key a real one. / O último precisa da
`GG_PAYMENTS_API_KEY` ([Payments API](#payments-api-pix-charges)): com uma chave `ggpk_test_` a cobrança é simulada; com `ggpk_live_`, é real.
---
## Available Tools (210)
### Products (21 tools)
#### `list_products`
List all your products/deliveries.
**Example prompt:** "Show me all my products"
#### `get_product`
Get details of a specific product.
**Parameters:** `productId` (string)
**Example prompt:** "Get details of product abc123"
#### `create_product`
Create a new product/delivery.
**Parameters:**
- `title` (string): Product title
- `description` (string): Product description
- `price` (number|string): Price in Reais (e.g., 19.90) or Brazilian format ("19,90")
- `discount` (number): Discount percentage (use 0 for no discount)
- `url` (string): Product delivery URL
**Example prompts:**
- "Create a product called 'React Course' priced at R$99.00 with delivery URL https://example.com/course"
- "Add a new product: 'Node.js Guide', R$49.90, no discount, url https://example.com/node"
#### `update_product`
Update an existing product. Only provide fields you want to change; everything else is kept.
**Parameters:** `productId` + any fields from create_product (all optional)
On accounts whose product read does not carry the file or the stock lines, an edit of a product
that delivers only one of those is refused with an explanation: the API checks the request body
for a deliverable, and those two cannot be read back to be sent along. Pass `url` with the
change, or make it in the dashboard.
**Example prompt:** "Update product abc123 price to R$79.90"
#### `delete_product`
**Example prompt:** "Delete product abc123"
#### `upload_deliverable` / `attach_deliverable` / `delete_deliverable`
Attaching a file takes two tool calls and one upload you perform yourself — the bytes never pass
through this server:
1. `upload_deliverable` (`productId`, `fileName`, `fileType`, `fileSize`) returns
`{ uploadUrl, filePath }`.
2. `PUT` the raw bytes to `uploadUrl` with **only** `Content-Type: <fileType>` set. Do not send
an `Authorization` header — the signature is already in the URL and an extra header breaks it.
The URL is valid for one hour; the file may be up to 250MB.
3. `attach_deliverable` (`productId`, `filePath`, `fileName`, `fileType`, `fileSize`) confirms the
upload landed and links it to the product.
`attach_deliverable` keeps any link (`url`) the product already has; when both exist, the file
is what the buyer receives.
`delete_deliverable` unlinks the file; pass `filePath` to delete the stored bytes as well. It is
refused when the file is the product's only deliverable, since the API will not save a product
with nothing to deliver: give it a `url` first. If the unlink works and the byte deletion does
not, the answer carries `fileDeleteError` and the product stays unlinked.
**Example prompt:** "Attach ebook.pdf (2MB, application/pdf) to product abc123"
#### `list_upsells` / `create_upsell` / `update_upsell` / `delete_upsell` / `reorder_upsells`
Manage upsells for a product. Every upsell has two keys, `uid` and `id` (the row's UUID); `update_upsell`,
`delete_upsell` and `reorder_upsells` take either one and send the `uid` the API works with. A key that
matches nothing is an error that names both keys, never a silent success.
- **Price is in cents, and one field is charged.** The page and the purchase charge
`productOverrides[offeredProductId].price`, else the offered product's own price; the offer's top-level
`price` is a display snapshot. `price`, `originalPrice` and `discount` write the override and keep the
snapshot in step. `list_upsells` adds `effectivePriceCents`, the amount a buyer is charged.
- **Image:** the page reads `customImage { enabled, url }`; `imageUrl` is a shortcut for it.
- **Videos:** `videosSection { enabled, title?, titleColor?, videos[] }`, up to 4 videos
(`sourceType` `embed` needs `provider` + `providerId`, `url` / `upload` needs `url`). They show only when
`mediaType` is `video` (set for you when the section enables videos and `mediaType` is not sent);
`videos[0]` is the offer card's main video, the rest show above the footer.
- `update_upsell` has no PATCH behind it: the tool reads the offer, merges the fields you send (the media
sections merge, the video list replaces) and saves the whole offer. The offered product does not change.
**Example prompts:**
- "Show me the upsells for product abc123"
- "Create an upsell for product abc123 offering product xyz789 at R$29.90" (`price: 2990`)
- "Change the price of upsell u1 to R$19.90 and add a YouTube video"
- "Reorder the upsells for product abc123"
#### `list_downsells` / `create_downsell` / `update_downsell` / `delete_downsell` / `reorder_downsells`
Manage downsells for a product. Same rules as the upsells: either key (`uid` or `id`), `price` in cents
is the charged price of the offered product, `customImage` and `videosSection` as above.
**Example prompt:** "Add a downsell to product abc123 with a 50% discount headline"
#### `get_offer_snippets` / `set_offer_product_page` (offers on the seller's page)
The post-purchase funnel is one ordered sequence of products, and each product opens either on the
GG offer page or on the seller's own page ("Minha página"). Both can be mixed in the same funnel: the
funnel order decides where the buyer goes after accepting or declining, and each product opens on its
own kind of page.
- `set_offer_product_page` puts ONE product of an upsell or downsell on the seller's page (the page
where its buttons are pasted, the two texts and the button color), or back on the GG page with
`page: null` (the stored page is kept, so moving it back loses nothing).
- `get_offer_snippets` is read only: every product of the offer in funnel order, and for each one on
the seller's page the HTML to paste there (the same as "Copiar HTML" in the dashboard) and the page
it goes on. An agent with access to the seller's landing page can paste each snippet where the
buttons should appear, keeping the `<script>` tag.
Each snippet works only for its own product, when the funnel order reaches it. Pages must be https;
plain http only works for localhost against a development server.
**Example prompt:** "Put the second product of upsell u1 of product abc123 on https://example.com/oferta
with a green button saying 'Quero!', then give me the HTML to paste on that page"
#### `manage_tags`
Set tags on a product. Tags have a name and a hex color.
**Example prompt:** "Tag product abc123 with 'VIP' in purple and 'Featured' in green"
---
### Checkouts (6 tools)
#### `list_checkouts`
**Example prompt:** "Show me all my checkout pages"
#### `get_checkout`
**Example prompt:** "Get details of checkout abc123"
> **Note:** A checkout has two identifiers, and every response carries both. Its
> own is `uid` (Firestore document ID) — that is what `get_checkout`,
> `update_checkout`, `delete_checkout` and `manage_checkout_tags` take. The other
> is `productId`, a foreign key pointing at the product this checkout sells; the
> API names that field `id`, and the server renames it on the way in and out.
#### `create_checkout`
Creates an offer for a product that already exists.
**Required:** `title`, `productId`, `price`, `paymentMethods`, `checkout` (config)
`productId` must be the uid returned by `create_product` (or a `uid` from
`list_products`) — not a slug. A checkout created against a product that doesn't
exist is an orphan the dashboard cannot open, so this is validated before the
checkout is created.
`price` is in Reais (`99.90`) and is converted to the cents the API stores.
`orderBumps` takes product uids; each one is resolved and snapshotted into the
shape the checkout page reads, so a uid that does not exist fails the call
instead of silently vanishing from the page.
PIX and card charge through a **wallet** of the seller: `paymentMethods.pix` and
`paymentMethods.credit_card` take `{ "routeId": "<wallet id>" }`, with the id from `list_checkout_wallets`.
The wallet decides the gateways, the PIX fallback order and the card that charges; a checkout no
longer lists its own gateways. PayPal stays per checkout, outside the wallet:
`paymentMethods.paypal` takes `{ "token": "<PayPal credential id from list_tokens>", "type": "paypal" }`,
and `null` turns it off. An unknown method key is refused instead of being dropped.
**Timer and sales pop-ups.** The API stores both inverted (`checkout.timer.disabled`,
`checkout.salesNotifications.disabled`) and nothing reads `enabled`, so they have typed top-level
parameters: `timer { enabled, time "HH:MM:SS", text, bgColor, barColor, textColor, enableSticky }` and
`salesNotifications { enabled, position, defaultMessages, customMessages, minMessages, interval, colors }`.
The server maps `enabled` to `disabled = !enabled`; an `enabled` sent inside the free-form `checkout` is
mapped the same way. A new checkout has its sales pop-ups off unless `salesNotifications.enabled` is true.
**Layout, domain, analytics, images.**
- `checkoutModel` is `v2` to `v6` (the backend default stays `v2`; `v6` is the button/embed checkout and is
refused for a checkout with shipping).
- `customDomainId` is the `id` of a verified domain from `list_custom_domains`; `null` unbinds it.
- `analytics: { clarity: { projectId } | null }` sets or removes Microsoft Clarity (`projectId` is 10 to 64
lowercase letters and digits).
- `metricToken` is one credential id from `list_tokens`, or an array of them to fire several pixels.
- `image` and `bannerUrl` take an absolute https URL or the `/api/r2-proxy/...` path `upload_media`
returns. The API silently drops a rejected `bannerUrl`, so read the checkout back after setting it.
**Example prompt:** "Create a checkout page for my React Course priced at R$99.90"
#### `update_checkout`
Only provide the fields you want to change. The API keeps every field missing from
the body as stored, so the tool sends the checkout's identity (title, owner, product,
price) plus your changes and nothing else from the stored document.
`paymentMethods` is the exception: it replaces the stored methods as a whole, and `installments`,
`showInstallmentsOnPrice` and `primaryPaymentMethod` travel in the same map. So every stored method
(`pix`, `credit_card`, `bank_slip`, `paypal`) has to come back in it, or be sent as `null` to turn it
off; a body that leaves one of them out (an edit of `installments` alone, say) is refused before the
write, since the API would delete that method and could unpublish the checkout. A method the API hides
from the read (one that cannot charge today) is not visible here; the API refuses a body that leaves
it out (`HIDDEN_PAYMENT_METHOD_OMITTED`, ggCheckout/saas-checkout#2183), and `null` turns it off.
The same `timer`, `salesNotifications`, `checkoutModel`, `customDomainId`, `analytics`, `metricToken`,
`image` and `bannerUrl` parameters as `create_checkout` apply here; `timer` and `salesNotifications` merge
into the stored ones, so `{ "timer": { "enabled": false } }` hides the countdown and keeps its time and text.
**Example prompt:** "Update checkout abc123 price to R$79.90 and unpublish it"
#### `delete_checkout`
**Example prompt:** "Delete checkout abc123"
#### `manage_checkout_tags`
Tags with name and hex color (max 5 per checkout).
**Example prompt:** "Add a 'promo' tag with color #FF5733 to checkout abc123"
---
### Payments (8 tools)
#### `get_my_business_id`
**Example prompt:** "What is my business ID?"
**Pro Tip:** Use it in follow-up prompts: "Get my business ID, then show me all payments"
#### `list_payments` / `get_payments_paginated` / `get_payment`
`list_payments` is the first page of `get_payments_paginated` with no filters (50 payments by
default, up to 100), with `total` and `nextCursor`; use `get_payments_paginated` to go further or
to filter. With `all: true` (when you ask for all payments) it reads pages of 100 with a pause
between them, so the API does not rate-limit the key, and stops after 500 payments; `complete` is
false while more remain, and `lastCreatedAt` = `nextCursor` resumes the walk.
#### `get_sales_attribution`
Which campaign or ad sells: sales aggregated by 1 to 3 distinct keys among `utm_source`, `utm_medium`,
`utm_campaign`, `utm_content`, `utm_term`, `src` and `sck` (default `utm_source`, `utm_campaign`,
`utm_content`). Each row has the key values plus `paidCount`, `paidGrossCents`, `refundedCount` and
`refundedCents` (BRL cents: a sale in another currency enters as its BRL value), and `totals` sums
them. Paid and refunded sales are both dated by when the sale was made: a refund counts in the period
of its sale, not in the one it was refunded. Aggregated only: no buyer data and no per-payment UTMs.
A `null` key value is the sales that came without that parameter; `utm_content` usually carries the ad id.
`from` and `to` are ISO dates (default: the last 7 days; at most 90 days, checked before the call).
`truncated: true` means the rows were cut: narrow the period or group by fewer keys.
**Example prompt:** "Which campaigns sold the most in the last 30 days, and how many were refunded?"
#### Payments list
**Example prompts:**
- "Show me all payments for my business"
- "Get the last 20 paid payments from this month"
- "Search for payments with email john@example.com"
- "How many pending payments do I have?"
#### `get_payment_fulfillment` / `update_payment_fulfillment`
Manage physical order fulfillment.
**Example prompts:**
- "Show the fulfillment status for payment xyz789"
- "Mark payment xyz789 as shipped with tracking code BR123456789"
#### `check_payment_status`
**Example prompt:** "Check the gateway status for payment xyz789"
---
### Webhooks (6 tools)
**Example prompts:**
- "Show me all my webhooks"
- "Create a webhook for pix.paid events at https://example.com/webhook"
- "Update webhook abc123 to also listen for card.paid"
- "Delete webhook abc123"
- "Send a test pix.paid event to webhook abc123"
- "Test my webhook abc123 with an expired event overriding the payment ID to pay_xyz"
#### Event names
The API stores the event names you register **without checking them**, and delivery matches
them exactly — so a name outside this list is accepted, saved, and never fires, with no error
anywhere. These are the names that exist:
| Family | Events |
|---|---|
| PIX | `pix.paid`, `pix.generated`, `pix.expired`, `pix.failed` |
| Card | `card.paid`, `card.generated`, `card.expired`, `card.failed`, `card.pending` |
| Subscription | `subscription.canceled`, `subscription.past_due`, `subscription.renewed` |
| Quiz funnel | `quiz.completed`, `quiz.lead_captured` |
| Cart | `checkout.abandoned` |
There is **no refund or chargeback event**: nothing dispatches one. `pix.failed` and
`card.pending` can be registered but have no emitter today. Names of the form
`payment.*` are the platform's internal vocabulary between services, not seller webhooks —
registering one gets you silence.
#### Webhook Event Payloads
All events share the same top-level shape. Key fields:
| Field | Type | Notes |
|---|---|---|
| `event` | string | Event type (see below) |
| `payment.id` | string | Payment identifier |
| `payment.status` | string | `pending`, `paid`, `expired` |
| `payment.method` | string | `pix`, `credit_card` |
| `payment.amount` | number | Amount in **cents** (e.g. `9900` = R$99,00) |
| `payment.customer.name` | string | Buyer name |
| `payment.customer.email` | string | Buyer email |
| `payment.customer.document` | string | CPF |
| `payment.customer.phone` | string | Phone (E.164, e.g. `5511999999999`) |
| `payment.createdAt` | string | ISO 8601 |
| `payment.paidAt` | string \| undefined | Present on `pix.paid` and `card.paid` |
| `payment.expiredAt` | string \| undefined | Present on `pix.expired` and `card.expired` |
| `product.id` | string | Product identifier |
| `product.title` | string | Product name |
**What `test_webhook` sends.** These bodies are built by the MCP server and posted straight to
your endpoint — the platform is not involved — so they are a plausible payment-shaped payload to
exercise your handler with, not a byte-for-byte copy of a live delivery:
```json
{ "event": "pix.paid", "payment": { "status": "paid", "method": "pix", "paidAt": "..." }, ... }
{ "event": "card.paid", "payment": { "status": "paid", "method": "credit_card", "paidAt": "..." }, ... }
{ "event": "pix.expired", "payment": { "status": "expired", "method": "pix", "expiredAt": "..." }, ... }
{ "event": "card.expired", "payment": { "status": "expired", "method": "credit_card", "expiredAt": "..." }, ... }
```
**Signature verification** (when a `secret` is set):
```
X-Webhook-Signature: sha256=<HMAC-SHA256(secret, raw_body)>
X-GGCheckout-Event: pix.paid
```
```ts
import { createHmac } from 'crypto';
const sig = createHmac('sha256', secret).update(rawBody).digest('hex');
const isValid = sig === incomingHeader.replace('sha256=', '');
```
---
### Store (28 tools)
`list_stores` returns your stores' ids; every other store tool takes one.
**Manage the store:** `create_store`, `get_store`, `update_store`, `delete_store`;
categories with `list_store_categories`, `create_store_category`, `update_store_category`,
`delete_store_category`; review moderation with `list_store_reviews`, `create_store_review`,
`update_store_review`, `delete_store_review`. `update_store` merges objects into the stored
config and replaces lists (`productOrder`, a category's `productIds`). PIX and card charge
through a wallet: set `paymentRouteId` (from `list_checkout_wallets`) and switch the methods on in
`paymentMethods` (only `pix` and `credit_card`; any other key is refused); the gateways are the
wallet's. Creating or publishing a store requires a
seller with verified email and phone.
**Store builder:** `get_store_layout`, `update_store_layout`, `publish_store_layout`,
`list_store_layout_history`, `restore_store_layout_version`, `get_store_theme`.
`update_store_layout` saves a draft and merges `theme`, `config` and `pageSettings` into the
stored ones; `blocks` replaces the whole list. Nothing is public until you publish.
**Catalog reads** (`get_store_public`, `list_store_products`, `get_store_product`,
`list_categories`, `list_feedbacks`) read the public storefront: they only see published
stores, list approved reviews only, and may be cached for up to 7 days.
`get_store_order` only returns pending orders with an API key.
Store integrations, store upsells/downsells, video, sales notifications and custom fields
are dashboard-only.
**Example prompts:**
- "Create a store called 'Loja Teste', charge it through my 'Principal' wallet with PIX on and publish it"
- "Create a 'Cursos' category with products abc and def"
- "Approve all pending reviews of my store"
- "List my stores"
- "Change the primary color of my store to #8b5cf6 and publish it"
- "Undo the last store publish"
- "List all products in my store"
- "List customer reviews for my store with rating stats"
- "Validate coupon code SAVE20 for an order of R$100"
---
### Funnels / Quiz (10 tools)
A quiz is a funnel: `question` components with options and scores, `result` components,
`scoring.ranges` and conditional `flow.edges`. `update_funnel` merges `design` and `settings`
into the stored ones; `steps`, `flow` and `scoring` replace the stored value, so read the
funnel first and send the full array back. Pixels and webhooks are linked by id
(`settings.pixelTokenIds` from `list_tokens`, `settings.webhookIds` from `list_webhooks`).
`list_funnel_checkouts` gives the checkouts and gateways a `pix` component can use. The component
links to a checkout by its uid and charges through that checkout's wallet: the gateway is not chosen
in the component (a `gatewayId` in its props is ignored).
**Example prompts:**
- "List all my funnels"
- "Create a quiz with 3 questions that scores leads into beginner and advanced"
- "Change the primary color of funnel abc123 to red"
- "Send the leads of funnel abc123 to my Zapier webhook"
- "Duplicate funnel abc123"
- "Show me the leads from funnel abc123 that completed all steps"
- "Show me the drop-off analytics for each step in funnel abc123"
---
### Members Area (32 tools)
**Example prompts:**
- "List all my members areas"
- "Create a members area for product abc123 called 'React Academy'"
- "Add a module called 'Getting Started' to members area xyz"
- "Create a video lesson called 'Introduction' in section abc of module xyz"
- "Reorder the modules in members area xyz"
- "List all students in members area xyz"
- "Add student john@example.com to members area xyz"
- "Import these 50 students to members area xyz"
- "Block student abc123"
**Files the seller sends.** `upload_members_area_file` uploads a file that is already on the machine
running this server (an absolute path inside `GGCHECKOUT_UPLOAD_ROOT`, see "Upload folder") and
returns the URL to pass on:
| `kind` | Accepts | Use the `url` in |
|---|---|---|
| `image` | jpg, png, webp, gif, avif | `update_members_area` branding (logo, banner), module `imageUrl`, section and lesson `thumbnailUrl` |
| `video` | mp4, webm, mov, avi, mpeg — up to 500 MB | `create_lesson` type `video`: `videoUrl` and `content: { videoUrl, videoSourceType: "upload" }` |
| `file` | pdf, doc(x), xls(x), zip, rar, 7z, mp3, ogg, wav, images, videos — up to 100 MB; needs `areaId` | `create_pdf_lessons`, `create_lesson` `content.fileUrl`, or `add_lesson_attachment` |
Nothing is downloaded from another platform: videos and PDFs come from the seller. Modules and
sections take `dripSettings` (release N days after purchase, enrollment or first access); lessons
take a cover and a position. `update_module` / `update_section` / `update_lesson` change only the
fields sent, and `delete_module` / `delete_section` / `delete_lesson` remove the item with everything
under it — irreversible, so they take `confirm: true`. These six need the API release with the
`PATCH`/`DELETE` structure routes; an older deployment answers that it has no such route yet.
---
### Discounts / Coupons (6 tools)
**Example prompts:**
- "Show me all my discounts"
- "Create a 15% discount coupon called SAVE15 for all products"
- "Create a buy-2-get-1 discount for product abc123"
- "Deactivate discount abc123"
- "Validate coupon SAVE15 for an order with 2 items totaling R$200"
---
### WhatsApp (26 tools)
Follows the dashboard: **chips** are the connected numbers, and an **operation** ("Operações" in the
dashboard, a session in the API and in the tool names) is a primary chip with up to two fallbacks
that sends for a set of products. Templates belong to operations. Creating or deleting a chip or an
operation, and connecting an official (Meta) number, are refused to API keys on purpose: do those in
the dashboard.
**Example prompts:**
- "Which WhatsApp chips are connected?"
- "Connect chip abc123 to 5511999999999 with a pairing code"
- "Restart chip abc123"
- "Check whether my WhatsApp chips are really connected"
- "How are my WhatsApp operations?"
- "Make chip def456 the primary of operation 'Sales' and abc123 its fallback"
- "Send operation 'Sales' for products p1 and p2"
- "Create a template for the 'upsell_paid' event in operation 'Sales': 'Hi {{nome}}, thanks for purchasing {{produto}}!'"
- "Disable template abc123"
- "Check the WhatsApp delivery status for payment xyz789"
- "Resend the WhatsApp delivery for payment xyz789"
- "List my WhatsApp funnels"
- "Create a manual WhatsApp funnel 'Welcome' with 2 messages, 1 hour apart, on operation abc123"
- "Turn on the abandoned-cart funnel"
#### WhatsApp funnels
`list_whatsapp_funnels`, `get_whatsapp_funnel`, `create_whatsapp_funnel`, `update_whatsapp_funnel`,
`delete_whatsapp_funnel`, `toggle_whatsapp_funnel` and `import_whatsapp_funnel_contacts` (up to 500
contacts per call). A funnel is up to 5 messages with a wait between them, started by a trigger or by
hand from the inbox. The caps match the dashboard's. Only one funnel per automatic trigger can be on.
A funnel is always created off. Turning one on starts messaging real customers, so it waits for the
seller's yes: the model is told to confirm before `toggle_whatsapp_funnel`, and in the view every path
that creates or turns on a funnel ("Usar modelo" included) goes through a confirmation. The message
variables are the dashboard's: `{{customer_name}}`, `{{assinatura}}` and `{{cupom}}` on every trigger,
plus the checkout ones on the automatic triggers and `{{pix_copia_cola}}` on the PIX ones.
Importing contacts messages people who never wrote in, so it needs the inbox switch below.
#### WhatsApp inbox
Only in clients that draw MCP Apps. `open_whatsapp_inbox` opens the inbox in a view, and the model
receives `{ available, enabled, conversations, unread, truncated }` (`truncated`: the counts stopped at the newest 200 conversations) and nothing else: names, phones and message
text only ever reach the view, through app-only tools (`list_whatsapp_conversations`,
`list_whatsapp_messages`, `send_whatsapp_reply`, `mark_whatsapp_conversation_read`,
`get_whatsapp_conversation_funnel`, `start_whatsapp_conversation_funnel`,
`stop_whatsapp_conversation_funnel`, `set_whatsapp_conversation_opt_out`) that the model does not
list and that exist only for a client with MCP Apps support. A customer message therefore never enters
the model's context, and the model cannot answer one.
Access by API key is off by default, per store: turn on **Permitir acesso pelo MCP** in the dashboard's
inbox settings (a key can never turn it on, and turning it off cuts access on the next request). While
it is off the API answers 403 `INBOX_API_ACCESS_DISABLED`; if the store has not accepted the inbox term,
403 `INBOX_TERMS_REQUIRED` (accept it in the dashboard: the MCP never does). On an account where the
funnel and inbox are not released yet, the tools answer "ainda não disponível nesta conta".
---
### Billing (11 tools)
**Example prompts:**
- "What's my current billing balance?"
- "What's my billing status?"
- "Show me my invoices"
- "Generate the PIX for my open invoice"
- "Add R$100 in billing credits"
- "Do I have a card on file?"
- "Remove my saved card"
---
### Shipping / MelhorEnvio (7 tools)
**Example prompts:**
- "Calculate shipping to CEP 01001-000 for checkout abc123"
- "Check the shipping status for payment xyz789"
- "Generate a shipping label for payment xyz789"
- "Get the print URL for shipping order abc123"
---
### Gateway Tokens and Wallets (5 tools)
**Example prompts:**
- "List my payment gateway tokens"
- "Which wallets do I have, and which gateways charge PIX in each?"
- "Add a PushinPay token"
- "Remove token abc123"
`insert_token` creates only the four types the API accepts: `pushinpay`, `utmify`,
`emailprovider` and `mercadopago`. The platform processes payments through 25+ gateways, but the
others are connected from the dashboard, not through this API — asking for one here is refused.
`list_checkout_wallets` lists the seller's wallets (payment routes): the gateways that charge PIX,
in fallback order, and card, and the id that `routeId` / `paymentRouteId` take. Checkouts and
stores charge PIX and card only through a wallet. Wallets are created and edited in the dashboard.
The payments API's `list_wallets` lists the same wallets by their public id (`wal_…`), for
`create_pix_charge`.
---
### Discord (7 tools)
**Example prompts:**
- "List my Discord connections"
- "Show me the channels in server 123456"
- "Show me the roles in server 123456"
- "Create a private sales notification channel in server 123456"
- "Update my Discord connection to use Portuguese"
---
### Dashboard (3 tools)
**Example prompts:**
- "Show me my sales stats for today"
- "Show me the revenue chart for this month"
- "Which payment method approves the most this week?" (`focus: approval`)
- "Refresh my dashboard cache"
---
### Custom Domains (5 tools)
A verified domain is bound to a checkout with `customDomainId` (the domain's `id`) in `create_checkout` or
`update_checkout`; `null` unbinds it.
**Example prompts:**
- "List my custom domains"
- "Add domain checkout.example.com"
- "Verify DNS for domain abc123"
- "Remove domain abc123"
---
### Media (1 tool)
#### `upload_media`
Uploads an image from the machine running this server (inside `GGCHECKOUT_UPLOAD_ROOT`, see
[Upload folder](#upload-folder)) and answers `{ url, path }`, where `url` is the relative
`/api/r2-proxy/...` path. Pass it as a checkout's `image` or `bannerUrl`, an offer's `customImage.url`,
or any image field that takes it. The bytes go straight to storage through a presigned URL (not through a
multipart POST to the API, which the firewall blocks) and the API sanitizes the image when the upload is
confirmed. `upload_members_area_file` takes the same route for `kind: "image"`.
**Example prompt:** "Upload ~/gg/banner.png and use it as the banner of checkout abc123"
---
### Tracking (2 tools)
- `explain_tracking`: the pt-BR guide to how a sale's metrics reach Meta, TikTok, Google Ads and UTMify. No API call. Optional `topic`: `paths`, `initiate_checkout`, `purchase`, `utms`, `dedup`, `funnel`, `store`, `errors`.
- `diagnose_tracking`: optional `checkoutId`, `funnelId`, `paymentId`; none means an account overview. Reads the tracking tokens with their health, the checkout or funnel links, a payment's UTMs and event dispatch, and the last 24 hours of integration errors. It never returns credentials, and a saas route not deployed yet becomes a "não disponível ainda" finding, not an error.
**Example prompts:**
- "How do my sales metrics reach Meta and TikTok?"
- "Why does the sale of the course not show in TikTok?"
---
### Tracking links (1 tool)
`build_tracking_link` builds the link to sell from, with UTMs, and says where to paste it. No API write.
- Destination (pick one): `checkoutId`, `funnelId`, `storeId` (plus `productId` for one product) or `url` (any https URL). A checkout, funnel or store opens on the seller's verified custom domain when it has one; otherwise the link uses the `publicUrl` the dashboard API sends, or the GG address the MCP builds itself.
- `platform`: `meta`, `tiktok`, `google` or `kwai` (UTMify's templates, the platform fills the macros when the ad runs), or `manual` (default), where you fill `utm_source`, `utm_medium`, `utm_campaign`, `utm_content`, `utm_term`, `src` and `sck`.
- Merge rule: a key the URL already has is not repeated, and values you pass win over the URL and over the template.
**Example prompts:**
- "Build the link of my checkout to advertise on Meta"
- "Make a link of the quiz for my Instagram bio, source instagram, medium bio"
---
### Rewards / Goals (2 tools)
**Example prompts:**
- "What's my progress on sales milestones?"
- "Redeem the 10K bracelet reward"
`calculate_rewards` is the only reader: it returns the progress and the milestone list together,
in reais (`currentRevenueCents` carries the same value in cents). There is no reward catalogue
endpoint, and a cache miss is rate limited to 10 per hour.
---
### Profile / Auth (6 tools)
**Example prompts:**
- "Show me my profile"
- "Update my name to 'John Doe'"
- "List my support emails"
- "Add support@example.com as a support email"
- "What's my KYC status?"
---
### Push Notifications (3 tools)
**Example prompts:**
- "List my registered push devices"
- "Remove device abc123"
---
### Telegram (15 tools)
Bots (`list_telegram_bots`, `get_telegram_bot`, `create_telegram_bot`, `update_telegram_bot`,
`delete_telegram_bot`, `validate_telegram_token`, `get_telegram_bot_groups`), flows
(`list_telegram_flows`, `get_telegram_flow`, `create_telegram_flow`, `update_telegram_flow`,
`delete_telegram_flow`, `deploy_telegram_flow`), `list_telegram_leads` and `telegram_media_upload`.
**Example prompts:**
- "List my Telegram bots"
- "Create a basic flow for bot abc123 and deploy it"
- "Show the qualified leads of bot abc123"
---
### Payments API (6 tools)
Requires `GG_PAYMENTS_API_KEY` (see Configuration). PIX only.
Its own rate limits, not the ones in [Rate Limits](#rate-limits): a `ggpk_test_` key creates at most 10
charges per minute (cancels 10, reads 60); a `ggpk_live_` key defaults to 60 creates, 60 cancels and 300
reads per minute. A 429 carries `Retry-After`.
`list_wallets`, `create_pix_charge`, `get_payment_intent`, `list_payment_intents` (filters:
`status`, `external_reference`, `created_gte` as unix seconds, `starting_after`, `limit`),
`cancel_payment_intent` and `get_payments_api_limits` (requests per minute per bucket for the key in
use and the maximum per charge; says so when the API has no limits route yet).
`create_pix_charge` takes the wallet id (`wal_…`), the amount **in cents** (`4990` = R$ 49,90),
`external_reference` (required, e.g. the order id: a repeat with the same one fails instead of
charging twice while the first charge holds it. It is unique among charges that hold it: open, or
paid before being canceled or expired. A failed, expired or canceled charge releases it, and its PIX
may still be paid), `description`, `metadata` and the buyer (`buyer_name`, `buyer_email`,
`buyer_document`, `buyer_phone`: all four are required, the phone with 10 to 15 digits). With a `ggpk_live_` key it creates a **real** charge; with
`ggpk_test_` a simulated one. The response says which with `livemode` and carries the PIX in
`pix.copy_paste` / `pix.qr_base64`.
Keep `create_pix_charge` and `cancel_payment_intent` on **manual approval** in your MCP client (no
auto-approve). The buyer's name, `description` and `metadata` that come back in the results are
written by third parties, and the approval prompt is what stops a text there from turning into a
charge or a cancel.
**Example prompts:**
- "List my wallets"
- "Create a R$ 49,90 PIX charge for order 1234 on wallet wal_8f3kQ2mN7xR4tY9pL6aBcD for Maria Souza (maria@example.com, CPF 000.000.000-00, phone 11000000000)"
- "Did the charge for order 1234 get paid?"
---
## Price Formats
Prices are accepted in two formats:
1. **Reais (recommended):** `19.90` = R$19.90 → stored as `1990` cents
2. **Brazilian format:** `"19,90"` or `"1.990,00"`
All prices are stored internally in cents.
---
## Security Best Practices
🔒 **Never share your API key publicly**
✅ Always use environment variables
✅ Revoke compromised keys immediately
✅ Generate new keys periodically
❌ Don't hardcode keys in your code
❌ Don't commit keys to version control
---
## Rate Limits
These cover the `ggck_live_` API only. The Payments API has its own limits (see [Payments API](#payments-api-5-tools)).
| Limit | Value |
|-------|-------|
| Per hour | 1,000 requests |
| Per minute | 30 requests |
Rate limits are enforced **before** any operation is executed — a blocked request never reaches the database or business logic.
When a request is rate limited, the API returns HTTP 429 with a `Retry-After` header and a structured JSON body:
**Header:**
```
Retry-After: 23
```
**Body:**
```json
{
"error": "rate_limit_exceeded",
"limit_type": "apikey_strict",
"limit": 30,
"window": "1m",
"retry_after": 23
}
```
| `limit_type` | Limit | Window | What to do |
|---|---|---|---|
| `apikey_strict` | 30 | 1m | Wait `retry_after` seconds, then resume |
| `apikey` | 1,000 | 1h | Migration too large for one session — split into batches across hours |
| `product_upload_strict` | 15 | 1m | Slow down file uploads |
| `product_upload` | 35 | 1h | Max 35 file uploads per hour |
Always use the `retry_after` value from the body (or the `Retry-After` header) instead of guessing.
**A 403 that is not from the API.** The API's own 403s are JSON (`Não autorizado`) and mean a permission
problem. A 403 with an HTML or empty body was answered by the firewall in front of the API (Cloudflare
WAF): the server reports it as "Blocked at the network edge", says it is not a permissions problem, and
asks you to wait about 1 minute and retry, then contact support if it persists.
### Bulk operations and migrations
If you need to create or update many resources in sequence (e.g. importing products, cloning checkouts), follow these guidelines to avoid hitting the limits:
- **Space requests by at least 2 seconds** to stay safely under the 30 req/min limit
- **Cap sustained throughput at ~900 req/hour** to leave headroom below the 1,000/hour ceiling
- **On a 429 response**, stop immediately, read the `Retry-After` header, wait that many seconds, then resume — do not retry without waiting
- **Never loop without a delay** — tight loops will exhaust the per-minute quota in under 30 seconds and trigger a full minute of blocking
**Recommended pacing for bulk jobs:**
```
for each item:
call tool()
if response is 429:
wait Retry-After seconds
retry once
else:
wait 2 seconds before next call
```
---
## Local Development
```bash
git clone https://github.com/ggCheckout/ggcheckout-mcp.git
cd ggcheckout-mcp
npm install
```
### .env
```bash
GGCHECKOUT_API_KEY=ggck_live_your_key_here
GGCHECKOUT_API_URL=http://localhost:3000 # optional, defaults to https://ggcheckout.app
GGCHECKOUT_UPLOAD_ROOT=/path/to/import # needed by upload_members_area_file, the only folder it reads from
```
### Commands
```bash
npm run dev # Development with hot reload
npm run build # Views (ui/) and TypeScript build
npm start # Run compiled build
npm test # Unit tests of the server and of the views
npm run dev -w ui # Views preview at http://localhost:6040/preview/index.html
npm run test:e2e # E2E against staging (requires .env)
```
### MCP Inspector (Interactive UI)
```bash
GGCHECKOUT_API_KEY=ggck_live_... npx @modelcontextprotocol/inspector -- npx tsx src/index.ts
```
Opens a browser UI to test any tool interactively.
### Views (`ui/`)
The inline views are an npm workspace: React, built by Vite into one self-contained HTML
(`vite-plugin-singlefile`; every script, style, font and image inline, since hosts give it no
network), talking to the host through the official `@modelcontextprotocol/ext-apps` `App`.
- `src/GgApp.tsx` picks the view; `src/views.ts` maps each tool to its view, and a server test
checks that this list matches the tools whose `_meta.ui` points to the app.
- Each view has a folder in `src/` (`dashboard/`, `pix/`, and so on, one per row of the table above)
with its pure model (`model.ts`, unit tested), its components and its stylesheet, scoped to the
view's root class.
- The look follows the seller dashboard of saas-checkout (Seasons tokens, the dashboard cards);
colors and assets are copied from there and say where from.
- `preview/` is a real MCP Apps host (`AppBridge`) over invented fixtures, light and dark side by
side, answering the views' tool calls (period buttons, PIX polling). `?only=<scenario>` and
`?theme=light|dark` narrow it.
- `npm run build -w ui` fails if the HTML would load anything from outside or grow past 1.5 MB.
---
## Troubleshooting
### Error: 401 Unauthorized
- Check that your API key is correct
- Ensure the key starts with `ggck_live_`
- Verify the key hasn't been revoked in your dashboard
### Error: 403 Forbidden
- You're trying to access a resource that doesn't belong to you
- API keys are scoped to the user who created them
### Error: 404 Not Found
- The resource ID doesn't exist
- For checkouts, use the `uid` (Firestore document ID) returned by `list_checkouts`
- Note that `create_checkout` takes a different identifier: `productId`, the uid
of the product being sold
- `Product <id> not found` from `create_checkout` means the product is missing or
belongs to another seller — the API answers 403 for both, so they look alike
### Error: 429 Too Many Requests
- Rate limit exceeded (30 req/min or 1,000 req/hour)
- Read the `Retry-After` response header — it tells you exactly how many seconds to wait
- For bulk operations, space calls by at least 2 seconds to avoid hitting the limit in the first place
- See the [Rate Limits](#rate-limits) section for bulk operation guidelines
### Error: Invalid price format
- Use Reais as a number (`19.90`) or Brazilian format as a string (`"19,90"`)
- Don't mix formats
---
## Support
- 📧 Email: suporte@ggcheckout.com
- 📖 Docs: https://docs.ggcheckout.com
- 🐛 Issues: https://github.com/ggCheckout/ggcheckout-mcp/issues
## License
MIT © GG Checkout Team
This server cannot be deployed
Maintenance
ActivityActive
ResponsivenessNo recent community issues