SM

sylius/mcpserverplugin

开发工具

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

19 stars 6 forks 质量 69 趋势 36MIT

A Sylius plugin that exposes a Model Context Protocol (MCP) server for enabling interaction with your store via Large Language Models (LLMs) like ChatGPT.

概览

A Sylius plugin that exposes a Model Context Protocol (MCP) server for enabling interaction with your store via Large Language Models (LLMs) like ChatGPT. We work on stable, supported and up-to-date versions of packages. We recommend you to do the same. This installation instruction assumes that you're using Symfony Flex. 2. Import the plugin configuration in config/packages/sylius_mcp_server.yaml: 3. Import the routes in config/routes.yaml: The Model Context Protocol (MCP) is a standardized way to connect language models (like ChatGPT) with external tools, APIs, and systems. It allows an AI model to make structured tool calls — similar to calling functions — during a conversation. The MCP Server acts as a bridge between the language model and your application logic. It exposes a list of tools (like “search for a product” or “create an order”) and executes them in response to requests from the AI.

README

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

MCP Server Plugin

A Sylius plugin that exposes a Model Context Protocol (MCP) server for enabling interaction with your store via Large Language Models (LLMs) like ChatGPT.

Installation

Requirements

We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.

Package Version
PHP ^8.2
sylius/sylius ^2.1
MySQL ^8.4
NodeJS ^20.x

Beware!

This installation instruction assumes that you’re using Symfony Flex.

  1. Require plugin with composer:
  composer require sylius/mcp-server-plugin

Clear application cache by using command:

  bin/console cache:clear

Without Symfony Flex

  1. Require the plugin:
composer require sylius/mcp-server-plugin
  1. Import the plugin configuration in config/packages/sylius_mcp_server.yaml:
imports:
    - { resource: "@SyliusMcpServerPlugin/config/config.yaml" }
  1. Import the routes in config/routes.yaml:
sylius_mcp_server:
    resource: '@SyliusMcpServerPlugin/config/routes.yaml'
  1. Clear application cache:
bin/console cache:clear

Documentation

What is MCP Server?

The Model Context Protocol (MCP) is a standardized way to connect language models (like ChatGPT) with external tools, APIs, and systems. It allows an AI model to make structured tool calls — similar to calling functions — during a conversation.

The MCP Server acts as a bridge between the language model and your application logic. It exposes a list of tools (like “search for a product” or “create an order”) and executes them in response to requests from the AI.

This plugin integrates Sylius with an MCP Server, enabling AI agents to interact with your store (e.g., search products, check prices, start checkout).

We use the official symfony/mcp-bundle to provide the MCP server runtime.

┌────────────────┐                  ┌───────────────┐       ┌────────┐
│  MCP Client    │◄────────────────►│  MCP Server   │◄─────►│ Sylius │
│ (OpenAi, etc.) │  (Stdio/HTTP)    │ (Tools, etc.) │ (API) │        │
在 GitHub 查看完整 README

安装

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

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