# Bakery Data MCP Server - Quick Reference
## Setup Commands
```bash
# Activate virtual environment
source venv/bin/activate
# Import CSV data (if needed)
python import_data.py
# Test database queries
python test_queries.py
# Install package in dev mode (if needed)
pip install -e .
```
## Claude Desktop Config Location
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
## Minimal Config
```json
{
"mcpServers": {
"bakery-data": {
"command": "/FULL/PATH/TO/bakery_data_mcp/venv/bin/python",
"args": ["-m", "bakery_data_mcp.server"],
"cwd": "/FULL/PATH/TO/bakery_data_mcp"
}
}
}
```
Replace `/FULL/PATH/TO/` with the actual path.
## Database Stats
- **Transactions**: 602,812
- **Products**: 371
- **Departments**: 14
- **Period**: 2023-01-02 to 2024-12-31
- **Total Sales**: ¥112,907,632
## Top Products by Revenue
1. カットピザ - ¥8,397,690
2. 絹生食パン1斤 - ¥5,908,320
3. ジャンボドーナツ - ¥5,425,800
4. 絹生食パン2斤 - ¥5,079,360
5. あんドーナツ - ¥4,793,740
## Department Sales
1. ブレッド - ¥20,292,510
2. 菓子パン - ¥19,738,530
3. 新製品 - ¥19,158,816
4. ドーナッツ類 - ¥17,760,830
5. 調理パン - ¥14,883,110
## Example Questions for Claude
**Product Analysis**
- "What are the top 20 products by revenue?"
- "Show me products with the '朝食向け' tag"
- "Which products cost more than ¥500?"
**Sales Trends**
- "Show monthly revenue for 2023"
- "What were sales in August 2024?"
- "Compare Q1 vs Q2 2023 sales"
**Department Analysis**
- "What's the revenue breakdown by department?"
- "Which department has the highest average transaction?"
- "Show sales for パイ・デニッシュ department"
**Transaction Queries**
- "Find all transactions over ¥2000"
- "Show credit card transactions in December 2024"
- "What's the average transaction amount?"
**Advanced Analytics**
- "What are the sales patterns by day of week?"
- "Which products are most profitable?"
- "Show payment method distribution"
## MCP Tools Available
1. `query_transactions` - Search transactions
2. `query_products` - Search products
3. `query_departments` - View departments
4. `sales_summary` - Aggregate sales data
5. `top_products` - Best sellers
6. `execute_sql` - Custom queries
7. `get_schema` - Database structure
## Common Product Tags
- 朝食向け (Breakfast)
- 軽食向け (Light meal)
- 甘いパン (Sweet bread)
- フルーツ系 (Fruit-based)
- 和風・あん系 (Japanese/bean paste)
- 食パン系 (Bread loaf)
- チョコレート系 (Chocolate)
- クリーム系 (Cream)
## Payment Methods
- 現金 (Cash) - 82,529 transactions
- 電子マネー (E-money) - 41,232 transactions
- カード (Card) - 13,843 transactions
## Troubleshooting
**Server not connecting?**
- Check paths are absolute
- Verify venv exists
- Check Claude Desktop logs
**Database not found?**
- Ensure `cwd` points to correct directory
- Run `ls bakery_data.db` to verify
**No data returned?**
- Check date formats (YYYY-MM-DD)
- Verify product codes exist
- Use `get_schema` tool to check structure