Download the PHP package sylius/mcp-server-plugin without Composer

On this page you can find all versions of the php package sylius/mcp-server-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mcp-server-plugin

Sylius Logo.

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: **Clear application cache by using command:** --- ## Without Symfony Flex 1. Require the plugin: 2. Import the plugin configuration in `config/packages/sylius_mcp_server.yaml`: 3. Import the routes in `config/routes.yaml`: 4. Clear application cache: --- ## 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](https://symfony.com/doc/current/ai/bundles/mcp-bundle.html) to provide the MCP server runtime. To learn more, see the official MCP introduction at [modelcontextprotocol.io](https://modelcontextprotocol.io/introduction). ### Running the MCP Server #### Stdio Transport #### HTTP Transport The HTTP endpoint is available at `/mcp/shop`. ### 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 Tools communicate with the Sylius API through pre-configured HTTP clients: The default API base URI is http://localhost:8000/api/v2/shop/, and can be overridden using the environment variable `SYLIUS_MCP_SERVER_API_SHOP_BASE_URI`. ### Tools The following tools are available out of the box: | Name | Description | |-------------------------|---------------------------------------------------------------| | add_item_to_order | Adds an item to the order. | | complete_checkout | Completes the checkout process. (Final step) | | create_order | Creates a new order. | | fetch_channel | Fetches a channel by code. | | fetch_currency | Fetches a currency by code. | | fetch_order | Fetches an order by its token. | | fetch_product | Fetches a product by its code. | | fetch_product_variant | Fetches a product variant by its code. | | list_payment_methods | Lists all available payment methods. | | list_shipping_methods | Lists all available shipping methods. | | search_products | Searches for products by name. | | search_product_variants | Searches for product variants by name. | | select_payment_method | Selects a payment method for the order. (Step 3 of checkout) | | select_shipping_method | Selects a shipping method for the order. (Step 2 of checkout) | | update_order_address | Updates 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 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`: ### 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 1. Add a new tool in the OpenAI Playground. ![add_tool](doc/images/playground_one.png) 2. Configure the tool with the following settings: - **URL**: `http://localhost:8080/mcp/shop` (or your ngrok URL) - **Label**: Sylius - **Authentication**: None ![configure_tool](doc/images/playground_two.png) #### Example with API Call ## 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 `[email protected]` ## Community For online communication, we invite you to chat with us & other users on [Sylius Slack](https://sylius-devs.slack.com/). ## License This plugin's source code is completely free and released under the terms of the MIT license.

All versions of mcp-server-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
sylius/sylius Version ^2.1
symfony/mcp-bundle Version ^0.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sylius/mcp-server-plugin contains the following files

Loading the files please wait ...