PlanWise MCP
Provides sales and demand planning tools that query a MongoDB dataset for sales summaries, top products, inventory status, stockout risk, and replenishment recommendations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
PlanWise MCP
AI-powered sales & demand planning tools exposed through the Model Context Protocol (MCP).
Connect PlanWise to any MCP-compatible client, then ask natural-language questions about sales, inventory, stockout risk, and replenishment. The server runs predefined tools against a MongoDB dataset and returns structured JSON.
Features
5 MCP tools for sales analytics, inventory status, stockout risk, and replenishment
Modular backend: tools → services → repositories → MongoDB
Zod input validation on every tool
Demand planning with weighted moving average forecasting (TypeScript)
Synthetic dataset: ~30 products, 100 customers, 12 months of sales, inventory + movements
Docker Compose for local MongoDB
stdio transport for local demos (no cloud hosting required)
Related MCP server: SupplyChainMCP
Tech stack
Area | Technology |
Runtime | Node.js, TypeScript |
Protocol | Model Context Protocol ( |
Database | MongoDB 7, Mongoose |
Validation | Zod |
Containers | Docker, Docker Compose |
Testing | Vitest |
Architecture
MCP-compatible AI client
│ MCP over stdio
▼
MCP server (tool registry + Zod validation)
▼
services (sales / inventory / planning)
▼
repositories (Mongo aggregations)
▼
MongoDB (products, customers, sales, inventory, movements)MCP tools
Tool | Description |
| Revenue, units, order stats for a date range |
| Top products by revenue or quantity |
| On-hand, reserved, available, reorder thresholds |
| Products likely to run out within N days |
| Suggested reorder qty using WMA forecast + safety stock |
Full input/output contracts: docs/TOOL_CONTRACTS.md
Quick start
Prerequisites
Node.js 20+
Docker Desktop
Git
1. Clone & install
git clone https://github.com/kshitijkhamitkar/planwise-mcp.git
cd planwise-mcp
cp .env.example .env
npm install2. Start MongoDB
docker compose up -d mongo3. Seed synthetic data
npm run seed4. Smoke-test tools (without MCP)
npm run smoke
npm test5. Run the MCP server
npm run devConnect an MCP client
Add a stdio MCP server entry that runs this project. Example:
{
"mcpServers": {
"planwise": {
"command": "npx",
"args": [
"tsx",
"--env-file=/absolute/path/to/planwise-mcp/.env",
"/absolute/path/to/planwise-mcp/src/index.ts"
],
"env": {
"MONGODB_URI": "mongodb://127.0.0.1:27017/planwise",
"MCP_TRANSPORT": "stdio"
}
}
}
}Update the absolute paths for your machine. Keep Docker/Mongo running, then try prompts such as:
“Which products are at stockout risk in the next 14 days?”
“Recommend replenishment for P-014 for 30 days.”
“Summarize sales for October 2026.”
More examples: configs/
MCP Inspector
npx @modelcontextprotocol/inspector npx tsx --env-file=.env src/index.tsProject structure
planwise-mcp/
├── configs/ # Example MCP client configs
├── docs/TOOL_CONTRACTS.md # Tool I/O contracts
├── scripts/
│ ├── seedDatabase.ts # Synthetic data generator
│ └── smokeTools.ts # Direct service smoke test
├── src/
│ ├── config/ # Env + Mongo connection
│ ├── models/ # Mongoose schemas
│ ├── repositories/ # DB queries
│ ├── services/ # Business logic
│ ├── tools/ # Zod schemas / tool names
│ ├── mcp/ # MCP server + stdio
│ ├── utils/ # Dates, forecast math, errors
│ └── index.ts
├── tests/
├── docker-compose.yml
└── package.jsonScripts
Command | Description |
| Seed MongoDB |
| Call all 5 tools via services |
| Start MCP server (stdio) |
| Run Vitest unit tests |
| Compile TypeScript |
Design notes
Tools call services, not the database directly.
Money is stored/returned in paise (INR × 100).
Dates use
YYYY-MM-DDin UTC.Forecasting uses a weighted moving average so the focus stays on MCP tool design.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Demand forecasts, reorder points, order quantities and inventory health for Shopify stores.
AI inventory management: stock, Demand ESP reorder recommendations and purchase orders.
MerchantFlow is a hosted, read-only ecommerce analytics MCP server for Shopify and WooCommerce. It gives AI assistants tenant-scoped access to revenue, profit and loss, product and SKU profitability, COGS coverage, fulfillment costs, advertising spend, ROAS, marketing performance, cohorts, LTV, and business valuation across connected commerce and marketing platforms. Connect with OAuth over Streamable HTTP. No local server installation is required.
Hosted MCP for e-commerce: live product catalog, stock, and pricing for AI agents.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables store operations including inventory and sales queries and automated replenishment ordering through natural language.3-
- FlicenseNot gradedqualityBmaintenanceEnterprise-grade MCP server for intelligent supply chain analytics, enabling managers to investigate forecast accuracy, vendor performance, demand trends, and root causes using natural language.-
- FlicenseNot gradedqualityDmaintenanceProvides Shopify demand forecasting, reorder recommendations, and dollar-impact reports as MCP tools.-
- AlicenseNot gradedqualityAmaintenanceEnables natural-language queries of retail sell-through, inventory coverage, out-of-stock risk, and reorder suggestions from POS and warehouse data, with an optional agent that emails reorder proposals.127 npmMIT