- Home
- MCP servers
- Ecom
Ecom
- javascript
1
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"preetash88-custom-ecommerce-mcp": {
"command": "npm",
"args": [
"run",
"dev:mcp"
]
}
}
}You are building and using an MCP server for e-commerce product management. This server provides complete CRUD operations, AI-generated descriptions, and MySQL integration, all accessible via both stdio and HTTP/SSE transports. It is designed to be practical and beginner-friendly while remaining fully typed with validation for reliability.
How to use
Connect to the MCP server using your MCP client via stdio. You can start the server locally and then interact with it to create, read, update, and delete products, generate AI-powered descriptions, and perform smart searches with pagination. The server also monitors stock levels and exposes endpoints and resources for product catalog and low-stock tracking.
How to install
Prerequisites: ensure you have Node.js installed on your machine. This project uses npm for package management.
Step by step install and run flow:
- Install dependencies on your machine.
npm i
- Prepare environment configuration by creating a local environment file.
cp .env.example .env
- Optionally create your MySQL schema (execute the SQL in sql/schema.sql on your database).
# See sql/schema.sql
- Run the demo usage (non-MCP) to explore capabilities.
npm run dev:demo
- Start the MCP server using the stdio transport.
npm run dev:mcp
The server will wait for a client to connect over stdio, enabling you to exercise all MCP features.
Configuration and notes
All database connection parameters come from environment variables you provide in your local environment. You can extend the setup later with features like transactions, pagination, and authentication if needed.
If you want to customize prompts or prompts templates for AI-generated descriptions, you can modify the pre-built MCP prompts used by the server.
This setup is intentionally minimal and tutorial-friendly to help you get started quickly with practical usage.
Available tools
create_product
Create a new product in the catalog with all required fields and defaults.
read_product
Retrieve a product’s details by its identifier.
update_product
Update product fields and metadata in the catalog.
delete_product
Remove a product from the catalog.
generate_description
Generate AI-powered product descriptions using MCP sampling.
search_products
Search products by name with pagination support.
monitor_low_stock
Track inventory levels and flag low-stock products.
transport_stdio_http
Expose the server via both stdio and HTTP/SSE transports for MCP clients.
type_validation
Fully typed input/output with Zod validation to ensure data integrity.