PHPackages                             sylius/mcp-server-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. sylius/mcp-server-plugin

ActiveSylius-plugin

sylius/mcp-server-plugin
========================

Sylius MCP Server Plugin

v0.2.0(2mo ago)171.1k↓100%4[2 PRs](https://github.com/Sylius/McpServerPlugin/pulls)proprietaryPHPPHP ^8.2CI failing

Since Jul 3Pushed 2mo agoCompare

[ Source](https://github.com/Sylius/McpServerPlugin)[ Packagist](https://packagist.org/packages/sylius/mcp-server-plugin)[ GitHub Sponsors](https://github.com/sylius)[ RSS](/packages/sylius-mcp-server-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (32)Versions (6)Used By (0)

 [    ![Sylius Logo.](https://camo.githubusercontent.com/ea9dddc934264aa7ec01cf3202c500f3d8b04448bce2571bdc74230efddda88f/68747470733a2f2f6d656469612e73796c6975732e636f6d2f73796c6975732d6c6f676f2d3830302e706e67)  ](https://sylius.com)

MCP Server Plugin
=================

[](#mcp-server-plugin)

[![](https://camo.githubusercontent.com/9b437c7f32af7f569d4c0d8e750fd3e94c19a1a7ad491228a34cf567b0ea8af4/68747470733a2f2f73796c6975732e636f6d2f6173736574732f62616467652d6f6666696369616c2d73796c6975732d706c7567696e2e706e67)](https://sylius.com/plugins/)

 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
============

[](#installation)

Requirements
------------

[](#requirements)

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

PackageVersionPHP^8.2sylius/sylius^2.1MySQL^8.4NodeJS^20.x---

#### Beware!

[](#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
--------------------

[](#without-symfony-flex)

1. Require the plugin:

```
composer require sylius/mcp-server-plugin
```

2. Import the plugin configuration in `config/packages/sylius_mcp_server.yaml`:

```
imports:
    - { resource: "@SyliusMcpServerPlugin/config/config.yaml" }
```

3. Import the routes in `config/routes.yaml`:

```
sylius_mcp_server:
    resource: '@SyliusMcpServerPlugin/config/routes.yaml'
```

4. Clear application cache:

```
bin/console cache:clear
```

---

Documentation
-------------

[](#documentation)

### What is MCP Server?

[](#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](https://symfony.com/doc/current/ai/bundles/mcp-bundle.html) to provide the MCP server runtime.

```
┌────────────────┐                  ┌───────────────┐       ┌────────┐
│  MCP Client    │◄────────────────►│  MCP Server   │◄─────►│ Sylius │
│ (OpenAi, etc.) │  (Stdio/HTTP)    │ (Tools, etc.) │ (API) │        │
└────────────────┘                  └───────────────┘       └────────┘

```

To learn more, see the official MCP introduction at [modelcontextprotocol.io](https://modelcontextprotocol.io/introduction).

### Running the MCP Server

[](#running-the-mcp-server)

#### Stdio Transport

[](#stdio-transport)

```
  bin/console mcp:server
```

#### HTTP Transport

[](#http-transport)

The HTTP endpoint is available at `/_mcp`.

### MCP Server Configuration

[](#mcp-server-configuration)

For more options, refer to the [symfony/mcp-bundle documentation](https://symfony.com/doc/current/ai/bundles/mcp-bundle.html).

### Sylius API

[](#sylius-api)

Tools communicate with the Sylius API through pre-configured HTTP clients:

```
sylius_mcp_server.http_client.api_shop:
    base_uri: '%sylius_mcp_server.api.shop_base_uri%'
    headers:
        - 'Accept: application/ld+json'
        - 'Content-Type: application/ld+json'
sylius_mcp_server.http_client.api_shop_merge_patch:
    base_uri: '%sylius_mcp_server.api.shop_base_uri%'
    headers:
        - 'Accept: application/ld+json'
        - 'Content-Type: application/merge-patch+json'
```

The default API base URI is , and can be overridden using the environment variable `SYLIUS_MCP_SERVER_API_SHOP_BASE_URI`.

### Tools

[](#tools)

The following tools are available out of the box:

NameDescriptionadd\_item\_to\_orderAdds an item to the order.complete\_checkoutCompletes the checkout process. (Final step)create\_orderCreates a new order.fetch\_channelFetches a channel by code.fetch\_currencyFetches a currency by code.fetch\_orderFetches an order by its token.fetch\_productFetches a product by its code.fetch\_product\_variantFetches a product variant by its code.list\_payment\_methodsLists all available payment methods.list\_shipping\_methodsLists all available shipping methods.search\_productsSearches for products by name.search\_product\_variantsSearches for product variants by name.select\_payment\_methodSelects a payment method for the order. (Step 3 of checkout)select\_shipping\_methodSelects a shipping method for the order. (Step 2 of checkout)update\_order\_addressUpdates the order address. (Step 1 of checkout)These tools currently operate in guest mode only — `fetch_order` returns data only if the order has no associated customer account.

#### Adding custom tools

[](#adding-custom-tools)

You can extend the server with your own tools by creating PHP classes annotated with the `#[McpTool]` attribute.

To learn how to define and structure a tool, see the [symfony/mcp-bundle documentation](https://symfony.com/doc/current/ai/bundles/mcp-bundle.html).

Register your tools as services with autoconfiguration in `config/services.yaml`:

```
services:
    App\Mcp\Tool\:
        resource: '../src/Mcp/Tool/*'
        autoconfigure: true
```

### Usage Example

[](#usage-example)

You can use the server directly in [OpenAI Playground](https://platform.openai.com/playground/prompts), exposing it via [ngrok](https://ngrok.com/) or similar tunneling tools.

#### Example with OpenAI Playground

[](#example-with-openai-playground)

1. Add a new tool in the OpenAI Playground. [![add_tool](doc/images/playground_one.png)](doc/images/playground_one.png)
2. Configure the tool with the following settings:

    - **URL**: `http://localhost:8080/_mcp` (or your ngrok URL)
    - **Label**: Sylius
    - **Authentication**: None [![configure_tool](doc/images/playground_two.png)](doc/images/playground_two.png)

#### Example with API Call

[](#example-with-api-call)

```
  curl https://api.openai.com/v1/responses \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $OPENAI_API_KEY" \
    -d '{
      "model": "gpt-4.1",

      "tools": [
        {
          "type": "mcp",
          "server_label": "Sylius",
          "server_url": "$YOUR_MCP_SERVER_URL",
          "require_approval": "never"
        }
      ],

      "input": [
        {
          "role": "user",
          "content": [
            {
              "type": "input_text",
              "text": "Find me red shoes"
            }
          ]
        }
      ],
      "max_output_tokens": 1024
    }'
```

Security issues
---------------

[](#security-issues)

If you think that you have found a security issue, please do not use the issue tracker and do not post it publicly. Instead, all security issues must be sent to `security@sylius.com`

Community
---------

[](#community)

For online communication, we invite you to chat with us &amp; other users on [Sylius Slack](https://sylius-devs.slack.com/).

License
-------

[](#license)

This plugin's source code is completely free and released under the terms of the MIT license.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance93

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~118 days

Total

3

Last Release

74d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/719423?v=4)[Sylius eCommerce](/maintainers/sylius)[@Sylius](https://github.com/Sylius)

![](https://www.gravatar.com/avatar/4b4a5a1a9293502aa8573551fab020963a9050c5cca4524433b6d94214d3b480?d=identicon)[GSadee](/maintainers/GSadee)

---

Top Contributors

[![Wojdylak](https://avatars.githubusercontent.com/u/33687392?v=4)](https://github.com/Wojdylak "Wojdylak (18 commits)")[![camilleislasse](https://avatars.githubusercontent.com/u/34024380?v=4)](https://github.com/camilleislasse "camilleislasse (4 commits)")[![Rafikooo](https://avatars.githubusercontent.com/u/40125720?v=4)](https://github.com/Rafikooo "Rafikooo (2 commits)")

---

Tags

syliussylius-plugin

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sylius-mcp-server-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/sylius-mcp-server-plugin/health.svg)](https://phpackages.com/packages/sylius-mcp-server-plugin)
```

###  Alternatives

[bitbag/cms-plugin

CMS plugin for Sylius applications.

2461.1M5](/packages/bitbag-cms-plugin)[sylius/invoicing-plugin

Invoicing plugin for Sylius.

901.0M2](/packages/sylius-invoicing-plugin)[sylius/refund-plugin

Plugin provides basic refunds functionality for Sylius application.

691.7M13](/packages/sylius-refund-plugin)[stefandoorn/sitemap-plugin

Sitemap Plugin for Sylius

851.0M](/packages/stefandoorn-sitemap-plugin)[sylius/paypal-plugin

PayPal plugin for Sylius.

451.4M4](/packages/sylius-paypal-plugin)[monsieurbiz/sylius-rich-editor-plugin

A Rich Editor plugin for Sylius.

75380.8k6](/packages/monsieurbiz-sylius-rich-editor-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
