E-commerce MCP Server

E-commerce MCP Server

Enables management of e-commerce operations including products, customers, and orders with full CRUD capabilities, plus data analysis features like sales summaries, top products/customers reports, and inventory tracking.

Category
Visit Server

README

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

Tool Description
add_product Add a new product to inventory
get_product Get product by ID or SKU
list_products List products with filtering (category, stock level)
update_product Update product details
delete_product Soft delete (deactivate) a product
update_stock Add or subtract stock quantity
search_products Search products by name/description

Customer Management

Tool Description
add_customer Add a new customer
get_customer Get customer by ID or email
list_customers List customers with filtering
update_customer Update customer details
delete_customer Soft delete (deactivate) a customer
search_customers Search customers by name/email

Order Management

Tool Description
create_order Create a new order for a customer
add_order_item Add a product to an order
remove_order_item Remove a product from an order
get_order Get order by ID or order number
list_orders List orders with filtering (customer, status, date range)
update_order_status Update order status (pending → confirmed → shipped → delivered)

Data Analysis & Reporting

Tool Description
get_sales_summary Revenue, order count, average order value for a period
get_top_products Top selling products by quantity and revenue
get_top_customers Top customers by spend and order count
get_inventory_report Stock levels, out-of-stock items, category breakdown
get_customer_order_history Complete order history for a customer
get_profit_analysis Profit 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured