ecommerce-mcp-chat-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ecommerce-mcp-chat-serverList all products with price above $100"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ecommerce MCP Chat Server Demo with Local LLM
A complete demonstration of connecting a local Large Language Model (LLM) to a NestJS database backend using the Model Context Protocol (MCP). This project allows an AI agent to autonomously execute tools to query a MySQL database in real-time during a chat session.
🚀 Features
NestJS Backend: A modular architecture managing Users, Products, and Orders.
Database Integration: Sequelize ORM connected to a local MySQL database.
MCP Server: Exposes database queries natively to AI agents using
@nestjs-mcp/server.Local AI Agent: A Node.js CLI chat interface powered by the Vercel AI SDK and Ollama (
llama3.1:8b).Agentic Tool Calling: The LLM autonomously decides when to query the database to answer user questions accurately.
Related MCP server: mcp-db-server
đź“‹ Prerequisites
Before you begin, ensure you have the following installed:
Node.js (v24+)
MySQL (Running locally on port 3306)
Ollama (Running locally with the
llama3.1:8bmodel pulled)
Note: To pull the required model, run
ollama pull llama3.1:8bin your terminal.
🛠️ Installation & Setup
Clone the repository and install dependencies:
npm installDatabase Setup: Ensure your local MySQL server is running. Create an empty database named mcp_demo.
CREATE DATABASE my_db;
(Update the database credentials in src/app.module.ts and src/seed.ts if your MySQL username is not root or if you have a password).
Seed the Database: Generate dummy data (50 users, 50 products, and 50 orders) to test the AI's querying capabilities.
npx ts-node src/seed.ts
đź’» Running the Application
This project requires two terminal windows to run simultaneously—one for the NestJS MCP Server, and one for the AI Chat Client.
Terminal 1: Start the NestJS MCP Server Start the backend server so it can expose the database tools via the MCP Streamable HTTP transport.
npm run start(The server runs on http://localhost:3000 with MCP available at /mcp)
Terminal 2: Start the AI Chat Client Start the interactive command-line interface. The client will connect to the NestJS server, discover the tools, and allow you to chat with the local LLM.
npx ts-node src/chat.tsđź’¬ Usage Examples
Once the chat client is running, try asking the agent questions that require database knowledge:
"What products do we have available?"
"Can you give me the details for user ID 5?"
"How many orders are in the system?"
"Check the price of product ID 12 and tell me if it's more than $500."
The LLM will pause, call the appropriate NestJS tool, read the database results, and formulate a natural language response.
đź“‚ Project Structure
src/user/, src/product/, src/order/ - NestJS modules containing Controllers, Services, Models, and MCP Resolvers.
src/chat.ts - The Vercel AI SDK client implementing the conversational loop.
src/seed.ts - Database seeding script.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Let AI agents query data and act across all your business apps via MCP.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
An agent-native database over MCP: shared, validated, structured records in every AI chat.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to query MongoDB databases and project management REST APIs through a universal MCP interface, providing read-time access to workspace data.-
- FlicenseNot gradedqualityBmaintenanceAn MCP server that exposes relational databases (PostgreSQL/MySQL) to AI agents with natural language to SQL query support.19-
- FlicenseNot gradedqualityDmaintenanceNestJS-based MCP server for MySQL with session-level database selection and SQL safety controls. Enables executing SQL queries, listing databases, and connecting MySQL users with configurable safe modes.-
- FlicenseNot gradedqualityDmaintenanceEnables interaction with a PostgreSQL database via MCP, using Docker and NestJS for AI-powered database operations.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pkaran26/ecommerce-mcp-chat-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server