- Home
- MCP servers
- MCP E-commerce Server
MCP E-commerce Server
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 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": {
"vanushya-mcp-example": {
"command": "npm",
"args": [
"run",
"dev:mcp"
],
"env": {
"DB_HOST": "YOUR_DB_HOST",
"DB_NAME": "YOUR_DB_NAME",
"DB_USER": "YOUR_DB_USER",
"DB_PASSWORD": "YOUR_DB_PASSWORD"
}
}
}
}You run an MCP E-commerce Server to manage products with CRUD, AI-generated descriptions, and MySQL-backed storage. It supports both stdio and HTTP transports, so you can connect from MCP clients or tools that speak the MCP protocol, making it easier to integrate product data, descriptions, and stock monitoring into your applications.
How to use
To operate the MCP E-commerce Server, start it in stdio mode and connect your MCP client (such as Claude Desktop, MCP Inspector, or an Apps SDK). The server will wait for a client to connect over stdio and then provide product management capabilities, including create/read/update/delete operations, AI-powered descriptions, and smart inventory checks.
How to install
# 1) Install dependencies
npm i
# 2) Prepare environment
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 usage tips
Environment variables drive the database connection and server behavior. You will typically provide MySQL connection details (host, user, password, database), along with any application-specific settings your deployment requires. Use a copy of the example environment file as a starting point and customize values for your environment.
Tools and capabilities you can leverage
This server exposes a practical set of capabilities you can invoke through MCP clients. Key tools include:
- Create, Read, Update, Delete products (CRUD) - AI-powered descriptions for products - Smart search by name with pagination - Low stock monitoring - MySQL-backed data store with a defined schema - MCP prompts and templates to guide interactions
Troubleshooting
If the server prints nothing special and simply waits for a client, ensure you are connecting with a compatible MCP client over stdio. Verify that you have run the correct start command and that your environment variables point to a reachable MySQL instance. If you need to reset the environment, re-copy the example env file and adjust values as needed.
Available tools
createProduct
Create a new product with name, price, stock, and optional metadata.
readProduct
Fetch a product by its identifier to view details.
updateProduct
Update product fields such as name, price, stock, or description.
deleteProduct
Remove a product from the catalog.
searchProducts
Search products by name with support for pagination and result limits.
generateDescription
Generate AI-powered descriptions for a product using MCP prompts.
monitorLowStock
Track inventory levels and alert when stock falls below a threshold.