E-commerce MCP Server
A FastMCP server for managing products, customers, and orders with full CRUD operations and data analysis capabilities.
Installation
Running the Server
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
Available Tools (25 total)
Product Management
Tool | Description |
| Add a new product to inventory |
| Get product by ID or SKU |
| List products with filtering (category, stock level) |
| Update product details |
| Soft delete (deactivate) a product |
| Add or subtract stock quantity |
| Search products by name/description |
Customer Management
Tool | Description |
| Add a new customer |
| Get customer by ID or email |
| List customers with filtering |
| Update customer details |
| Soft delete (deactivate) a customer |
| Search customers by name/email |
Order Management
Tool | Description |
| Create a new order for a customer |
| Add a product to an order |
| Remove a product from an order |
| Get order by ID or order number |
| List orders with filtering (customer, status, date range) |
| Update order status (pending → confirmed → shipped → delivered) |
Data Analysis & Reporting
Tool | Description |
| Revenue, order count, average order value for a period |
| Top selling products by quantity and revenue |
| Top customers by spend and order count |
| Stock levels, out-of-stock items, category breakdown |
| Complete order history for a customer |
| Profit margins by product (requires cost data) |
Example Usage
Adding Products
Managing Customers
Creating Orders
Data Analysis
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 confirmationconfirmed- Order confirmed, stock reservedshipped- Order shipped to customerdelivered- Order deliveredcancelled- Order cancelled, stock restored