Skip to main content
Glama
README.md
# 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


## Quick start
```bash
# 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

TDQS

B3.2/5.0

Scored across 4 tools

Disambiguation2/5

add_product and add_product_smart have heavily overlapping purposes—both create a product, differing only in whether a description is AI-generated. An agent could easily pick the wrong one, and there is no guidance on when to prefer the 'smart' variant.

Naming Consistency4/5

All names are snake_case with a verb-first pattern (add_*, get_*, delete_*), which is mostly predictable. Minor deviations exist: the 'smart' suffix and 'by_id' qualifier break the strict verb_noun mold but remain readable.

Tool Count3/5

Four tools is on the thin side for an e-commerce domain and the set is dominated by creation variants. It's not egregiously small, but it feels under-scoped given the domain.

Completeness2/5

The surface covers create (twice), read-by-id, and delete, but lacks update and any list/search operation—core operations for managing a product catalog. Agents will hit dead ends when they need to modify or enumerate products.