摘要
通过任意 AI 代理操作 Magento 2 / Adobe Commerce:商品、分类、订单、客户、库存。48 个工具,Bearer 管理员令牌身份验证,按店铺区分的基础 URL。
引导式设置
2 分钟将 Magento 连接到 Microsoft Copilot
开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 Magento,再把你的 MCP URL 添加到 Microsoft Copilot。无需代码,也无需自行运行服务器。
无需信用卡 · 7 天试用 · 提供自托管方案
试试这样问
Magento (Adobe Commerce) 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Magento (Adobe Commerce)、粘贴凭证、生成 MCP API key — 完成。无 Docker、无
git clone、无本地服务器。
Magento (Adobe Commerce) + Microsoft Copilot
通过任意 AI 代理操作 Magento 2 / Adobe Commerce:商品、分类、订单、客户、库存。48 个工具,Bearer 管理员令牌身份验证,按店铺区分的基础 URL。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
MAGENTO_BASE_URL, MAGENTO_ACCESS_TOKEN
步骤 1 — 获取凭证
Setup:
- As Magento admin → System → Integrations → Add New Integration.
- Name + email, then on the API tab pick scopes: at minimum Catalog (Products + Categories + Stock), Customers, Sales (Orders + Invoices + Shipments). For the newer tools also grant Sales (Credit Memos), Carts, Marketing (Cart Price Rules) and Stores (Product attributes), and Content (Pages + Blocks) for the CMS tools.
- Activate the integration → grant access. Magento generates an Access Token (this is the long-lived bearer token).
- Set:
MAGENTO_BASE_URL= your storefront base URL (e.g.https://shop.example.com)MAGENTO_ACCESS_TOKEN= the integration access token- There is no store view setting: requests go to the
defaultstore view, the guest cart tools take the store view code as theirstoreCodeparameter (defaultunless you pass another code frommagento_list_store_views), and CMS pages and blocks always useall
Authentication: Authorization: Bearer ${MAGENTO_ACCESS_TOKEN}.
…(continued in the in-app connector instructions)
促销、价格和按来源库存:购物车价格规则及其优惠券代码(查找、读取、创建和修改规则;添加一个代码或批量生成)、按 SKU、店铺和时段的特价(读取和排期)、按来源的 Multi-Source Inventory 库存(读取和设置)、颜色或尺码等下拉属性的选项(列出和添加)、在所选范围内更新商品(magento_update_product_in_scope,all 表示所有店铺视图继承的值)、购物车(查找未完成的购物车,例如跟进弃单)以及贷项通知单(读取)。这些工具安装时即已开启,需要第 2 点中的额外 API 资源;每次修改前,AI 会先展示要写入的内容并等你确认。
已经安装? 之前安装的连接器可通过目录更新获得新工具:在 AnythingMCP 中打开该连接器,在 Catalog update available 下查看新工具列表,然后点击 Apply update。你的凭据和你自己添加的工具保持不变。
步骤 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 窗格中试一试:提出需要用到
Magento (Adobe Commerce)的工具的请求。 - 选择 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 |
|---|---|
magento_search_products | Search products with Magento's search criteria DSL |
magento_get_product | Fetch a single product by SKU |
magento_create_product | Create a product |
magento_update_product | Update a product by SKU (PUT) |
magento_delete_product | Permanently delete a product by SKU |
magento_update_stock | Update inventory stock for a SKU at a source |
magento_list_categories | List the category tree (or below a rootCategoryId) |
magento_search_orders | Search orders |
magento_get_order | Fetch one order by ID with billing/shipping addresses, items[], status history |
magento_cancel_order | Cancel an order (only valid in pending/processing status) |
magento_search_customers | Search customers with the same DSL |
magento_get_customer | Fetch one customer by ID |
magento_list_store_views | List the store views of the Magento / Adobe Commerce instance (id, code, name, website) |
magento_list_low_stock_items | List stock items whose quantity is below a threshold: product id, SKU, qty, in-stock flag and low-stock date |
magento_create_guest_cart | Start a new empty guest cart (a quote, not yet an order) in a store view and return its cart id for the other guest cart tools |
magento_get_guest_cart | Read a guest cart: items (SKU, name, qty, price, item id), customer e-mail, addresses, currency and whether it is still active (false once… |
magento_add_guest_cart_item | Add a product to a guest cart by SKU and quantity |
magento_apply_guest_cart_coupon | Apply a coupon (discount) code to a guest cart; Magento answers 404 when the code does not exist or does not apply |
magento_estimate_guest_cart_shipping | List the shipping methods and prices available for a guest cart to an address: carrier_code, method_code, amount and availability |
magento_set_guest_cart_shipping | Set the shipping address, billing address and shipping method of a guest cart |
magento_list_guest_cart_payment_methods | List the payment methods the guest cart can use (code and title, e.g. checkmo, banktransfer, cashondelivery, free) |
magento_get_guest_cart_totals | Read the totals of a guest cart: subtotal, discount (with the applied coupon), shipping, tax and grand total per item and overall, in the… |
magento_place_guest_order | Place the order from a guest cart: sets the customer e-mail, payment method and billing address and turns the cart into a real order, which… |
magento_search_cms_pages | Search CMS pages (content pages such as about-us, shipping, terms) with id, identifier (URL key), title, active flag, meta data and the… |
magento_get_cms_page | Read one CMS page by its numeric id, including the full HTML content, layout and meta data |
magento_search_cms_blocks | Search CMS blocks (reusable content such as header, footer and homepage banners) with id, identifier, title, active flag and the HTML… |
magento_get_cms_block | Read one CMS block by its numeric id, including the full HTML content |
magento_create_cms_page | Create a CMS page |
magento_update_cms_page | Change a CMS page |
magento_create_cms_block | Create a CMS block |
magento_update_product_in_scope | Update a product by SKU in a chosen scope: storeCode all (default) writes the global values every store view inherits; a store view code… |
magento_find_carts | Search shopping carts (quotes) of the store, for example open carts with items to follow up abandoned baskets: cart id, active flag… |
magento_find_cart_price_rules | Search cart price rules (sales rules: discounts and coupon campaigns): rule id, name, active flag, websites, customer groups, dates, action… |
magento_get_cart_price_rule | Get one cart price rule by id with all its fields, conditions and action conditions |
magento_find_coupons | Search coupon codes: coupon id, rule id, code, usage limit, uses per customer, times used, expiration and whether it is the rule's primary… |
magento_get_special_prices | Get the scheduled special prices of products by SKU: price, store id and the from and to dates |
magento_list_credit_memos | Search credit memos (refund documents): entity id, increment id, order id, state, totals refunded, adjustments, items and dates |
magento_get_credit_memo | Get one credit memo by entity id: order, state, refunded totals, shipping and adjustments, items with SKU, quantity and amounts, and… |
magento_list_attribute_options | List the options of a select or multiselect product attribute (e.g. color, size, manufacturer): label and value (the option id to put in a… |
magento_list_source_items | List Multi-Source Inventory stock per source: SKU, source code, quantity and status (1 in stock, 0 out of stock) |
magento_create_cart_price_rule | Create a cart price rule (a discount, optionally with coupons) |
magento_update_cart_price_rule | Change a cart price rule, e.g. its dates, discount or active flag |
magento_add_coupon_code | Add one coupon code to a cart price rule with coupon type SPECIFIC_COUPON and auto generation on, or replace its main code |
magento_generate_coupon_codes | Generate a batch of unique coupon codes for a cart price rule whose coupon type is AUTO (or SPECIFIC_COUPON with auto generation on) |
magento_schedule_special_prices | Add or update special prices of products for a store and period |
magento_add_attribute_option | Add an option to a select or multiselect product attribute, e.g. a new color |
magento_set_source_items | Set the stock of SKUs per Multi-Source Inventory source: quantity and status (1 in stock, 0 out of stock) for each sku and source_code pair |
magento_update_cms_block | Change a CMS block |
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" 即可使用新版本。
下一步
这份指南对你有帮助吗?