Skip to main content
Glama
E-commerce MCP Server

E-commerce MCP Server

by preetash88

MCP E-commerce Server

A comprehensive Model Context Protocol (MCP) server for e-commerce product management with CRUD operations, AI-powered descriptions, and database integration.

Features

  • 🛍️ Complete CRUD Operations - Create, read, update, delete products

  • 🤖 AI-Powered Descriptions - Automatic product description generation using MCP sampling

  • 📊 Database Integration - MySQL database with proper schema

  • 🔍 Smart Search - Search products by name with pagination

  • 📦 Low Stock Monitoring - Resource for tracking inventory levels

  • 🌐 Dual Transport Support - Both stdio and HTTP/SSE transports

  • 🔧 TypeScript - Fully typed with Zod validation

  • 📋 MCP Resources - Product catalog and low-stock resources

  • 🎯 MCP Prompts - Pre-built prompt templates

Related MCP server: MCP E-commerce Server

Quick start

# 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

The MCP server prints nothing special; it waits on stdio for a client like Claude Desktop / MCP Inspector / Apps SDK to connect.

Notes

  • This is intentionally minimal and tutorial‑friendly.

  • All database params come from environment variables.

  • You can extend with transactions, pagination, auth, etc.

#package.json npm link

npm login npm publish --access public

Available Tools

5 tools
add_productAdd ProductC

Create a new product with sku, name, description(optional but better to have), price, and quantity.

Inputs: sku (required), name (required), price (required), quantity (required), +1 more. Returns: id, sku, name, price, +4 more

add_product_smartlyAdd Product SmartlyC

Create a new product with sku, name, description(optional), price, and quantity. Since description is optional, is description is missing, use smart AI generated description if missing. This tool also checks for existing products with the same SKU to prevent duplicates.

Inputs: sku (required), name (required), price (required), quantity (required), +1 more. Returns: id, sku, name, price, +4 more

delete_productDelete a Product by IDB

Delete a product using its unique ID(number). Returns true if deletion was successful, false otherwise.

Inputs: id (required). Returns: success

get_product_by_idGet a Product by IDA

Fetch a product's details using its unique ID(number).

Inputs: id (required). Returns: id, sku, name, price, +4 more

update_productUpdate ProductB

Update an existing product by providing correct id(mandatory) as input along with with sku(optional), name(optional), description(optional but better to have), price(optional), and quantity(optional).

Inputs: id (required), sku, name, price, +2 more. Returns: id, sku, name, price, +4 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 5 tools

    Disambiguation3/5

    add_product and add_product_smartly overlap significantly, both creating products with the same parameters, though add_product_smartly adds AI description generation and duplicate checking. The other tools are distinct CRUD operations, so the main ambiguity is between the two creation tools.

    Naming Consistency4/5

    Most tools follow a verb_noun pattern (add_product, get_product_by_id, delete_product, update_product), but add_product_smartly breaks the convention with an adverb suffix. The naming is mostly consistent but the smartly variant is a deviation.

    Tool Count4/5

    Five tools is a reasonable count for a simple product CRUD server. The add_product_smartly tool is somewhat redundant, making the count feel slightly padded, but it's still within an appropriate range.

    Completeness4/5

    The server covers the core CRUD lifecycle for products: create, read, update, delete. A list/search products tool is missing, which is a notable gap for an e-commerce server, but the essential operations are present.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers