Connector guide11-minute read49 MCP tools7 languages

Connect Magalu to Gemini CLI via MCP: Orders and SKUs

Magalu Marketplace (Magazine Luiza) seller API: orders and deliveries with NF-e, shipping and delivery confirmation, SKUs with prices and stock, processing traces, categories, customer questions, chat and SAC tickets. Sign-in with ID Magalu (OAuth2).

HCBy HelpCode teamUpdated 11 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Magalu

Magalu

Magalu Marketplace (Magazine Luiza) seller API: orders and deliveries with NF-e, shipping and delivery confirmation, SKUs with prices and stock, processing traces, categories, customer questions, chat and SAC tickets. Sign-in with ID Magalu (OAuth2).

tools

49

Region

BR

Category

E-commerce

Authentication

OAuth 2.0

Required env vars

MAGALU_CLIENT_IDMAGALU_CLIENT_SECRET
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Summary

Magalu Marketplace (Magazine Luiza) seller API: orders and deliveries with NF-e, shipping and delivery confirmation, SKUs with prices and stock, processing traces, categories, customer questions, chat and SAC tickets. Sign-in with ID Magalu (OAuth2).

Guided setup

Connect Magalu to Gemini in 2 minutes

Start a free trial on AnythingMCP Cloud, connect Magalu in the guided setup, then add your MCP URL to Gemini. No code and no server to run.

No credit card · 7-day trial · Self-host alternative available

Try asking

Example prompts for Magalu

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Magalu · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Magalu, paste the Client ID and Client Secret of your ID Magalu client, click Authorize with Provider and sign in with your seller account, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Magalu + Gemini

Magalu Marketplace (Magazine Luiza) seller API: orders and deliveries with NF-e, shipping and delivery confirmation, SKUs with prices and stock, processing traces, categories, customer questions, chat and SAC tickets. Sign-in with ID Magalu (OAuth2).

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

MAGALU_CLIENT_ID, MAGALU_CLIENT_SECRET

Step 1 — Get credentials

Setting up takes about 15 minutes.

  1. Sign in at https://id.magalu.com with the ID Magalu account of a legal representative of the store (only they can grant consent for the store).
  2. Create an OAuth client, either in the console at https://developers.magalu.com/clients or with the idm CLI (github.com/luizalabs/id-magalu-cli): ./idm login, then ./idm client create --name "AnythingMCP" --redirect-uris "https://cloud.anythingmcp.com/api/mcp-oauth/callback" --audience "https://api.magalu.com https://services.magalu.com" --scopes "<scopes>". On a self-hosted server use <your server URL>/api/mcp-oauth/callback. The audience must include https://services.magalu.com, or questions and chat answer 401. Add the scopes listed in the connector's OAuth settings; some (scores, for example) need approval by Magalu.
  3. Copy the Client ID into MAGALU_CLIENT_ID and the Client Secret into MAGALU_CLIENT_SECRET. The secret is shown only once.
  4. Install, click Authorize with Provider, sign in and choose the store (tenant) on the consent page. Access tokens last up to 2 hours and are renewed with the refresh token.

Where to start: magalu_get_seller returns the channel id (needed by every price, stock, SKU and delivery write) and the tenant id. Then magalu_list_orders (status approved for paid orders) or magalu_list_deliveries (status approved: to invoice and ship) and magalu_get_order or magalu_get_delivery.

Orders and deliveries: an order has one or more deliveries; invoicing and shipping happen per delivery. Flow for sellers shipping themselves: magalu_add_delivery_invoice (44-digit NF-e key plus the XML; SEFAZ validates it, see magalu_list_delivery_invoices; fix an invalid one with magalu_replace_delivery_invoice), magalu_ship_delivery (carrier, tracking code and URL), then magalu_mark_delivery_delivered, which cannot be undone. magalu_list_delivery_history shows the steps. In delivery writes the channel id is the order's channel.id. Check handling_time.limit_date (UTC; the Seller Portal shows Brasília time, so dates may look a day apart). magalu_generate_shipping_labels (Magalu Entregas labels) is installed switched off. There is no seller cancellation endpoint: cancellations arrive as status cancelled or as SAC tickets of type cancellation.

Portfolio (asynchronous): magalu_list_skus, magalu_get_sku, magalu_create_sku, magalu_update_sku; prices with magalu_get_price, magalu_set_price (first price) and magalu_update_price; stock with magalu_get_stock, magalu_set_stock (first stock) and magalu_update_stock (magalu_list_warehouses gives distribution-centre ids for multi-origin sellers). Every write answers 202 with a trace_id: read the outcome with magalu_list_traces (code = your SKU) or magalu_get_trace. magalu_get_sku_validation_info explains a blocked SKU. Categories: magalu_find_categories, magalu_list_category_hierarchy, magalu_list_category_attributes, magalu_list_category_datasheet.

Money: amounts are integers with a normalizer (100 = cents) in BRL: price 9990 means R$ 99,90. The connector always sends currency BRL.

Questions and chat: magalu_list_questions (WAITING_RESPONSE = open), magalu_get_question, magalu_answer_question (moderated before publication). Chat: magalu_list_conversations, magalu_get_conversation, magalu_list_conversation_messages, magalu_send_conversation_message, magalu_mark_conversation_read.

Customer service (SAC): magalu_list_tickets, magalu_get_ticket, magalu_list_ticket_messages, magalu_list_ticket_events, magalu_list_ticket_returns, magalu_send_ticket_message. SAC writes answer 202 with a transaction id: magalu_list_transactions and magalu_get_transaction. Installed switched off: magalu_create_ticket (cancellation or shipping tickets), magalu_create_ticket_return (reverse shipment) and magalu_create_ticket_event (return steps). The connector cannot authorise refunds.

Paging and limits: lists take offset and limit (_offset, _limit; most at most 100, offset up to 5,000 rows) and answer meta.page plus results. Dates are ISO 8601 in UTC. Rate limits per seller and minute: orders and deliveries 850, SKU create 650 and read 550, prices 850, stock 650 writes, questions 200 reads and 50 writes, chat 200 reads and 50 writes, SAC tickets 100. A 429 means wait and retry.

Writes: confirm first. Invoices, shipping, delivery confirmation, prices, stock, SKU changes and messages act on the live store. Before each call show the user what will change and wait for a yes.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Gemini

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of YOUR_MCP_API_KEY.
  2. Save the file and restart gemini.
  3. Run /mcp inside Gemini CLI (or gemini mcp list in your shell) — anythingmcp should show as connected.
  4. Start prompting — Gemini CLI can now call the Magalu tools.

Available tools

ToolWhat it does
magalu_get_sellerRead the seller behind the token: tenant id (GENPUB.…, needed by magalu_get_sku_validation_info), channel id and name (needed by every…
magalu_list_warehousesList the distribution centres enabled for the seller (Magalu Entregas multi-origin): id, name, display_name and active. The id goes into…
magalu_list_ordersList orders, oldest first by default: id, code, status, purchased_at, approved_at, updated_at, channel, customer (name, document number…
magalu_get_orderRead one order by its code: status, dates, customer, amounts, payments and its deliveries (packages) with their ids. Ship, invoice and…
magalu_list_deliveriesList deliveries (packages; one order can have several): id, status (new, approved, invoiced, shipped, delivered, cancelled, frozen), items…
magalu_get_deliveryRead one delivery: items (sku, quantity, unit_price), shipping (provider, recipient and address, deadline, handling_time limit_date…
magalu_list_delivery_historyRead the status history of a delivery: created_at and description of each step, oldest first by default
magalu_list_delivery_invoicesList the NF-e invoices attached to a delivery: key, issued_at, status (validating, approved, invalid) and xml
magalu_list_skusList your SKUs: sku, title, brand, status (PUBLISHED, UNPUBLISHED, BLOCKED, UNDER_REVIEW, DELETING, DELETED), active, group, channels…
magalu_get_skuRead one SKU: title, description, brand, status, active, category, channels, attributes, datasheet, dimensions, identifiers (EAN), images…
magalu_get_sku_validation_infoRead why a SKU is blocked or flagged by Magalu's publication policies: the latest block or alert with errors (action, message, rules)
magalu_get_priceRead the prices of a SKU per channel: price and list_price as integers with normalizer (100 = cents) and currency
magalu_get_stockRead the stock of a SKU per channel and distribution centre: quantity and type (AVAILABLE, RESERVED)
magalu_list_tracesList the processing results of asynchronous writes (SKU, price and stock), newest data per SKU: code, severity, origin context and…
magalu_get_traceRead one processing result (trace) of an asynchronous SKU, price or stock write in detail by its id: severity, origin, message and dates
magalu_find_categoriesFind a Magalu category by id or by name (at least 3 letters): id, name, parent and path
magalu_list_category_hierarchyBrowse the category tree: root categories (root_only), one category with its whole subtree (category_id), or the direct children of a…
magalu_list_category_attributesList the variation attributes of a category with their settings (required, recommended or optional, allowed values)
magalu_list_category_datasheetList the technical-sheet (datasheet) fields of a category with their settings, to fill the datasheet of a SKU
magalu_list_questionsList customer questions about your products: id, status, question (message, product sku, when_at), answer, product name and URL and…
magalu_get_questionRead one customer question by id: the question text, product SKU and date, the answer with its author, and the moderation state
magalu_list_conversationsList chat conversations opened by customers (pre- and post-sale): id, status, last interaction and the order or product they are about.…
magalu_get_conversationRead one chat conversation: status, participants, subject (order or product) and dates
magalu_list_conversation_messagesRead the messages of a chat conversation: content, owner, created_at. Default 10 per page, at most 100
magalu_list_ticketsList customer service (SAC) tickets of the last 3 years: id, code, protocol, type (shipping or cancellation), status (e.g. waiting_seller…
magalu_get_ticketRead one SAC ticket: type, status, reason, order and delivery items, customer, due date and history
magalu_list_ticket_messagesRead the messages of a SAC ticket: message, destination, owner, attachments and created_at
magalu_list_ticket_eventsRead the events of a SAC ticket (product_sent, return_info_sent, product_received, authorize_refund, refunded and others) with their dates
magalu_list_ticket_returnsRead the reverse shipments (returns) of a SAC ticket: reverse code, validity and dates
magalu_list_transactionsList the processing results of SAC writes (messages, events, tickets answer 202 with a transaction id): id, status (pending, processing…
magalu_get_transactionRead one SAC transaction (the result of a ticket message or event) by id: status and error details
magalu_add_delivery_invoiceAttach the NF-e to a delivery (marks it invoiced). Answers 201 with status validating: SEFAZ validates the invoice asynchronously; check…
magalu_replace_delivery_invoiceReplace an NF-e that SEFAZ found invalid on a delivery, keeping the same key. Answers 204
magalu_ship_deliveryMark a delivery as shipped with your own carrier: carrier name, tracking protocol and URL, shipped and estimated delivery dates. Answers…
magalu_mark_delivery_deliveredMark a shipped delivery as delivered to the customer. Cannot be undone: only call it when the carrier confirmed the delivery. Answers 201
magalu_create_skuCreate a SKU in your Magalu portfolio. Asynchronous: answers 202 with a trace_id; check magalu_list_traces (code = your SKU) and…
magalu_update_skuChange a SKU: send only the fields that change (title, description, images, active, category, datasheet and so on). Asynchronous: answers…
magalu_set_priceSet the first price of a new SKU in a channel. Prices are integers in cents (normalizer 100) in BRL. Asynchronous: answers 202 with a…
magalu_update_priceChange the price and list price of a SKU in a channel, integers in cents (normalizer 100) in BRL. Asynchronous: answers 202 with a trace_id
magalu_set_stockSet the first stock of a new SKU in a channel (optionally per distribution centre). Asynchronous: answers 202 with a trace_id. Use…
magalu_update_stockChange the available stock of a SKU in a channel (optionally per distribution centre). 0 stops sales. Asynchronous: answers 202 with a…
magalu_answer_questionAnswer a customer question. The answer goes through Magalu's moderation before it is public (status APPROVED or RESPONSE_REJECTED). Answers…
magalu_send_conversation_messageSend a message to the customer in a chat conversation (at most 2,200 characters). Answers 201
magalu_mark_conversation_readMark a chat conversation as read by the seller, so it no longer counts as unread in the Magalu seller tools. No body is sent
magalu_send_ticket_messageSend a message in a SAC ticket to the customer, to Magalu (channel) or as a seller note (at most 3,000 characters). Asynchronous: answers…
magalu_create_ticket_eventRecord a return step on a SAC ticket: product_sent, return_info_sent (return label sent to the customer) or product_received (returned item…
magalu_create_ticketOpen a SAC ticket for an order delivery: a cancellation request or a shipping problem, with the items concerned. A cancellation cannot be…
magalu_create_ticket_returnRequest a reverse shipment (return code) for a SAC ticket; Magalu Entregas then collects the item from the customer. Installed switched off
magalu_generate_shipping_labelsGenerate Magalu Entregas shipping labels for deliveries: answers a signed_url to the PDF or ZPL file and its expiry. Labels are tied to…

Example prompts

  • "Which Magalu deliveries are waiting for an NF-e?"
  • "Set the stock of SKU MGL-CAFE-500 to 80 units."
  • "Which customer questions are still unanswered?"
  • "Mark delivery 123456789 as shipped."
  • "Show this month's transactions and the total amount in BRL."

FAQ

How does it sign in? With an OAuth client created on developers.magalu.com (or with the idm CLI) and the redirect URI of this server: paste the Client ID and secret, then click Authorize with Provider and sign in with ID Magalu.

What does it cover? Orders and deliveries with NF-e, shipping and delivery confirmation, SKUs with prices and stock, processing traces, categories, customer questions, chat and SAC tickets, and transactions.

Which tools install switched off? magalu_generate_shipping_labels, magalu_create_ticket, magalu_create_ticket_event and magalu_create_ticket_return. Switch them on on the connector page only if the AI should use them.

Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.

Next steps

Was this guide helpful?

Connect Magalu to Gemini in 2 minutes

Start a free trial on AnythingMCP Cloud, connect Magalu in the guided setup, then add your MCP URL to Gemini. No code and no server to run.

Related guides

Connectors

Connect Magalu to ChatGPT via MCP: Orders and Stock

Magalu Marketplace (Magazine Luiza) seller API: orders and deliveries with NF-e, shipping and delivery confirmation, SKUs with prices and stock, processing traces, categories, customer questions, chat and SAC tickets. Sign-in with ID Magalu (OAuth2).

Connectors

Connect Magalu to Claude via MCP: Orders and Stock

Magalu Marketplace (Magazine Luiza) seller API: orders and deliveries with NF-e, shipping and delivery confirmation, SKUs with prices and stock, processing traces, categories, customer questions, chat and SAC tickets. Sign-in with ID Magalu (OAuth2).

Connectors

Connect Magalu to Microsoft Copilot via MCP

Magalu Marketplace (Magazine Luiza) seller API: orders and deliveries with NF-e, shipping and delivery confirmation, SKUs with prices and stock, processing traces, categories, customer questions, chat and SAC tickets. Sign-in with ID Magalu (OAuth2).

Connectors

Connect Magalu to Cursor via MCP: Orders and SKUs

Magalu Marketplace (Magazine Luiza) seller API: orders and deliveries with NF-e, shipping and delivery confirmation, SKUs with prices and stock, processing traces, categories, customer questions, chat and SAC tickets. Sign-in with ID Magalu (OAuth2).

Connectors

Connect Magalu to Meta Muse via MCP: Orders and Stock

Magalu Marketplace (Magazine Luiza) seller API: orders and deliveries with NF-e, shipping and delivery confirmation, SKUs with prices and stock, processing traces, categories, customer questions, chat and SAC tickets. Sign-in with ID Magalu (OAuth2).

Connectors

Magalu MCP Server: Orders, Deliveries and SKUs

Magalu Marketplace (Magazine Luiza) seller API: orders and deliveries with NF-e, shipping and delivery confirmation, SKUs with prices and stock, processing traces, categories, customer questions, chat and SAC tickets. Sign-in with ID Magalu (OAuth2).