Employs Docker containerization for running the MCP server and PostgreSQL database, allowing for easy deployment and management of the product inventory system.
Features an Ollama bridge that enables natural language processing with LLM-based query parsing, supports multiple models (qwen2.5, llama3.2, llama3.1), and provides direct database connection for advanced filtering through a conversational interface.
Integrates with Perplexity Desktop/API for research queries, business intelligence, and data exploration through a local MCP server configuration that supports analyzing product inventory distributions and pricing patterns.
Uses PostgreSQL as the database backend to store and query 9,739 products with full-text search capabilities and advanced indexes for efficient data retrieval and filtering.
ποΈ MCP Product Management System
A comprehensive Model Context Protocol (MCP) server for product inventory management with PostgreSQL database backend, Docker containerization, and multiple AI platform integrations.
π― System Overview
This system provides a sophisticated product management platform with:
9,739 products across multiple categories
9 advanced MCP tools with Django-style filtering
PostgreSQL database with Docker containerization
Multi-platform AI integration (Claude Desktop, Ollama, Perplexity)
Advanced filtering & pagination capabilities
Natural language query processing
ποΈ Architecture
π οΈ Setup & Installation
Prerequisites
Docker & Docker Compose
Python 3.10+ (required for MCP library)
Node.js (for MCP Inspector)
Ollama (optional, for Ollama integration)
π Python Version Check
1. Clone & Setup
2. Start Docker Services
3. Import Product Data
4. Test System
π§ Available MCP Tools
Core Tools
get_product
- Get detailed product information by SKUlist_products
- List products with optional category filteringsearch_products
- Basic search across product fieldsadvanced_search_products
- Comprehensive search with filteringupdate_stock
- Update product stock levels
Advanced Tools
filter_products
- Django-style filtering with paginationField lookups:
category__icontains
,stock__gte
,price__lte
, etc.Sorting:
["-stock", "title"]
Pagination:
page
,page_size
get_categories
- List all product categories and subcategoriesget_low_stock_products
- Find products with low inventoryget_filter_stats
- Get filtering statistics and breakdowns
Django-Style Filter Examples
π₯οΈ Platform Integration
1. MCP Inspector (Testing & Development)
Setup & Run
Usage
URL: Opens automatically in browser (usually
http://localhost:5173
)Features: Test all 9 tools, view JSON schemas, debug responses
Best for: Development, testing, debugging MCP tools
2. Claude Desktop Integration
Setup Configuration
Locate Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add MCP server configuration:
Make shell script executable:
Usage
Restart Claude Desktop after config changes
Natural language queries: "Show me blue shirts under $20 with good stock"
Complex filtering: "Find size XL products sorted by price"
Business queries: "What are our top categories by inventory?"
Example Queries
"Give me details of SKU 120715"
"Show products with more than 1000 units in stock"
"What black items do we have from Gildan warehouse?"
"Filter polo shirts with prices between $15 and $30"
3. Ollama Integration
Setup Ollama
Run Ollama Bridge
Features
Model selection at startup
Natural language processing with LLM-based query parsing
Advanced filtering through conversational interface
Statistics commands:
stats
,examples
,models
Usage Example
4. Perplexity Local Integration
Setup
Install Perplexity Desktop or use Perplexity API
Configure MCP connection in Perplexity settings
Add server endpoint:
Usage
Research queries: "Analyze our product inventory distribution"
Business intelligence: "What's our stock situation across categories?"
Data exploration: "Show me patterns in our product pricing"
π Usage Workflows
Development Workflow
Start Docker:
docker-compose up -d
Test with Inspector:
npx @modelcontextprotocol/inspector python local_mcp_server.py
Debug tools, test filters, verify responses
Deploy to AI platforms
Production Workflow
Docker services running:
docker-compose up -d
Claude Desktop configured with shell script
Ollama bridge available for advanced NLP
Multiple access points for different use cases
Business User Workflow
Open Claude Desktop
Ask natural language questions:
"What's our inventory status?"
"Show me slow-moving products"
"Find products that need restocking"
Get instant, detailed responses
π Sample Questions & Use Cases
Basic Queries
"Give me details of product SKU 120715"
"List all T-shirt categories we have"
"Show me products with low stock"
Advanced Filtering
"Show blue shirts under $20 with good stock levels"
"Find size XL products sorted by price ascending"
"What black items do we have from Gildan warehouse?"
Business Intelligence
"What are our top 5 categories by product count?"
"Show me inventory distribution across warehouses"
"Which products have the highest stock levels?"
Inventory Management
"Products with more than 1000 units in stock"
"Show items that are running low on inventory"
"What's our most expensive product in each category?"
Complex Analysis
"Filter polo shirts with prices between $15 and $30"
"Show me all products from Hanes with sizes L and XL"
"Find products with zero stock sorted by category"
π§ͺ Testing
Run Test Suite
Test Individual Components
Verification Checklist
β Docker services running (
docker-compose ps
)β Database populated (9,739 products)
β MCP tools functional (test.py passes)
β Claude Desktop integration working
β Ollama models available
π File Structure
β οΈ Troubleshooting
Common Issues
1. Database Connection Failed
2. Python Version Error (MCP requires Python 3.10+)
3. MCP Server Not Starting
4. Claude Desktop Not Connecting
Verify config file path
Check shell script permissions:
chmod +x run_mcp_server.sh
Restart Claude Desktop after config changes
5. Ollama Models Not Found
π Advanced Features
Django-Style Filtering
Field lookups:
__icontains
,__exact
,__gte
,__lte
,__in
Pagination: Automatic with page/page_size
Sorting: Multi-field with direction control
Global search: Across all text fields
Natural Language Processing
LLM-powered query parsing in Ollama bridge
Intent classification for optimal tool selection
Fallback strategies for complex queries
Context-aware responses
Performance Optimizations
Database indexes on key fields
Connection pooling for high-load scenarios
Query optimization for large datasets
Efficient pagination with offset/limit
π Statistics
Total Products: 9,739
Categories: 15+ major categories
MCP Tools: 9 advanced tools
Database: PostgreSQL 16
Docker Services: 2 containers
AI Platforms: 4 integrations
Filter Options: 16 Django-style filters
Status: β FULLY OPERATIONAL
π― Next Steps
Explore Sample Questions: Check
sample_questions.txt
for 25 comprehensive examplesCustomize Tools: Modify MCP tools for your specific needs
Scale Database: Add more products or customize schema
Extend AI Integration: Add more AI platforms or models
Build Applications: Use MCP protocol for custom applications
π Your MCP Product Management System is ready for production use!
Last updated: August 2025 System tested and verified across all platforms
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A comprehensive Model Context Protocol (MCP) server for product inventory management with PostgreSQL database backend, enabling natural language queries for product information across multiple AI platforms.
- π― System Overview
- ποΈ Architecture
- π οΈ Setup & Installation
- π§ Available MCP Tools
- π₯οΈ Platform Integration
- 1. MCP Inspector (Testing & Development)
- 2. Claude Desktop Integration
- 3. Ollama Integration
- 4. Perplexity Local Integration
- π Usage Workflows
- π Sample Questions & Use Cases
- π§ͺ Testing
- π File Structure
- β οΈ Troubleshooting
- π Advanced Features
- π Statistics
- π― Next Steps
Related MCP Servers
- AsecurityAlicenseAqualityA powerful Model Context Protocol (MCP) tool for exploring and managing different types of databases including PostgreSQL, MySQL, and Firestore.Last updated -95MIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) server that enables AI assistants to interact with MySQL databases by executing SQL queries and checking database connectivity.Last updated -MIT License
- AsecurityFlicenseAqualityAn all-in-one Model Context Protocol (MCP) server that connects your coding AI to numerous databases, data warehouses, data pipelines, and cloud services, streamlining development workflow through seamless integrations.Last updated -3
- -securityFlicense-qualityA Model Context Protocol server implementation that provides a simple interface to interact with PostgreSQL databases, enabling SQL queries, database operations, and schema management through MCP.Last updated -