摘要
让你的 AI 经营 Loja Integrada 店铺:搜索商品、更新库存和价格、创建商品、类目和品牌、跟进订单、更改订单状态、添加物流单号并查询客户。使用官方 API v1。
引导式设置
2 分钟将 Loja Integrada 连接到 Microsoft Copilot
开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 Loja Integrada,再把你的 MCP URL 添加到 Microsoft Copilot。无需代码,也无需自行运行服务器。
无需信用卡 · 7 天试用 · 提供自托管方案
试试这样问
Loja Integrada 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Loja Integrada、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Loja Integrada + Microsoft Copilot
让你的 AI 经营 Loja Integrada 店铺:搜索商品、更新库存和价格、创建商品、类目和品牌、跟进订单、更改订单状态、添加物流单号并查询客户。使用官方 API v1。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
LOJA_INTEGRADA_API_KEY, LOJA_INTEGRADA_APP_KEY
步骤 1 — 获取凭证
两个密钥都到手后,设置大约需要 5 分钟,但应用密钥需要 5 到 10 个工作日才能拿到。你需要一个使用付费套餐的 Loja Integrada 店铺、它的店铺后台访问权限,以及 Loja Integrada 为集成签发的应用密钥(chave de aplicação)。
- 在店铺后台打开 Configurações → Chave para API,点击 Cadastrar nova chave,把 20 位的密钥复制到
LOJA_INTEGRADA_API_KEY。只粘贴密钥本身,不要带chave_api。API 密钥仅在付费套餐中提供(Loja Integrada 帮助)。 - 通过这篇帮助文章中介绍的集成商表单,向 Loja Integrada 申请应用密钥(chave de aplicação)。在表单中填写调用 API 的 IP 地址:自托管安装就是你服务器的地址;在 AnythingMCP Cloud 上则是固定的 IPv4 地址
104.248.242.235,Cloud 的所有调用都从这个地址发出。连接器的设置页面也会显示这些出口地址。Loja Integrada 会在 5 到 10 个工作日内答复。 - 把应用密钥(形如
dc6049f0-1234-...的 UUID)填入LOJA_INTEGRADA_APP_KEY。只粘贴密钥本身,不要带aplicacao。 - 安装连接器,用
loja_integrada_list_order_statuses检查连接。
应用密钥只能从登记的 IP 地址使用:Loja Integrada 会拒绝来自未登记地址的调用。地址发生变化时(换新服务器、迁移到 Cloud 或从 Cloud 迁出),请在切换之前用同一个表单提交新的地址列表,以免调用开始失败。
Cloud 和自托管的方式相同:只有为应用密钥登记的 IP 地址不同。
两个密钥放在同一个请求头中:每次调用都会发送 Authorization: chave_api <API key> aplicacao <application key>,由 AnythingMCP 根据两个变量组装。本连接器不使用 Personal Token 登录(Authorization: Basic ...)。
限流:Loja Integrada 允许每个店铺每分钟 100 次请求,超出后返回 429。请让 AI 分页读取列表,而不是反复调用;遇到 429 时等一分钟。
ID 和引用:商品、类目、品牌和客户都有数字 ID(202591789);订单通过订单号(numero,例如 164)指定。记录之间通过 /api/v1/categoria/15246059 这样的 URI(resource_uri 字段)相互引用,原样传入商品的 categorias、marca 和 pai。把 id_externo 设为 1 时,会按你自己的外部 ID 查找商品或价格。
分页、价格和日期:列表默认每页 20 条,最多 50 条,用 limit 和 offset 翻页,直到 meta.next 为 null;meta.total_count 是总数。价格以 BRL 计,以 "32.83" 这样的字符串返回。日期筛选使用 YYYY-MM-DD,时间可选。
商品、规格、库存和价格:带规格的商品由一个父商品(tipo atributo)和每个规格对应的子商品(tipo atributo_opcao,pai 指向父商品)组成;loja_integrada_list_grids 和 loja_integrada_get_grid 显示尺码、颜色等规格表的取值。价格和库存是单独的记录,在创建商品之后设置。库存是绝对数量而不是增减量,要在每个规格上分别设置。更新会替换整个商品,所以 AI 会先读取商品,再把所有字段重新发送:省略的字段可能会被清空。
常见错误:401 表示 Loja Integrada 拒绝了密钥:检查 LOJA_INTEGRADA_API_KEY、LOJA_INTEGRADA_APP_KEY,以及应用密钥是否已为连接器的 IP 地址登记。403 表示密钥已读取但访问被拒绝:调用来自未为应用密钥登记的地址。429 表示触发了限流。
可读取的内容:商品,包括 SKU、类型(普通商品、带规格的父商品或规格)、类目、品牌、尺寸和重量、NCM 和 GTIN、图片和规格表;库存,包括预留数量和可用数量;原价、促销价和成本价;类目、品牌以及规格表及其取值;订单,包括客户、账单地址和收货地址、商品明细、付款、带物流单号的发货、状态和金额,以及每笔订单的状态历史、店铺的订单状态和付款方式;客户,包括邮箱、CPF 或 CNPJ、电话和地址。
写入工具在安装时已开启:没有任何工具被关闭。连接器可以创建商品、类目和品牌,编辑商品,设置库存和价格,更改订单状态并添加物流单号,这些都会直接作用于你的线上店铺;更改状态可能会给买家发邮件,而“已取消”这类最终状态无法撤销。请在连接器页面关闭不需要的工具;AI 在每次更改前都会先征得你的确认。
不会删除任何数据:没有工具会删除数据或创建订单,连接器也不处理商品图片、优惠券、SEO、Webhook、发票(NF)、营销和 Enviali 物流面单。
步骤 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 — 在 Microsoft Copilot 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Microsoft Copilot 通过在 Copilot Studio 中构建的智能体使用 MCP 服务器:把 AnythingMCP 作为工具添加到智能体,然后把智能体发布到 Microsoft 365 Copilot 和 Teams。Copilot Studio 从 Microsoft 的云端通过 Streamable HTTP 连接,AnythingMCP 支持这种方式。
- 在 Copilot Studio 中打开你的智能体(或新建一个),进入 Tools,选择 Add a tool → New tool → Model Context Protocol。
- 填写 Server name(例如
AnythingMCP)、说明连接器用途的 Server description,以及 Server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。Copilot Studio 根据描述决定何时调用该服务器。 - 身份验证选择 API key,把 Type 设为 Header,请求头名称填
X-API-Key,然后选择 Create。 - 在 Add tool 中选择 Create a new connection,粘贴 AnythingMCP 的 MCP API 密钥(MCP Servers → 你的服务器 → API keys),然后选择 Add to agent。
- 在智能体的 Test 窗格中试一试:提出需要用到
Loja Integrada的工具的请求。 - 选择 Publish,然后进入 Channels → Microsoft 365 and Microsoft Teams,保持勾选 Make agent available in Microsoft Copilot,再选择 Add channel。See agent in Teams 会为你安装该智能体;在 Microsoft 365 Copilot 中输入 @ 并选择该智能体。
希望每个用户各自登录?请选择 OAuth 2.0 → Dynamic discovery 代替 API 密钥:每个用户会在智能体首次调用时登录 AnythingMCP。
自托管?请用你实例的公网 HTTPS 地址替换 https://cloud.anythingmcp.com。Copilot Studio 从 Microsoft 的云端连接,因此 localhost 无法使用。
可用工具
| Tool | What it does |
|---|---|
loja_integrada_list_products | List the store's products, 20 per page: id, sku, nome, tipo (normal, atributo = parent with variations, atributo_opcao = variation), ativo… |
loja_integrada_get_product | Read one product by its Loja Integrada id (or by your id_externo): name, SKU, type, active and featured flags, categories, brand… |
loja_integrada_create_product | Create a product. tipo normal is a simple product; atributo creates a parent for variations, and each variation is then created with tipo… |
loja_integrada_update_product | Update a product |
loja_integrada_list_stock | List the stock records of all products, 20 per page: produto URI, quantidade (quantity), quantidade_reservada (reserved by orders)… |
loja_integrada_get_stock | Read the stock of one product or variation: quantity, reserved and available quantity, whether stock is managed, and the availability… |
loja_integrada_update_stock | Set the stock of one product or variation: quantidade (absolute quantity, not a delta), gerenciado (track stock) and the availability ids… |
loja_integrada_list_prices | List the prices of all products, 20 per page: produto URI, cheio (list price), promocional (sale price), custo (cost) and sob_consulta… |
loja_integrada_get_price | Read the prices of one product or variation: cheio (list price), promocional (sale price, null when none), custo (cost) and sob_consulta |
loja_integrada_update_price | Change the prices of one product or variation: cheio (list price), promocional (sale price; send 0 or null to remove it), custo (cost) and… |
loja_integrada_list_categories | List the store's categories: id, nome, descricao, categoria_pai (parent URI), id_externo, url and resource_uri |
loja_integrada_create_category | Create a category, optionally below a parent category |
loja_integrada_list_brands | List the store's brands: id, nome, apelido, descricao, id_externo and resource_uri |
loja_integrada_create_brand | Create a brand |
loja_integrada_list_grids | List the variation grids (grades, e.g |
loja_integrada_get_grid | Read one variation grid with its variations (values such as P, M, G or Azul), each with id and nome |
loja_integrada_search_orders | Search orders, 20 per page (at most 50): numero (order number), situacao (status with codigo and nome), cliente URI, valor_total… |
loja_integrada_get_order | Read one order by its number: customer, billing and delivery address, items (itens with SKU, quantity and prices), payments, shipments… |
loja_integrada_list_order_statuses | List the order statuses of the store: id, codigo (e.g. aguardando_pagamento, pedido_pago, pedido_enviado, pedido_entregue… |
loja_integrada_update_order_status | Move an order to another status by its codigo, for example pedido_pago, pedido_em_separacao, faturado, pedido_enviado… |
loja_integrada_get_order_status_history | Read the status history of one order: each change with its date, the new and previous status and who changed it (alterado_por_nome), by… |
loja_integrada_update_tracking_code | Set the tracking code of one shipment of an order |
loja_integrada_list_payment_methods | List the payment methods of the store: id, nome, codigo and configuracoes (ativo, disponivel) |
loja_integrada_list_customers | List customers, 20 per page: id, nome, email, cpf or cnpj, phone numbers, sexo, data_nascimento, group and dates |
loja_integrada_search_customers | Search customers by e-mail and/or a created or updated date window; date-filtered results come newest modification first |
loja_integrada_get_customer | Read one customer by id: name, e-mail, CPF or CNPJ, company name, phones, birth date, group and addresses (enderecos) |
示例提示
- “SKU CAM-001 还有多少可用库存?原价和促销价是多少?”
- “列出本周仍在等待付款的订单。”
- “把 SKU CAM-001 的促销价设为 R$ 89.90,库存设为 40 件。”
- “把订单 164 标记为已发货,并添加物流单号 AA123456789BR。”
- “找到邮箱为 [email protected] 的客户,并列出她的订单。”
FAQ
这适用于哪个 Copilot? 适用于工作中的 Microsoft 365 Copilot,通过 Copilot Studio 的智能体实现。面向个人账户的 Microsoft Copilot 应用无法添加自己的 MCP 服务器。
我需要什么? 一个可以使用 Copilot Studio 的工作账户(许可证或试用版),用于构建智能体。在 Microsoft 365 Copilot 或 Teams 中使用它的人需要拥有该智能体的访问权限:把它共享给他们,或请管理员为整个组织发布。如果你的组织对 Power Platform 连接器设置了数据策略,这些策略同样适用于 MCP 服务器。
智能体不调用工具。 检查请求头名称是否正好是 X-API-Key,密钥是否属于与 URL 相同的 MCP 服务器,并把 Server description 写得具体:Copilot Studio 根据它决定何时调用服务器。每次修改后重新发布智能体;在已打开的对话中输入 "start over" 即可使用新版本。
下一步
这份指南对你有帮助吗?