home / mcp / mcp e-commerce server

MCP E-commerce Server

Provides a complete MCP server for managing products with CRUD, AI-generated descriptions, and MySQL-backed storage.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "andy5566w-mcp": {
      "command": "npm",
      "args": [
        "run",
        "dev:mcp"
      ]
    }
  }
}

You are provided with a focused MCP server for e-commerce product management. It delivers CRUD operations, AI-powered descriptions, and seamless database integration, enabling you to manage products efficiently, search with pagination, and monitor stock using a dual transport MCP server built in TypeScript with strict validation.

How to use

You run the MCP server locally and connect with an MCP client to perform product management tasks. Start the server using the included npm script, then connect with a client such as Claude Desktop, MCP Inspector, or your Apps SDK. Once connected, you can create, read, update, and delete products, generate AI-powered descriptions, search products by name with pagination, and monitor low stock levels. The server supports both stdio (local) and HTTP/SSE transports, with a TypeScript implementation that uses Zod validation for strict typing.

How to install

Follow these steps to set up the MCP server in your environment. This flow uses the quick start commands provided with the project.

# 1) Install deps
npm i

# 2) Prepare env
cp .env.example .env

# 3) Create schema (optional, run in your MySQL)
# See sql/schema.sql

# 4) Run demo (non-MCP) usage
npm run dev:demo

# 5) Run MCP server (stdio transport)
npm run dev:mcp

Configuration and notes

Configure database and server behavior through environment variables. All database connection parameters are provided via environment variables. You can extend the setup with transactions, pagination, authentication, and other enhancements as needed.

Available tools

CRUD operations

Create, read, update, and delete products to manage the catalog.

AI-powered descriptions

Automatically generate product descriptions using MCP sampling for richer product content.

Database integration

Store and query product data in a MySQL database with a proper schema.

Smart search

Search products by name with pagination to handle large catalogs.

Low stock monitoring

Track inventory levels to identify products that need restocking.

Dual transport support

Support for both stdio and HTTP/SSE transports for MCP clients.

TypeScript with Zod validation

Fully typed with validation to ensure data integrity.

MCP resources

Include product catalog and low-stock resources as MCP endpoints.

MCP prompts

Pre-built prompt templates to drive AI-powered descriptions and actions.