PrestaShop MCP Server

PrestaShop MCP Server

Enables complete management of PrestaShop e-commerce stores through natural language, including products, categories, customers, orders, modules, cache, themes, and navigation menus.

Category
访问服务器

README

PrestaShop MCP Server

A professional Model Context Protocol (MCP) Server for complete management of PrestaShop e-commerce stores with extended functionality.

🚀 Overview

This MCP Server enables complete management of your PrestaShop store through AI applications like Claude Desktop. With specialized tools, you can manage all aspects of your e-commerce business - from products and categories to customers, orders, modules, cache, themes, and navigation menus.

✨ Features

  • 🛍️ Complete Store Management - Tools for all e-commerce areas
  • 🔧 Module Management - Install, activate, deactivate modules
  • 💾 Cache Management - Clear and monitor cache status
  • 🎨 Theme Management - Configure themes and settings
  • 📋 Menu Management - Manage main navigation (ps_mainmenu)
  • 🏗️ MCP Protocol Compliance for seamless AI integration
  • ⚡ Async/Await Architecture for maximum performance
  • 🛡️ Comprehensive Error Handling and validation
  • 🔧 Production-Ready with complete test suite
  • 📖 Comprehensive Documentation with practical examples

🛠️ Available Tools

📦 Unified Product Management

  • get_products - UNIFIED Product retrieval supporting all use cases:
    • Single Product by ID: Complete product details including stock and category info
    • Multiple Products: List with optional filtering and enhancement
    • Flexible Enhancement: Optional stock info, category details, custom field selection
    • Smart Filtering: By category, name, or custom criteria
  • create_product - Create new products with complete configuration
  • update_product - Edit product information
  • delete_product - Remove products
  • update_product_stock - Manage inventory levels
  • update_product_price - Update pricing

🏷️ Category Management

  • get_categories - Retrieve categories (with hierarchy filter)
  • create_category - Create new categories
  • update_category - Edit categories
  • delete_category - Remove categories

👥 Customer Management

  • get_customers - Retrieve and filter customers
  • create_customer - Create new customers
  • update_customer - Edit customer data

📋 Order Management

  • get_orders - Retrieve and filter orders
  • update_order_status - Change order status
  • get_order_states - Retrieve available statuses

🔧 Module Management NEW

  • get_modules - List all PrestaShop modules
  • get_module_by_name - Get specific module details
  • install_module - Install new modules
  • update_module_status - Activate/deactivate modules

📋 Main Menu Management NEW

  • get_main_menu_links - Retrieve ps_mainmenu navigation links
  • update_main_menu_link - Edit existing menu links
  • add_main_menu_link - Add new navigation links

💾 Cache Management NEW

  • clear_cache - Clear PrestaShop cache (all types)
  • get_cache_status - Monitor cache configuration

🎨 Theme Management NEW

  • get_themes - Get current theme information
  • update_theme_setting - Configure theme settings

⚙️ Store Administration

  • test_connection - Test API connection
  • get_shop_info - Comprehensive store statistics

📋 Installation

⚠️ Recommended Installation (Virtual Environment)

This approach prevents module conflicts and ensures reliable installation:

Windows:

# Clone repository
git clone https://github.com/latinogino/prestashop-mcp.git
cd prestashop-mcp

# Create virtual environment
python -m venv venv_prestashop

# Activate virtual environment
.\venv_prestashop\Scripts\Activate.ps1

# Install dependencies
pip install -r requirements.txt

# Install package in development mode
pip install -e .

# Verify installation
python -c "import prestashop_mcp; print('✅ Installation successful')"

# Note the Python path for Claude Desktop configuration
Write-Host "Python Path: $((Get-Command python).Source)"

Linux/macOS:

# Clone repository
git clone https://github.com/latinogino/prestashop-mcp.git
cd prestashop-mcp

# Create virtual environment
python3 -m venv venv_prestashop

# Activate virtual environment
source venv_prestashop/bin/activate

# Install dependencies
pip install -r requirements.txt

# Install package in development mode
pip install -e .

# Verify installation
python -c "import prestashop_mcp; print('✅ Installation successful')"

# Note the Python path for Claude Desktop configuration
which python

⚙️ Configuration

Create a .env file based on .env.example:

# PrestaShop Configuration
PRESTASHOP_SHOP_URL=https://your-shop.example.com
PRESTASHOP_API_KEY=YOUR_API_KEY

# Logging
LOG_LEVEL=INFO

🎯 Usage

🤖 With Claude Desktop

Using Virtual Environment (Recommended)

Add this configuration to claude_desktop_config.json:

Windows:

{
  "mcpServers": {
    "prestashop": {
      "command": "C:\\\\path\\\\to\\\\prestashop-mcp\\\\venv_prestashop\\\\Scripts\\\\python.exe",
      "args": ["-m", "prestashop_mcp.prestashop_mcp_server"],
      "cwd": "C:\\\\path\\\\to\\\\prestashop-mcp",
      "env": {
        "PRESTASHOP_SHOP_URL": "https://your-shop.example.com",
        "PRESTASHOP_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Linux/macOS:

{
  "mcpServers": {
    "prestashop": {
      "command": "/path/to/prestashop-mcp/venv_prestashop/bin/python",
      "args": ["-m", "prestashop_mcp.prestashop_mcp_server"],
      "cwd": "/path/to/prestashop-mcp",
      "env": {
        "PRESTASHOP_SHOP_URL": "https://your-shop.example.com",
        "PRESTASHOP_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

💻 CLI Usage

# Activate virtual environment first (if using venv)
source venv_prestashop/bin/activate  # Linux/macOS
.\venv_prestashop\Scripts\Activate.ps1  # Windows

# With environment variables
prestashop-mcp

# With direct parameters
prestashop-mcp --shop-url https://your-shop.com --api-key YOUR_API_KEY

# Debug mode
prestashop-mcp --log-level DEBUG

🆕 Extended Functionality Examples

Module Management

"Show me all modules in my PrestaShop store"
"Activate the ps_mainmenu module"
"Deactivate the blockcart module"
"Get details for the ps_featuredproducts module"

Main Menu Management

"Show me all main menu links"
"Add a new menu link called 'Special Offers' pointing to /special-offers"
"Update menu link 3 to point to /new-products"
"Make menu link 5 inactive"

Cache Management

"Clear all PrestaShop cache"
"Show me the current cache status"
"Check if CSS cache is enabled"

Theme Management

"Show me current theme settings"
"Update the PS_LOGO setting to /img/new-logo.png"
"Change the PS_THEME_NAME to my-custom-theme"

🆕 Unified Product API

The get_products tool handles all product retrieval scenarios with a single, powerful interface:

Use Cases:

Scenario Parameters Result
Single Product Details product_id="15", include_stock=true, include_category_info=true Complete product info with stock & category
Product List limit=20, category_id="5" List of products in category 5
Enhanced List limit=10, include_details=true, include_stock=true Full product details with stock for 10 products
Filtered Search name_filter="laptop", include_details=true All laptop products with complete information
Custom Fields display="id,name,price", limit=50 Specific fields only for 50 products

🛠️ Advanced Features

ps_mainmenu Integration

The ps_mainmenu module management allows you to:

  • Retrieve all main navigation links
  • Add custom navigation items
  • Update existing menu links (name, URL, status)
  • Control menu link positioning

Cache Performance Optimization

Cache management includes:

  • Clear all cache types (CSS, JS, Template, General)
  • Monitor cache status for performance optimization
  • Toggle cache settings for development/production

Module Lifecycle Management

Complete module control:

  • List all installed modules with status
  • Install new modules programmatically
  • Activate/deactivate modules as needed
  • Get detailed module information

Theme Customization

Theme management capabilities:

  • View current theme configuration
  • Update theme-specific settings
  • Manage logos and visual elements
  • Configure theme-related PrestaShop settings

🔧 Troubleshooting

❌ Common Issues

"ModuleNotFoundError: No module named 'prestashop_mcp'"

Solution: Use virtual environment and ensure package is installed:

# Check if in virtual environment
python -c "import sys; print(sys.prefix)"

# Reinstall package
pip install -e .

# Verify installation
python -c "import prestashop_mcp; print('Module found')"

Module Management Issues

Check Module Permissions:

# Ensure your API key has module management permissions
curl -u "YOUR_API_KEY:" https://your-shop.com/api/modules?output_format=JSON

Cache Clear Not Working

Alternative Cache Clear: If the API-based cache clear doesn't work, you may need to:

  1. Check PrestaShop permissions for API user
  2. Use manual cache clearing in PrestaShop admin
  3. Verify cache directory write permissions

🔍 Debug Mode

Enable debug logging in Claude Desktop configuration:

{
  "mcpServers": {
    "prestashop": {
      "command": "path/to/python",
      "args": ["-m", "prestashop_mcp.prestashop_mcp_server"],
      "cwd": "path/to/prestashop-mcp",
      "env": {
        "PRESTASHOP_SHOP_URL": "https://your-shop.example.com",
        "PRESTASHOP_API_KEY": "YOUR_API_KEY",
        "LOG_LEVEL": "DEBUG"
      }
    }
  }
}

📊 Project Structure

prestashop-mcp/
├── src/prestashop_mcp/                  # Main Package
│   ├── prestashop_mcp_server.py         # MCP Server (Extended)
│   ├── prestashop_client.py             # PrestaShop API Client (Extended)
│   ├── config.py                        # Configuration Management
│   └── cli.py                          # Command Line Interface
├── tests/                               # All Tests
│   ├── test_config.py                   # Unit Tests
│   └── test_crud_operations.py          # CRUD Integration Tests
├── venv_prestashop/                     # Virtual Environment (after setup)
├── README.md                            # Documentation
├── CHANGELOG.md                         # Version History
├── pyproject.toml                       # Package Configuration
└── requirements.txt                     # All Dependencies

📖 API Documentation

PrestaShop API

Complete PrestaShop API documentation:

Authentication

curl -u "API_KEY:" https://your-shop.com/api/configurations?output_format=JSON

Important Endpoints

  • Products: /api/products
  • Categories: /api/categories
  • Customers: /api/customers
  • Orders: /api/orders
  • Stock: /api/stock_availables
  • Order Status: /api/order_states
  • Modules: /api/modules NEW
  • Configurations: /api/configurations NEW

🧪 Development

🏗️ Development Environment

# Activate virtual environment
source venv_prestashop/bin/activate  # Linux/macOS
.\venv_prestashop\Scripts\Activate.ps1  # Windows

# All dependencies (including test dependencies) are in requirements.txt
pip install -r requirements.txt

# Run tests
pytest

# Run tests with coverage
pytest --cov=src/prestashop_mcp --cov-report=html

# Run comprehensive integration tests
python tests/test_crud_operations.py

📖 Resources

📄 License

MIT License - see LICENSE for details.

📝 Changelog

See CHANGELOG.md for a detailed history of changes.

🏗️ Project Status & Development Notes

📋 Maintenance Status

⚠️ Limited Maintenance: I currently do not plan to actively maintain this repository. The PrestaShop MCP Server was rather a test of how an MCP server can be created without significant own programming experience and largely based on LLMs and MCPs.

🧪 Experimental Nature

This project served as a Proof of Concept for:

  • LLM-Assisted Development: Development of complex software integration solutions with minimal manual programming
  • MCP Server Architecture: Practical implementation of the Model Context Protocol specification
  • AI-Driven E-Commerce Integration: Automated PrestaShop management through natural language
  • No-Code/Low-Code Approach: Maximum use of AI tools for professional software development

🐳 Planned Docker Distribution

Upcoming Features: It is still planned to provide the entire MCP server as a ready-made Docker container as soon as all functions are implemented as desired.

Benefits of Docker deployment:

  • Zero-Configuration Setup: Easy installation without complex Python environment
  • Consistent Environment: Identical behavior on all platforms
  • Isolated Dependencies: No conflicts with local Python installations
  • Production-Ready: Optimized for productive use
  • Auto-Updates: Easy update to new versions

Planned Docker usage:

# Future Docker installation (planned)
docker pull latinogino/prestashop-mcp:latest
docker run -e PRESTASHOP_SHOP_URL=https://your-shop.com \
           -e PRESTASHOP_API_KEY=your-key \
           -p 8080:8080 \
           latinogino/prestashop-mcp:latest

🎯 Manage your complete PrestaShop store including modules, cache, themes, and navigation through natural language with Claude Desktop!

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选