MCP Hub
Back to servers

E-commerce MCP Server

A comprehensive MCP server for managing e-commerce workflows, offering full CRUD operations for products, customers, and orders alongside advanced business intelligence and inventory reporting tools.

Tools
25
Updated
Dec 13, 2025

E-commerce MCP Server

A FastMCP server for managing products, customers, and orders with full CRUD operations and data analysis capabilities.

Installation

# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install fastmcp sqlalchemy aiosqlite

Running the Server

# Using fastmcp CLI
fastmcp run ecommerce_server.py

# Or directly with Python
python ecommerce_server.py

Configuring with Claude Desktop

Add this to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "ecommerce": {
      "command": "/path/to/venv/bin/python",
      "args": ["/path/to/ecommerce_server.py"],
      "env": {
        "ECOMMERCE_DB_PATH": "/path/to/ecommerce.db"
      }
    }
  }
}

Available Tools (25 total)

Product Management

ToolDescription
add_productAdd a new product to inventory
get_productGet product by ID or SKU
list_productsList products with filtering (category, stock level)
update_productUpdate product details
delete_productSoft delete (deactivate) a product
update_stockAdd or subtract stock quantity
search_productsSearch products by name/description

Customer Management

ToolDescription
add_customerAdd a new customer
get_customerGet customer by ID or email
list_customersList customers with filtering
update_customerUpdate customer details
delete_customerSoft delete (deactivate) a customer
search_customersSearch customers by name/email

Order Management

ToolDescription
create_orderCreate a new order for a customer
add_order_itemAdd a product to an order
remove_order_itemRemove a product from an order
get_orderGet order by ID or order number
list_ordersList orders with filtering (customer, status, date range)
update_order_statusUpdate order status (pending → confirmed → shipped → delivered)

Data Analysis & Reporting

ToolDescription
get_sales_summaryRevenue, order count, average order value for a period
get_top_productsTop selling products by quantity and revenue
get_top_customersTop customers by spend and order count
get_inventory_reportStock levels, out-of-stock items, category breakdown
get_customer_order_historyComplete order history for a customer
get_profit_analysisProfit margins by product (requires cost data)

Example Usage

Adding Products

"Add a product: iPhone 15 Pro, SKU: IP15PRO, price $999, cost $750, 50 in stock, category Electronics"

Managing Customers

"Add customer John Doe, email john@example.com, phone 555-1234"
"Find all customers in New York"

Creating Orders

"Create an order for customer ID 1"
"Add 2 units of product ID 3 to order ID 1"
"Mark order 1 as shipped"

Data Analysis

"Show me the sales summary for this month"
"What are the top 5 selling products?"
"Which products are low on stock?"
"Show profit analysis for Q4"

Database

The server uses SQLite by default. The database file location can be configured via the ECOMMERCE_DB_PATH environment variable.

Schema

  • Products: id, name, description, sku, price, cost, quantity_in_stock, category, is_active
  • Customers: id, email, first_name, last_name, phone, address, city, state, postal_code, country, is_active
  • Orders: id, customer_id, order_number, status, total_amount, shipping_address, notes
  • OrderItems: id, order_id, product_id, quantity, unit_price

Order Statuses

  • pending - Order created, awaiting confirmation
  • confirmed - Order confirmed, stock reserved
  • shipped - Order shipped to customer
  • delivered - Order delivered
  • cancelled - Order cancelled, stock restored

Reviews

No reviews yet

Sign in to write a review