Token导航 LogoToken导航TokenDH.com
Magento2 Onx MCP logo
AI代理未说明官方级别未说明来源级核验

Magento2 Onx MCP

MCP Server

这是一个为Magento 2和Adobe Commerce设计的onX适配器,通过实现Commerce Operations Foundation的onX规范作为MCP服务器,使onX兼容系统(如AI代理、OMS、WMS、3PLs、ERPs)能够使用标准化的商务操作语言与Magento 2商店交互。

工具数

12

提示词数

0

GitHub Stars

0

资源数

0
电子商务TypeScriptClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

benmarks

提供方

benmarks

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

magento2-onx-mcp

onX(订单网络交换) Magento 2和Adobe Commerce的适配器。实施 商业运营基金会的onX规范 MCP(模型上下文协议) 服务器。

此适配器使任何onX兼容系统(AI代理、OMS、WMS、3PL、ERP)都可以使用标准化的商业操作语言与Magento 2商店进行交互。

这有什么作用

适配器位于onX客户端和Magento 2的REST API之间,将标准化的onX请求转换为Magento API调用,并将响应映射回onX模式:

onX Client (AI agent, OMS, WMS, etc.)
        │
        ▼
   ┌────────────────┐
   │  magento2-onx  │  ← This adapter
   │  (MCP Server)  │
   └────────────────┘
        │
        ▼
   Magento 2 REST API

onX覆盖范围

在7个商务原语中实现onX参考服务器的所有12个操作(5个操作+7个查询)。

行动工具(5)

工具说明
create-sales-order从任何渠道创建新订单
update-order修改订单详细信息和元数据
cancel-order取消订单并跟踪原因
fulfill-order将订单标记为已完成并返回装运详细信息
create-return通过退款/换货跟踪为订单项目创建退货

查询工具(7)

工具说明
get-orders通过ID、状态、名称、日期范围进行筛选来检索订单
get-customers通过ID或电子邮件获取客户记录
get-products按ID或SKU获取产品目录条目
get-product-variants检索变体级数据(链接到可配置项的简单产品)
get-inventory检查MSI来源的库存水平
get-fulfillments列出履行/装运记录和状态
get-returns查询退货记录(商业上的RMA,开源上的贷项凭单)

商业原语(7)

订单、客户、产品、产品变体、库存项目、履行、退货

兼容性

  • Magento开源 2.4.x--完全支持。退货使用贷项凭单。
  • Adobe商务 2.4.x--完全支持。退货使用带有贷项凭单回退的本地RMA。
  • Adobe商务即云服务(ACCS) -通过REST API兼容。
  • Mage操作系统 -兼容(共享Magento 2 API表面)。

快速开始

先决条件

  • Node.js 18+
  • 具有REST API访问权限的Magento 2实例
  • 集成访问令牌(管理>系统>集成)

安装

git clone https://github.com/benmarks/magento2-onx-mcp.git
cd magento2-onx-mcp
npm install
cp .env.example .env
# Edit .env with your Magento 2 credentials

配置

编辑 .env 使用您的Magento 2连接详细信息:

M2_BASE_URL=https://your-store.example.com
M2_ACCESS_TOKEN=your_integration_access_token

.env.example 用于所有配置选项,包括OAuth、多存储和MSI设置。

构建与运行

npm run build
npm start

发展

npm run dev    # Watch mode with hot reload
npm test       # Run tests
npm run lint   # Lint

与Claude Desktop一起使用

添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "magento2-onx": {
      "command": "node",
      "args": ["/path/to/magento2-onx/dist/index.js"],
      "env": {
        "M2_BASE_URL": "https://your-store.example.com",
        "M2_ACCESS_TOKEN": "your_token"
      }
    }
  }
}

建筑

src/
├── index.ts                        # MCP server entry point
├── config.ts                       # Environment configuration
├── client/
│   └── magento-client.ts           # Magento 2 REST API client
├── mappers/
│   ├── order-mapper.ts             # M2 order → onX Order
│   ├── product-mapper.ts           # M2 product → onX Product
│   ├── product-variant-mapper.ts   # M2 simple product → onX ProductVariant
│   └── customer-mapper.ts          # M2 customer → onX Customer
└── tools/                          # 12 onX MCP tool implementations
    ├── _helpers.ts                 # Shared TemporalPagination & response helpers
    ├── create-sales-order.ts       # Action
    ├── update-order.ts             # Action
    ├── cancel-order.ts             # Action
    ├── fulfill-order.ts            # Action
    ├── create-return.ts            # Action
    ├── get-orders.ts               # Query
    ├── get-customers.ts            # Query
    ├── get-products.ts             # Query
    ├── get-product-variants.ts     # Query
    ├── get-inventory.ts            # Query
    ├── get-fulfillments.ts         # Query
    └── get-returns.ts              # Query

自定义字段

根据onX规范,使用 customFields 具有命名空间名称的数组。此适配器使用 m2 默认情况下为命名空间(可通过以下方式配置 ONX_VENDOR_NAMESPACE):

{
  "customFields": [
    { "name": "m2:state", "value": "processing" },
    { "name": "m2:status", "value": "pending_shipment" },
    { "name": "m2:store_id", "value": "1" }
  ]
}

贡献

欢迎捐款。请先打开一个问题来讨论重大更改。

许可证

Apache 2.0——请参阅 许可证.

链接

目录标签

目录标签

电子商务TypeScriptClaude本地部署API适配器Magento商务操作标准化接口

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

oauth

工具数量(toolCount,工具数)

12

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明oauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP