Skip to main content
Glama
pborlagdan

Inventory Tracker MCP Server

by pborlagdan
README.md
# šŸ“¦ Inventory Tracker MCP Server

A Model Context Protocol (MCP) server that lets Claude AI manage
a real PostgreSQL inventory database using natural language.

## šŸ› ļø Tech Stack
- Python 3.11
- MCP (Model Context Protocol) by Anthropic
- PostgreSQL
- psycopg2
- python-dotenv

## ✨ Features
- Add new items or restock existing ones
- Sell/remove stock with automatic low stock warnings
- View full inventory grouped by category
- Check items running low on stock
- View full activity history log
- Delete items permanently

## šŸš€ How It Works
Claude Desktop connects to this MCP server and uses natural
language to manage inventory in a real PostgreSQL database.

Example prompts:
- "Add 50 units of Coffee at $12.50 in category Food"
- "List my inventory"
- "Check low stock"
- "Show my activity history"

## āš™ļø Setup

### 1. Install dependencies
pip install -r requirements.txt

### 2. Create .env file
DB_HOST=localhost
DB_PORT=5432
DB_NAME=inventory_db
DB_USER=your_user
DB_PASSWORD=your_password

### 3. Run the server
python server.py

### 4. Connect to Claude Desktop
Add to claude_desktop_config.json:
{
  "mcpServers": {
    "inventory-tracker-pro": {
      "command": "python",
      "args": ["/path/to/server.py"]
    }
  }
}

## šŸ“ Project Structure
inventory-mcp-pg/
ā”œā”€ā”€ server.py          # Main MCP server
ā”œā”€ā”€ requirements.txt   # Dependencies
ā”œā”€ā”€ .env               # Database credentials (not uploaded)
└── README.md          # This file