SS

saleor/saleor-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

19 stars 8 forks 质量 75 趋势 42AGPL-3.0

销售商商务的示范背景协议服务器

概览

一个用于Saleor Commerce的模型上下文协议服务器,提供AI助手和工具的集成. Saleor MCP服务器允许AI助手与Saleor实例互动,以获取产品,客户,订单的数据. MCP是只读的-它不会在Saleor API中引发任何突变. 测试 Saleor MCP 服务器的最简单方式是访问部署在: 您可以在 https://mcp.saleor.app/mcp 端点使用可流 HTTP 连接到服务器 。 有关所需标题的详情,见下文配置部分。 制作实例被配置到与sellor.cloud域名所主控的Saleor实例相接,并与Saleor 3.21+兼容. 以下指令将帮助您在当地设置用于开发和测试目的的Saleor MCP服务器. - Python 3号.

概述(AI 翻译)

一个用于Saleor Commerce的模型上下文协议服务器,提供AI助手和工具的集成.

∮开始∮

Saleor MCP服务器允许AI助手与Saleor实例互动,以获取产品,客户,订单的数据. MCP是只读的-它不会在Saleor API中引发任何突变.

测试 Saleor MCP 服务器的最简单方式是访问部署在:

https://mcp.saleor.app/

您可以在 https://mcp.saleor.app/mcp 端点使用可流 HTTP 连接到服务器 。 有关所需标题的详情,见下文配置部分。 制作实例被配置到连接saleor.cloud域上主机所主机的Saleor实例,并与Saleor 3.21+兼容.

□ 安装

以下指令将帮助您在当地设置用于开发和测试目的的Saleor MCP服务器.

· 先决条件

  • Python 3.12 或更高级
  • UV软件包管理器

QQ 设置

  1. ** 设立存储处**

  2. ** 设立附属单位**

  3. ** 本地MCP服务器运行**

服务器将从 [[T3] 开始

□ 配置

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Saleor MCP Server

A Model Context Protocol (MCP) server for Saleor Commerce that provides integration with AI assistants and tools.

Getting Started

The Saleor MCP server allows AI assistants to interact with Saleor instance in order to fetch data about products, customers, and orders. The MCP is read-only - it doesn’t trigger any mutations in the Saleor API.

Easiest way to try out the Saleor MCP server is by visiting the production instance deployed at:

https://mcp.saleor.app/

You can connect to the server with Streamable HTTP at https://mcp.saleor.app/mcp endpoint. See the Configuration section below for details on required headers. The production instance is configured to connect to Saleor instances hosted on saleor.cloud domain and it’s compatible with Saleor 3.21+.

Installation

The following instructions will help you set up the Saleor MCP server locally for development and testing purposes.

Prerequisites

  • Python 3.12 or higher
  • uv package manager

Setup

  1. Clone the repository

    git clone [email protected]:saleor/saleor-mcp.git
    cd saleor-mcp
    
  2. Install dependencies

    uv sync
    
  3. Run the MCP server locally

    uv run saleor-mcp
    

    The server will start on http://localhost:6000

Configuration

X-Saleor-API-URL and X-Saleor-Auth-Token headers

The Saleor MCP server uses two headers to configure connection to the Saleor API:

  • X-Saleor-API-URL - The URL of the Saleor API endpoint.
  • X-Saleor-Auth-Token - The authentication token for accessing the Saleor API. The token must have MANAGE_PRODUCTS and MANAGE_ORDERS permissions to access the available tools.

Make sure to include these headers in your requests to the MCP server.

ALLOWED_DOMAIN_PATTERN env variable

The ALLOWED_DOMAIN_PATTERN environment variable is used to specify a regex pattern for allowed API domains that the MCP server can connect to. When set, the server will validate the X-Saleor-API-URL header against this pattern. If not set, any domain is allowed. Patten must include escaping for special characters.

Example: https:\/\/.*\.saleor\.cloud\/graphql\/ - allows any subdomain of saleor.cloud and the /graphql/ path.

Integration with AI Assistants

Saleor MCP can be enabled in AI assistants that support integration with custom MCP servers using Streamable HTTP and setting the appropriate headers.

Below is the example configuration for VSCode / Copilot using mcp.json file:

{
  "servers": {
    "saleor-mcp": {
      "type": "http",
      "url": "https://mcp.saleor.app/mcp",
      "headers": {
        "X-Saleor-Auth-Token": "eyJhb...",
        "X-Saleor-API-URL": "https://example.saleor.cloud/graphql/"
      }
    }
  }
}

Development

在 GitHub 查看完整 README

安装

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

Open the repository installation guide 新手?先看 mcpskill.org 教程 →