连接器指南阅读约 7 分钟39 个 MCP 工具7 种语言

如何通过 MCP 将 eMAG Marketplace 连接到 Gemini

面向 eMAG 罗马尼亚、保加利亚和匈牙利(以及 Fashion Days)卖家的 eMAG Marketplace API:商品和报价,价格和库存,订单确认和状态变更,AWB 运单面单,退货(RMA),类目和属性,促销活动和发票。eMAG 需要把调用方 IP 加入白名单。

HC作者:HelpCode 团队更新于 7 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

eMAG Marketplace

eMAG Marketplace

Sell on eMAG Romania, Bulgaria and Hungary from an AI agent: products and offers, prices and stock, orders with acknowledge and status changes, AWB shipping labels, returns (RMA), categories and characteristics, VAT and handling times, campaigns and invoices. Basic auth with an API user; eMAG whitelists the calling IP.

个工具

39

区域

INTL

类别

电子商务

身份验证

Basic Auth

所需环境变量

EMAG_API_HOSTEMAG_USERNAMEEMAG_PASSWORD
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 eMAG Marketplace,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

摘要

面向 eMAG 罗马尼亚、保加利亚和匈牙利(以及 Fashion Days)卖家的 eMAG Marketplace API:商品和报价,价格和库存,订单确认和状态变更,AWB 运单面单,退货(RMA),类目和属性,促销活动和发票。eMAG 需要把调用方 IP 加入白名单。

试试这样问

eMAG Marketplace 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

eMAG Marketplace · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → eMAG Marketplace、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

eMAG Marketplace + Gemini

面向 eMAG 罗马尼亚、保加利亚和匈牙利(以及 Fashion Days)卖家的 eMAG Marketplace API:商品和报价,价格和库存,订单确认和状态变更,AWB 运单面单,退货(RMA),类目和属性,促销活动和发票。eMAG 需要把调用方 IP 加入白名单。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

EMAG_API_HOST, EMAG_USERNAME, EMAG_PASSWORD

步骤 1 — 获取凭证

设置大约需要 10 分钟,另外还要等 eMAG 把你的 IP 地址加入白名单。

  1. 在 eMAG Marketplace 卖家后台使用(或请账号所有者创建)一个拥有 API 权限的用户。
  2. IP 白名单:eMAG 只接受来自已登记 IP 地址的 API 调用。把本连接器调用时使用的公网 IP 发给 eMAG Marketplace 客服:自托管安装就是你服务器的地址;在 AnythingMCP Cloud 上则是固定的 IPv4 地址 104.248.242.235,Cloud 的所有调用都从这个地址发出。在 eMAG 添加之前,每次调用都会返回 You are not allowed to use this API.
  3. 把 EMAG_API_HOST 设为你所在平台的主机,不带路径:https://marketplace-api.emag.ro(罗马尼亚)、https://marketplace-api.emag.bg(保加利亚)、https://marketplace-api.emag.hu(匈牙利)、https://marketplace-ro-api.fashiondays.com 或 https://marketplace-bg-api.fashiondays.com(Fashion Days)。每个平台是独立账号,所以每个国家安装一个连接器。
  4. 把 API 用户填入 EMAG_USERNAME,其密码填入 EMAG_PASSWORD(HTTP Basic 认证)。
  5. 安装连接器并运行 emag_marketplace_list_vat_rates:这是一个轻量调用,可确认凭据和 IP。

API 的工作方式:连接器使用 eMAG Marketplace API 3(文档 v4.5.2)。每个资源都以 POST <resource>/read、count 或 save 调用。读取把筛选和分页作为顶层字段传入(currentPage,itemsPerPage 最多 100);保存接收一个对象列表,由连接器包进 data。读取虽然是 POST,但标记为只读。每个响应都是 {"isError": false, "messages": [], "results": [...]};isError: true 会作为带消息的失败调用报告。只有一个例外:保存一个文档有问题的新商品时,eMAG 返回 isError: true,但报价其实已保存,所以 AI 会用 emag_marketplace_list_product_offers 重新读取。

可读取的内容:你的商品和报价,包括价格、各仓库存、处理时间、状态、文档和报价审核状态、doc_errors、购买按钮排名和所在活动,可按 id、零件号、PNK 或状态筛选,并按同样条件计数;按 EAN 查询商品是否已在 eMAG 上存在(每次最多 100 个),以便把报价挂到已有商品上;类目及其属性、允许值和必填标记;增值税税率和处理时间;订单,包括客户、收货地址、商品、优惠券、付款方式、运费和附件;包裹体积数据;AWB 的承运商、状态历史、重量和货到付款金额,可获取 PDF(A4、A5、A6)或 ZPL;退货申请的原因、取件地址和 AWB;地区、快递账号、你的取件和退货地址以及预设包裹;促销活动的规则和截止时间、可参加活动的报价及最高活动价、活动徽章和 Smart Deals 价格;eMAG 开给你的发票以及你订单上的发票。

订单和发货:订单状态 1 新订单,2 处理中,3 已备货,4 已完成,0 已取消,5 已退货。流程是:新订单,emag_marketplace_acknowledge_order(变为 2),emag_marketplace_save_order 设为状态 3,用 emag_marketplace_create_awb 生成 AWB,然后设为状态 4。emag_marketplace_save_order 需要传入读取到的完整订单,只修改要变的字段;订单只有在状态 2 或 3 时才能编辑。优惠券是订单数据的一部分(vouchers、product_voucher_split)。生成 AWB 时,AI 会选择快递账号、发件地址和地区 id,然后读取面单。

退货(RMA):request_status 2 新申请,3 已确认,6 已收货,7 已完成,4 已拒绝,5 已取消。emag_marketplace_save_return 把退货推进到下一状态:2 到 3 或 5,3 到 6 或 5,6 到 4 或 7。

可写入的内容:报价的价格、库存、处理时间和状态(emag_marketplace_update_offers、emag_marketplace_update_offer_stock),带报价的新商品(emag_marketplace_save_product_offers),尺寸重量,订单确认和状态,订单附件(发票类型 1,保修单类型 3),解除快递锁定,AWB,退货状态和活动报名。这些操作都作用于线上店铺和真实快递。每次写入前,AI 会先展示改动内容(报价 id 及新旧价格或库存、订单和新状态、AWB 数据),等你同意。安装时没有默认关闭的工具;团队用不到的写入工具可由管理员关闭。

数据说明:报价上的 id 是你自己的卖家商品 id(ext_id);part_number_key(PNK)是 eMAG 的商品键。报价只有在库存大于 0、status 为 1、offer_validation_status 为 1 且 validation_status 为 3、9、11 或 12 时才在售。价格为平台币种的不含增值税价格(罗马尼亚为 RON,保加利亚自 2026 年 1 月 1 日起为 EUR,匈牙利为 HUF)。日期格式为 YYYY-mm-dd HH:ii:ss,使用平台当地时间。

分页和限制:列表每页最多 100 条;AI 先计数,再用 currentPage 翻页。活动可参加报价使用游标分页,把最后一个 ext_id 作为 lastId 传入。计数时的订单日期筛选需要起止两端,间隔不超过一个月。保存调用每次最多 50 个实体(建议 10 到 50 个),每个请求最多 4000 个输入字段。eMAG 允许订单每秒 12 次请求,其他所有资源合计每秒 3 次;超过会返回 429。

常见错误:You are not allowed to use this API. 或 403 表示 IP 尚未加入白名单。401 表示用户名或密码错误、用户没有 API 权限,或主机不是该账号所在的平台。429 是频率限制,请稍等。其他 isError 响应会带有 eMAG 的消息,例如缺少属性或价格无效。

本连接器不会开设卖家账号,也不会替你向 eMAG 登记 IP,并且不跨平台工作:一个连接器只服务一个国家。

步骤 2 — 安装 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

步骤 3 — 在 Gemini 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

Gemini CLI 从 ~/.gemini/settings.json(Windows 上为 %USERPROFILE%\.gemini\settings.json)读取 MCP 服务器。添加:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换 YOUR_MCP_API_KEY。
  2. 保存文件并重启 gemini。
  3. 在 Gemini CLI 中运行 /mcp(或在终端运行 gemini mcp list),anythingmcp 应显示为已连接。
  4. 开始输入提示,Gemini CLI 现在可以调用 eMAG Marketplace 的工具。

可用工具

ToolWhat it does
emag_marketplace_list_vat_ratesList the VAT rates of the platform with their vat_id, which every offer you save must carry
emag_marketplace_list_handling_timesList the handling time values (days until you hand an order to the courier) the platform accepts for the handling_time of an offer
emag_marketplace_list_categoriesRead eMAG categories
emag_marketplace_count_categoriesCount the eMAG categories you may read, to know how many pages emag_marketplace_list_categories has
emag_marketplace_list_product_offersRead your products and offers: price, stock per warehouse, handling time, status (1 active, 0 inactive, 2 end of life), documentation and…
emag_marketplace_count_product_offersCount your products and offers with the same filters as emag_marketplace_list_product_offers, e.g. how many are inactive or have an invalid…
emag_marketplace_find_products_by_eanCheck whether products already exist on eMAG by EAN (up to 100 at once): part_number_key, name, brand, category, whether you may add an…
emag_marketplace_list_ordersRead orders with customer, delivery address, products (price, quantity, status, campaign), vouchers, payment method, shipping tax and…
emag_marketplace_count_ordersCount orders with the same filters as emag_marketplace_list_orders, e.g. how many new (status 1) orders wait
emag_marketplace_list_order_attachmentsRead the attachments of an order (invoices, warranties, manuals, AWBs) with their type and URL
emag_marketplace_get_order_volumetryRead the weight and dimensions eMAG knows for each product of an order, to fill the packages of an AWB
emag_marketplace_get_awbRead an AWB (shipping label) issued through the API: order or return id, AWB number and barcode, courier, status history, weight and cash…
emag_marketplace_get_awb_pdfDownload an AWB issued through the API as a PDF in A4, A5 or A6 (or as ZPL), to print the shipping label
emag_marketplace_get_awb_zplRead an AWB issued through the API in ZPL (base64), for thermal label printers
emag_marketplace_list_returnsRead return requests (RMA) with order, products, return reason, pickup address, AWBs and status (1 incomplete, 2 new, 3 acknowledged, 4…
emag_marketplace_count_returnsCount return requests with the same filters as emag_marketplace_list_returns, e.g. how many new (2) returns wait
emag_marketplace_list_localitiesRead localities (cities with their region, zip code and emag_id) for the sender and receiver of an AWB
emag_marketplace_list_courier_accountsList your courier accounts (id, courier name, type order or return, lockers or offices, status) to choose the courier_account_id of an AWB
emag_marketplace_list_addressesList your pickup, return and invoice addresses (address_id, type, locality, street) to use as sender or return address of an AWB or return
emag_marketplace_list_awb_packagesList your predefined AWB packages (label, length, width, height, weight, default), used when issuing AWBs without explicit packages
emag_marketplace_list_campaignsRead the eMAG campaigns (Black Friday, discount, voucher, multi deals) with start, end and offer deadline and their participation rules…
emag_marketplace_list_campaign_categoriesRead the categories eligible for campaigns with restricted categories (participationRules.restrictedCategories true): id, name and parent.…
emag_marketplace_list_campaign_eligible_offersRead your offers that may join a campaign: current price, lowest price of the last 30 days (cmmp), maximum campaign price, stock…
emag_marketplace_get_offer_campaign_badgesRead the campaign badges (Black Friday, Genius Days and others) active or planned for one of your offers, with label text and dates. eMAG…
emag_marketplace_check_smart_deals_priceGet the price an offer must reach to qualify for the Smart Deals badge
emag_marketplace_list_invoice_categoriesList the categories of the invoices eMAG issues to you (e.g
emag_marketplace_list_invoicesRead the invoices eMAG issued to you (commission, services and others): number, date, lines, totals with and without VAT and currency
emag_marketplace_list_customer_invoicesRead the invoices issued to your customers on eMAG orders (normal or storno): order id, number, date, lines and totals
emag_marketplace_update_offersUpdate existing offers only (light offer API, up to 50 per call): price, recommended, minimum and maximum price, stock and handling time…
emag_marketplace_update_offer_stockSet the stock of one offer per warehouse (PATCH, stock only)
emag_marketplace_save_product_offersCreate new products with their offer, or update offers, up to 50 per call
emag_marketplace_save_measurementsSave the volume measurements of products (length, width, height in millimetres, weight in grams)
emag_marketplace_acknowledge_orderAcknowledge a new order: moves it from 1 (new) to 2 (in progress) and stops eMAG notifying you about it
emag_marketplace_save_orderUpdate an order: set status 3 (prepared), 4 (finalized) or 0 (canceled with reason_cancellation), remove or add products, or storno a…
emag_marketplace_unlock_courierUnlock the courier selection of an order so a different courier account can be used for its AWB
emag_marketplace_save_order_attachmentsAttach documents to orders by URL: invoice (type 1), warranty (type 3, with order_product_id) and other types
emag_marketplace_create_awbIssue an AWB (shipping label) with your eMAG courier account for an order or a return: sender, receiver (with locality_id), parcels or…
emag_marketplace_save_returnUpdate a return request (RMA), mainly its request_status: 2 new to 3 acknowledged or 5 canceled, 3 to 6 received, 6 to 4 refused or 7…
emag_marketplace_propose_campaign_offersPropose your offers in a campaign with the campaign price (and voucher discount, maximum quantity per order or date intervals where the…

示例提示

  • “我们在 eMAG 上有多少报价是下架状态或报价审核状态无效?”
  • “列出今天的 eMAG 新订单(状态 1),附上商品和付款方式。”
  • “把报价 10452 的价格降到不含税 189.90 RON,库存设为 25。先给我看新旧数值。”
  • “用我们的快递账号为订单 412398765 生成 AWB,并给我 A6 的 PDF。先给我看 AWB 数据。”
  • “我们哪些报价可以参加 Black Friday 活动?它们的最高活动价是多少?”

FAQ

Gemini CLI 从哪里读取 MCP 服务器? 用户级配置位于 ~/.gemini/settings.json,项目级配置位于项目内的 .gemini/settings.json。gemini mcp list 会列出每个服务器及其连接状态。

下一步

这份指南对你有帮助吗?

你的 eMAG Marketplace 智能体只差一次点击。

安装连接器,粘贴密钥,向 Gemini 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 eMAG Marketplace 连接到 ChatGPT

面向 eMAG 罗马尼亚、保加利亚和匈牙利(以及 Fashion Days)卖家的 eMAG Marketplace API:商品和报价,价格和库存,订单确认和状态变更,AWB 运单面单,退货(RMA),类目和属性,促销活动和发票。eMAG 需要把调用方 IP 加入白名单。

连接器

如何通过 MCP 将 eMAG Marketplace 连接到 Claude

面向 eMAG 罗马尼亚、保加利亚和匈牙利(以及 Fashion Days)卖家的 eMAG Marketplace API:商品和报价,价格和库存,订单确认和状态变更,AWB 运单面单,退货(RMA),类目和属性,促销活动和发票。eMAG 需要把调用方 IP 加入白名单。

连接器

如何通过 MCP 将 eMAG Marketplace 连接到 Microsoft Copilot

面向 eMAG 罗马尼亚、保加利亚和匈牙利(以及 Fashion Days)卖家的 eMAG Marketplace API:商品和报价,价格和库存,订单确认和状态变更,AWB 运单面单,退货(RMA),类目和属性,促销活动和发票。eMAG 需要把调用方 IP 加入白名单。

连接器

如何通过 MCP 将 eMAG Marketplace 连接到 Cursor

面向 eMAG 罗马尼亚、保加利亚和匈牙利(以及 Fashion Days)卖家的 eMAG Marketplace API:商品和报价,价格和库存,订单确认和状态变更,AWB 运单面单,退货(RMA),类目和属性,促销活动和发票。eMAG 需要把调用方 IP 加入白名单。

连接器

如何通过 MCP 将 eMAG Marketplace 连接到 Meta Muse

面向 eMAG 罗马尼亚、保加利亚和匈牙利(以及 Fashion Days)卖家的 eMAG Marketplace API:商品和报价,价格和库存,订单确认和状态变更,AWB 运单面单,退货(RMA),类目和属性,促销活动和发票。eMAG 需要把调用方 IP 加入白名单。

连接器

eMAG Marketplace 接入 MCP:在任意 AI 智能体中管理报价、价格、库存、订单、AWB 和退货

面向 eMAG 罗马尼亚、保加利亚和匈牙利(以及 Fashion Days)卖家的 eMAG Marketplace API:商品和报价,价格和库存,订单确认和状态变更,AWB 运单面单,退货(RMA),类目和属性,促销活动和发票。eMAG 需要把调用方 IP 加入白名单。