BM

boldcommerce/magento2-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

68 stars 26 forks Качество 63 Тренд 14GPL-3.0

boldcommerce/magento2-mcp - это кандидат на сервер MCP, импортированный из https://github.com/boldcommerce/magento2-mcp.

Обзор

boldcommerce/magento2-mcp - это кандидат на сервер MCP, импортированный из https://github.com/boldcommerce/magento2-mcp.

Обзор (машинный перевод)

Это сервер Model Context Protocol (MCP), который подключается к API Magento 2 REST, позволяя Claude и другим клиентам MCP запрашивать информацию о продукте из магазина Magento.

Особенности

Особенности продукта

Запрос информации о продукте по SKU или ID Поиск товаров с использованием различных критериев Получить категории продуктов Получить сопутствующие продукты Получить информацию о запасе продукции Получить атрибуты продукта Обновление атрибутов продукта путем указания кода атрибута и значения Продвинутый поиск продуктов с фильтрацией и сортировкой

###Особенности клиентов Получить все заказанные продукты для клиента по адресу электронной почты

Порядок и доходы

Получите количество заказов на конкретные диапазоны дат Получите доход за конкретные диапазоны дат Получение доходов, отфильтрованных по странам для конкретных диапазонов дат Получите статистику продаж продуктов, включая количество проданных и самых продаваемых продуктов Поддержка относительных выражений даты, таких как «сегодня», «вчера», «последняя неделя», «этот месяц», «YTD» Поддержка фильтрации по странам с использованием кодов стран и названий стран

Предпосылки

Node.js (v14 или выше) Пример Magento 2 с доступом к REST API API-токен для экземпляра Magento 2

##Установка

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

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

  1. Clone this repository
  2. 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

  1. Check your path node with which node
  2. Go to the Developer settings and click “Edit config”. This will open a JSON file.
  3. 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"
      }
    }
  1. Replace /path/to/your/node with the path you checked in step 1
  2. Replace /path/to/mcp-server.js with the path where you cloned this repo
  3. You can get an API token from System > Integrations in the Magento admin
  4. Restart Claude Desktop.
  5. 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 SKU
  • search_products: Search for products using Magento search criteria
  • get_product_categories: Get categories for a specific product by SKU
  • get_related_products: Get products related to a specific product by SKU
  • get_product_stock: Get stock information for a product by SKU
  • get_product_attributes: Get all attributes for a product by SKU
  • get_product_by_id: Get detailed information about a product by its ID
  • advanced_product_search: Search for products with advanced filtering options
  • update_product_attribute: Update a specific attribute of a product by SKU

Customer Tools

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →