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 nearly identical purposes, with the latter being a superset variant (AI-generated description if missing), so an agent cannot reliably decide which to call. delete_product and get_product_by_id are clearly distinct, but the create pair creates real misselection risk.

Naming Consistency4/5

Names are snake_case verb_noun (add_product, delete_product, get_product_by_id), which is mostly consistent. The '_smart' suffix and '_by_id' qualifier are minor deviations but remain readable and follow the overall pattern.

Tool Count3/5

Four tools is on the thin side for an e-commerce product server. It's borderline rather than extreme, but the surface feels under-scoped given the domain.

Completeness2/5

There is no update operation (price/quantity/description changes) and no list/browse products capability, leaving only create (twice), delete, and get-by-id. These gaps will cause agent failures for common catalog management workflows.

Maintenance

ActivityMaintained
ResponsivenessNo issues