πŸ›οΈ MCP - MCP for Commerce Platforms - Universal E-commerce Customer Support Assistant

by slavpilus

371 downloads
Not rated
GitHub

About

It is a platform-agnostic customer support assistant that connects to any e-commerce platform through pluggable strategies, using the MCP (Model Context Protocol) server and Gradio for the user interface. It is built for developers and support teams who need a single…

Details

Author
slavpilus
Downloads
371
Categories
AI

- Order management: track orders, check status, view history
- Returns and refunds: initiate returns, process refunds
- Order cancellations: quick and easy cancellations
- Conversational interface using natural language
- Platform-agnostic, extensible via a strategy pattern
- Auto‑deployment to Hugging Face Spaces

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name πŸ›οΈ MCP - MCP for Commerce Platforms - Universal E-commerce Customer Support Assistant
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, run the setup script (scripts/setup_dev.sh) or manually create a virtual environment, install dependencies from requirements-dev.txt, copy .env.example to .env and configure it, then run python app.py. The application will be available at http://localhost:7860.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\ud83d\udecd\ufe0f mcp - mcp for commerce platforms - universal e-commerce customer support assistant": {
            "mcp-slavpilus": {
                "command": "python",
                "args": [
                    "-m",
                    "venv",
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-slavpilus": {
        "command": "python",
        "args": [
            "-m",
            "venv",
            "venv"
        ]
    }
}

πŸ›οΈ MCP - MCP for Commerce Platforms - Universal E-commerce Customer Support Assistant

License: MIT
Python 3.10+
Code style: black
codecov

One Chat, Every Platform - A platform-agnostic customer support assistant that
connects to any e-commerce platform through pluggable strategies, using MCP (Model
Context Protocol) server and Gradio for the interface.

🎯 Features

- πŸ“¦ Order Management: Track orders, check status, view history
- πŸ”„ Returns & Refunds: Initiate returns, process refunds seamlessly
- ❌ Cancellations: Quick and easy order cancellations
- πŸ’¬ Natural Language: Conversational interface for customer support
- πŸ”Œ Platform Agnostic: Extensible to any e-commerce platform
- πŸš€ Auto-Deploy: Continuous deployment to Hugging Face Spaces

πŸ—οΈ Architecture

The system uses a Strategy Pattern to abstract different e-commerce platforms:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Gradio UI Layer                      β”‚
β”‚        (Customer Support Conversational Interface)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    MCP Server Core                      β”‚
β”‚  (Order Management, NLP Processing, Context Engine)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              E-commerce Strategy Interface              β”‚
β”‚   (MockData, Shopify, Magento, WooCommerce, etc.)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

- Python 3.10 or higher
- Git
- Virtual environment tool (venv)

Installation

1. Clone the repository

   git clone https://github.com/slavpilus/mcp.git
   cd mcp
   

2. Run the setup script (macOS/Linux)

   chmod +x scripts/setup_dev.sh
   ./scripts/setup_dev.sh
   

Or manually:

   # Create virtual environment
   python -m venv venv

# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate

# Install dependencies
pip install -r requirements-dev.txt

# Install pre-commit hooks
pre-commit install

3. Configure environment variables

   cp .env.example .env
   # Edit .env with your configuration
   

4. Run the application

   python app.py
   

The application will be available at http://localhost:7860

πŸ› οΈ Development

Project Structure

mcp/
β”œβ”€β”€ .github/workflows/    # CI/CD pipelines
β”œβ”€β”€ mcp_server/          # Core MCP server implementation
β”‚   β”œβ”€β”€ strategies/      # E-commerce platform strategies
β”‚   β”œβ”€β”€ models/          # Data models
β”‚   └── utils/           # Utility functions
β”œβ”€β”€ ui/                  # Gradio UI components
β”œβ”€β”€ tests/               # Test suite
β”œβ”€β”€ app.py               # Main Gradio application
└── requirements.txt     # Python dependencies

Development Workflow

1. Activate virtual environment

   source venv/bin/activate  # macOS/Linux
   # or
   venv\Scripts\activate     # Windows
   

2. Make your changes
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed

3. Run code quality checks

   # Format code
   black .
   isort .

# Run linter
ruff check .

# Type checking
mypy mcp_server ui

4. Run tests

   # Run all tests with coverage
   pytest

# Run specific test file
pytest tests/unit/test_strategies.py

# Run with verbose output
pytest -v

5. Commit changes

   git add .
   git commit -m "feat: your feature description"
   

Pre-commit hooks will automatically run code quality checks.

Code Style

This project uses:

- Black for code formatting (line length: 88)
- isort for import sorting
- Ruff for linting
- MyPy for type checking

All code must pass these checks before merging.

Testing

- Minimum test coverage: 80%
- Write unit tests for all new functionality
- Integration tests for critical workflows
- Use pytest fixtures for test data

Adding a New E-commerce Platform

1. Create a new strategy in mcp_server/strategies/:

   from .base import EcommerceStrategy

class YourPlatformStrategy(EcommerceStrategy):
async def get_order(self, order_id: str) -> Optional[Order]:
# Implementation here
pass

2. Add tests in tests/unit/test_your_platform_strategy.py

3. Update the strategy factory to include your platform

πŸ“Š Environment Variables

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

```env

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.