prestashop-mcp-server
v1.0.0
Published
Model Context Protocol server for PrestaShop API
Readme
PrestaShop MCP Server
A Model Context Protocol (MCP) server that integrates with the PrestaShop API to provide tools for managing products, orders, and customers in your PrestaShop store.
Features
- Products: List, get details, create, update, and delete products
- Orders: List, get details, and update orders
- Customers: List, get details, create, update, and delete customers
Installation
Global Installation (Recommended for n8n)
npm install -g prestashop-mcp-serverLocal Installation
npm install prestashop-mcp-serverConfiguration
The PrestaShop MCP server requires the following environment variables:
PRESTASHOP_API_URL: The URL of your PrestaShop store's API (e.g.,https://your-store.com)PRESTASHOP_API_KEY: Your PrestaShop API key
Getting Your PrestaShop API Key
- Log in to your PrestaShop admin panel
- Go to Advanced Parameters > Webservice
- Enable the webservice by setting "Enable PrestaShop's webservice" to "Yes"
- Click on "Add new webservice key"
- Enter a key name and generate a key
- Set the appropriate permissions for the resources you want to access
- Save the configuration
Usage with n8n
This MCP server can be used with n8n through the n8n-nodes-mcp custom node.
Setting up in Docker/Railway
- Create a custom Dockerfile for n8n:
FROM n8nio/n8n:latest
# Install the MCP server and n8n-nodes-mcp
RUN npm install -g prestashop-mcp-server n8n-nodes-mcp
# Enable community packages as tools
ENV N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true- Configure environment variables in your Docker/Railway setup:
MCP_PRESTASHOP_API_URL=https://your-store.com
MCP_PRESTASHOP_API_KEY=your-api-key
N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=trueConfiguring in n8n
In n8n, go to "Credentials" and create new credentials of type "MCP Client API"
Choose "Command-line Based Transport (STDIO)"
Configure as follows:
- Command:
npx - Arguments:
-y prestashop-mcp-server - Environment Variables: (leave empty if configured in Docker)
- Command:
Create a workflow using the MCP Client node with your credentials
Example Workflow
- Add an MCP Client node
- Select "List Tools" operation to see available tools
- Add another MCP Client node
- Select "Execute Tool" operation
- Choose a tool (e.g., "get_products")
- Configure parameters as needed
Adding to Claude Desktop
To add this MCP server to Claude Desktop:
Install the package globally:
npm install -g prestashop-mcp-serverOpen the Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
Add the following configuration to the
mcpServersobject:
"prestashop": {
"command": "npx",
"args": ["-y", "prestashop-mcp-server"],
"env": {
"PRESTASHOP_API_URL": "https://your-store.com",
"PRESTASHOP_API_KEY": "your-api-key"
},
"disabled": false,
"autoApprove": []
}Available Tools
Products
get_products
Get a list of products from your PrestaShop store.
{
"limit": 10,
"page": 1,
"filter": {
"name": "T-shirt"
}
}get_product
Get details of a specific product.
{
"id": 1
}create_product
Create a new product in your PrestaShop store.
{
"product": {
"name": [
{
"id": 1,
"value": "New Product"
}
],
"price": "19.99",
"active": 1
}
}update_product
Update an existing product in your PrestaShop store.
{
"id": 1,
"product": {
"price": "24.99"
}
}delete_product
Delete a product from your PrestaShop store.
{
"id": 1
}Orders
get_orders
Get a list of orders from your PrestaShop store.
{
"limit": 10,
"page": 1,
"filter": {
"current_state": 3
}
}get_order
Get details of a specific order.
{
"id": 1
}update_order
Update an existing order in your PrestaShop store.
{
"id": 1,
"order": {
"current_state": 4
}
}Customers
get_customers
Get a list of customers from your PrestaShop store.
{
"limit": 10,
"page": 1,
"filter": {
"email": "[email protected]"
}
}get_customer
Get details of a specific customer.
{
"id": 1
}create_customer
Create a new customer in your PrestaShop store.
{
"customer": {
"firstname": "John",
"lastname": "Doe",
"email": "[email protected]",
"passwd": "securepassword"
}
}update_customer
Update an existing customer in your PrestaShop store.
{
"id": 1,
"customer": {
"firstname": "Jane"
}
}delete_customer
Delete a customer from your PrestaShop store.
{
"id": 1
}Examples
Example: Getting a list of products
use_mcp_tool
server_name: prestashop
tool_name: get_products
arguments: {
"limit": 5,
"page": 1
}Example: Creating a new product
use_mcp_tool
server_name: prestashop
tool_name: create_product
arguments: {
"product": {
"name": [
{
"id": 1,
"value": "New T-shirt"
}
],
"description": [
{
"id": 1,
"value": "A comfortable cotton t-shirt"
}
],
"price": "19.99",
"active": 1
}
}License
ISC
