BM 

boldcommerce/magento2-mcp 是从 https://github.com/boldcommerce/magento2-mcp. 导入的 MCP 服务器候选服务器。
概览
boldcommerce/magento2-mcp 是从 https://github.com/boldcommerce/magento2-mcp. 导入的 MCP 服务器候选服务器。
概述(AI 翻译)
这是一个模型上下文协议(MCP)服务器,连接到 Magento 2 的 REST API,允许 Claude 和其他 MCP 客户端从 Magento 存储中查询产品信息。
特色
产品特色
- 按SKU或ID查询产品信息
- 使用多种标准搜索产品
- 获取产品类别
- 获取相关产品
- 获取产品库存信息
- 获取产品属性
- 通过指定属性代码和数值来更新产品属性
- 带有筛选和排序功能的高级产品搜索
客户特色
- 通过电子邮件地址获取客户的所有订购产品
订单与收入特征
- 获取特定日期范围的订单数量
- 针对特定日期范围获取收入
- 按国家筛选特定日期范围的收入
- 获取产品销售统计数据,包括销售数量和畅销产品
- 支持相对日期表达,如“今天”、“昨天”、“上周”、“本月”、“年初至今”
- 支持使用国家代码和国家名称进行国家筛选
先修条件
- Node.js(v14或更高)
- 一个支持 REST API 的 Magento 2 实例
- Magento 2 实例的 API 令牌
安装
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Magento 2 MCP Server
This is a Model Context Protocol (MCP) server that connects to a Magento 2 REST API, allowing Claude and other MCP clients to query product information from a Magento store.
Features
Product Features
- Query product information by SKU or ID
- Search for products using various criteria
- Get product categories
- Get related products
- Get product stock information
- Get product attributes
- Update product attributes by specifying attribute code and value
- Advanced product search with filtering and sorting
Customer Features
- Get all ordered products for a customer by email address
Order and Revenue Features
- Get order count for specific date ranges
- Get revenue for specific date ranges
- Get revenue filtered by country for specific date ranges
- Get product sales statistics including quantity sold and top-selling products
- Support for relative date expressions like “today”, “yesterday”, “last week”, “this month”, “YTD”
- Support for country filtering using both country codes and country names
Prerequisites
- Node.js (v14 or higher)
- A Magento 2 instance with REST API access
- API token for the Magento 2 instance
Installation
- Clone this repository
- Install dependencies:
npm install
Usage
Running the server directly
node mcp-server.js
Testing with the test client
node test-mcp-server.js
Using with Claude Desktop
- Check your path node with
which node - Go to the Developer settings and click “Edit config”. This will open a JSON file.
- Add the following snippet within the
mcpServers:
"magento2": {
"command": "/path/to/your/node",
"args": ["/path/to/mcp-server.js"],
"env": {
"MAGENTO_BASE_URL": "https://YOUR_DOMAIN/rest/V1",
"MAGENTO_API_TOKEN": "your-api-token"
}
}
- Replace
/path/to/your/nodewith the path you checked in step 1 - Replace
/path/to/mcp-server.jswith the path where you cloned this repo - You can get an API token from System > Integrations in the Magento admin
- Restart Claude Desktop.
- You should now be able to ask Claude questions about products in your Magento store.
Available Tools
The server exposes the following tools:
Product Tools
get_product_by_sku: Get detailed information about a product by its SKUsearch_products: Search for products using Magento search criteriaget_product_categories: Get categories for a specific product by SKUget_related_products: Get products related to a specific product by SKUget_product_stock: Get stock information for a product by SKUget_product_attributes: Get all attributes for a product by SKUget_product_by_id: Get detailed information about a product by its IDadvanced_product_search: Search for products with advanced filtering optionsupdate_product_attribute: Update a specific attribute of a product by SKU
Customer Tools
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →