# Setting Up Inventory MCP Server with Claude Desktop
This guide will help you connect your inventory management system to Claude Desktop so you can track inventory directly in Claude.
## Prerequisites
- Claude Desktop installed on your computer
- Python 3.11+ with dependencies installed
- Inventory MCP server files ready
## Step 1: Locate Claude Desktop Configuration
The MCP configuration file location depends on your operating system:
### Windows
```
%APPDATA%\Claude\claude_desktop_config.json
```
Full path example:
```
C:\Users\YourUsername\AppData\Roaming\Claude\claude_desktop_config.json
```
### macOS
```
~/Library/Application Support/Claude/claude_desktop_config.json
```
### Linux
```
~/.config/Claude/claude_desktop_config.json
```
## Step 2: Open or Create Configuration File
1. Open the configuration file in a text editor (create it if it doesn't exist)
2. The file should be in JSON format
## Step 3: Add Inventory MCP Server Configuration
Add your inventory MCP server to the configuration. The file should look like this:
```json
{
"mcpServers": {
"inventory-mcp": {
"command": "python",
"args": [
"C:\\Users\\aditi\\Downloads\\inventory-mcp-server-master\\inventory-mcp-server.py"
],
"env": {
"SUPABASE_DB_PASSWORD": "root"
}
}
}
}
```
**Important Notes:**
- **Windows paths**: Use double backslashes (`\\`) or forward slashes (`/`)
- **Update the path**: Make sure the path points to your `inventory-mcp-server.py` file
- **Environment variables**: Adjust `SUPABASE_DB_PASSWORD` if your password is different
### Example with multiple MCP servers:
If you already have other MCP servers configured, add the inventory server to the existing configuration:
```json
{
"mcpServers": {
"existing-server": {
...
},
"inventory-mcp": {
"command": "python",
"args": [
"C:\\Users\\aditi\\Downloads\\inventory-mcp-server-master\\inventory-mcp-server.py"
],
"env": {
"SUPABASE_DB_PASSWORD": "root"
}
}
}
}
```
## Step 4: Verify Python Path
Make sure Claude Desktop can find Python. You can:
1. Use the full path to Python in the `command` field:
```json
"command": "C:\\Users\\aditi\\Anaconda3\\python.exe"
```
2. Or ensure Python is in your system PATH
To find your Python path:
```bash
where python
```
## Step 5: Restart Claude Desktop
After saving the configuration file:
1. **Close Claude Desktop completely**
2. **Reopen Claude Desktop**
3. The MCP server should start automatically
## Step 6: Verify Connection
Once Claude Desktop is running:
1. Look for the inventory tools in Claude
2. Try asking Claude: "List all inventory items"
3. Or: "Check stock for item LAP-001 at Bengaluru"
Claude should be able to use these tools:
- `add_inventory` - Add or update inventory items
- `remove_inventory` - Remove items from inventory
- `check_stock` - Check stock for a specific item at a location
- `list_inventory` - List all inventory items
## Troubleshooting
### MCP Server Not Starting
1. **Check the path**: Ensure the path to `inventory-mcp-server.py` is correct
2. **Check Python**: Verify Python can run the script:
```bash
python "C:\Users\aditi\Downloads\inventory-mcp-server-master\inventory-mcp-server.py"
```
3. **Check logs**: Look for error messages in Claude Desktop logs
### Database Connection Errors
1. **Verify database password**: Check `SUPABASE_DB_PASSWORD` in the config
2. **Test connection**: Run `python test_connection.py` to verify database access
3. **Check Supabase**: Ensure your Supabase project is active
### Tools Not Appearing
1. **Restart Claude Desktop**: Fully close and reopen
2. **Check JSON syntax**: Ensure the configuration file has valid JSON
3. **Verify dependencies**: Run `pip install fastmcp psycopg2-binary`
## Testing the Connection
After setup, try these commands in Claude:
1. **List all inventory**:
"Show me all inventory items"
2. **Check specific stock**:
"What's the stock level for LAP-001 at Bengaluru?"
3. **Add inventory**:
"Add 5 units of Test Product (TEST-001) at Mumbai"
4. **View by location**:
"Show me all items at Bengaluru"
## Available Tools
Once connected, Claude will have access to:
| Tool | Description | Example Usage |
|------|-------------|---------------|
| `list_inventory` | Get all inventory items | "List all inventory" |
| `check_stock` | Check stock for item at location | "Check stock for LAP-001 at Bengaluru" |
| `add_inventory` | Add/update inventory | "Add 10 laptops to Mumbai" |
| `remove_inventory` | Remove items | "Remove 5 units of LAP-001 from Mumbai" |
## Security Note
⚠️ **Important**: The configuration file contains your database password. Make sure to:
- Keep this file secure
- Don't share it publicly
- Consider using environment variables for sensitive data