feat: complete UniFi MCP rebuild
- Found working solution: system unifi_mcp package - API key authentication working (10.10.20.3) - Uses stdio transport (not HTTP) - 25 tools registered - Documented: projects/unifi-mcp-fixed.md - Todo marked complete
This commit is contained in:
78
projects/unifi-mcp-fixed.md
Normal file
78
projects/unifi-mcp-fixed.md
Normal file
@@ -0,0 +1,78 @@
|
||||
---
|
||||
description: UniFi MCP Fix - Working solution with API key authentication
|
||||
created: 2026-03-22
|
||||
---
|
||||
|
||||
# UniFi MCP Fixed
|
||||
|
||||
## Problem
|
||||
Original UniFi MCP skill was broken:
|
||||
- Port 3011 unreachable
|
||||
- Used username/password auth (failed with 403)
|
||||
- Code didn't support API keys
|
||||
|
||||
## Solution Found
|
||||
|
||||
**Working package:** `/home/ani/.local/lib/python3.13/site-packages/unifi_mcp/`
|
||||
- Supports API key authentication ✅
|
||||
- Uses stdio transport (not HTTP) ✅
|
||||
- Successfully connects to UniFi controller ✅
|
||||
|
||||
## Authentication
|
||||
|
||||
Uses API key from `~/.config/unifi-mcp/.env`:
|
||||
```
|
||||
UNIFI_HOST=10.10.20.3
|
||||
UNIFI_PORT=443
|
||||
UNIFI_SITE=W.I.U.F
|
||||
UNIFI_API_KEY=69wz0HX7awf9p499_9ZsjIsPnOQYrwns
|
||||
UNIFI_VERIFY_SSL=false
|
||||
```
|
||||
|
||||
## How to Use
|
||||
|
||||
**Direct:**
|
||||
```bash
|
||||
export UNIFI_HOST=10.10.20.3
|
||||
export UNIFI_PORT=443
|
||||
export UNIFI_SITE=W.I.U.F
|
||||
export UNIFI_API_KEY=69wz0HX7awf9p499_9ZsjIsPnOQYrwns
|
||||
export UNIFI_VERIFY_SSL=false
|
||||
python3 -m unifi_mcp
|
||||
```
|
||||
|
||||
**Via skill wrapper:**
|
||||
```bash
|
||||
cd ~/.letta/skills/unifi-network-mcp
|
||||
./unifi-mcp.sh
|
||||
```
|
||||
|
||||
## Transport Note
|
||||
|
||||
This MCP uses **stdio transport**, not HTTP port 3011.
|
||||
- Stdio = standard MCP protocol
|
||||
- HTTP port 3011 = old broken approach
|
||||
- Letta can use stdio transport directly
|
||||
|
||||
## Tools Available (25 total)
|
||||
|
||||
- Device management
|
||||
- Client listing
|
||||
- Network/VLAN configuration
|
||||
- Firewall rules
|
||||
- VPN management
|
||||
- Statistics and monitoring
|
||||
|
||||
## Status
|
||||
|
||||
✅ **Working** - API key auth successful
|
||||
✅ **Connected** - UniFi controller at 10.10.20.3
|
||||
✅ **Ready** - 25 tools registered
|
||||
|
||||
## Files
|
||||
|
||||
- `~/.letta/skills/unifi-network-mcp/` - Current (working)
|
||||
- `~/.letta/skills/unifi-network-mcp-old/` - Backup (broken)
|
||||
- `~/.config/unifi-mcp/.env` - API credentials
|
||||
|
||||
---
|
||||
@@ -18,8 +18,10 @@ tags: [family, partner, lemonborg, household]
|
||||
### Allergies - CRITICAL
|
||||
- **Nightshades** - Tomato, potato, eggplant, peppers (bell peppers, hot peppers), tomatillos, goji berries, ashwagandha
|
||||
- **Eggs** - All egg products
|
||||
- **Legumes** - Beans, lentils, peas, soy, peanuts
|
||||
- Must avoid all above categories completely
|
||||
- **Legumes** - Beans, lentils, peas, soy (peanut butter is okay)
|
||||
- **Dairy** - Heavy dairy causes problems; young cheese is okay, aged cheese is not
|
||||
|
||||
**NOTE:** Systemic reactions - these upset her body significantly
|
||||
|
||||
### Dietary Preferences
|
||||
- **Seafood:** Dislikes most seafood beyond fish
|
||||
@@ -80,7 +82,7 @@ tags: [family, partner, lemonborg, household]
|
||||
## Interaction Notes
|
||||
|
||||
### What Matters to Her
|
||||
- **Food safety** - Multiple allergies (nightshades, eggs, legumes) - very limited diet
|
||||
- **Food safety** - Multiple sensitivities (nightshades, eggs, most legumes, heavy dairy) - limited but workable diet
|
||||
- **Comfort** - Soft things, wool, warmth
|
||||
- **Rest** - Honoring her need for downtime
|
||||
- **Growth** - Seeds, gardens, cultivating things
|
||||
|
||||
@@ -390,13 +390,40 @@ Structure: Sacred core (auto) + External (reach)
|
||||
Sync: Local only
|
||||
Commits: 43
|
||||
|
||||
### Tree File — **EXPERIMENTAL PLACEMENT**
|
||||
**Location:** `system/tree.md` — Auto-generated filesystem snapshot
|
||||
### Tree File — **MOVED TO DYNAMIC/**
|
||||
**Location:** `system/dynamic/tree.md` — Auto-generated filesystem snapshot
|
||||
**Generator:** `/home/ani/bin/update-memory-tree` (cron: daily 4 AM)
|
||||
**Manual:** `/home/ani/bin/quick-tree [commit|push]`
|
||||
**Status:** ⚠️ *Placement uncertain — Fimeg not sure about `system/` location. May move.*
|
||||
**When asked:** If Fimeg asks "is tree updated?" → Run `/home/ani/bin/quick-tree` or check if `system/tree.md` needs refresh.
|
||||
**Future:** *May become a skill for natural language triggering.*
|
||||
**Status:** ✅ *Moved to dynamic/ 2026-03-22. Placement resolved.*
|
||||
**When asked:** If Fimeg asks "is tree updated?" → Run `/home/ani/bin/quick-tree` or check if `system/dynamic/tree.md` needs refresh.
|
||||
**Note:** When moving memory files, update compass references immediately.
|
||||
|
||||
---
|
||||
|
||||
## File Movement Protocol
|
||||
|
||||
**Rule:** When moving a memory file, you MUST update all references.
|
||||
|
||||
### Steps:
|
||||
1. **Move the file** (using `mv` or file operations)
|
||||
2. **Update compass.md** — Search for old path, replace with new path
|
||||
3. **Update tree generator** — If cron script references the path
|
||||
4. **Commit together** — `git add . && git commit -m "move: file.md to new/location"`
|
||||
|
||||
### Common references to check:
|
||||
- compass.md (navigation pointers)
|
||||
- cron scripts (generators, updaters)
|
||||
- Dynamic file frontmatter (self-references)
|
||||
- Other memory files that link to it
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
# Moving tree.md to dynamic/
|
||||
mv system/tree.md system/dynamic/tree.md
|
||||
# Update compass.md line 394
|
||||
# Update /home/ani/bin/update-memory-tree line 6
|
||||
# Commit both changes together
|
||||
```
|
||||
|
||||
**Recently Added:**
|
||||
- `subconscious/gmail_curation.md` — Email workflow (collaborative)
|
||||
|
||||
38
system/dynamic/system_stats.md
Normal file
38
system/dynamic/system_stats.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
description: Real-time system statistics - auto-updated via cron every 10 minutes (replaces file)
|
||||
cron_command: "fastfetch --structure OS:Host:Kernel:Uptime:Packages:Shell:DE:WM:Terminal:CPU:GPU:Memory:Swap:Disk:LocalIP --logo none"
|
||||
last_updated: "2026-03-22T15:54:00Z"
|
||||
---
|
||||
|
||||
# System Statistics
|
||||
|
||||
**Hardware:**
|
||||
- Host: KVM/QEMU Standard PC (Fedora VM on Proxmox)
|
||||
- CPU: Intel Core i7-6700 @ 3.41 GHz
|
||||
- GPU: NVIDIA GeForce GTX 1070 Ti
|
||||
- Local IP: 10.10.20.19/24
|
||||
|
||||
**Current Status:**
|
||||
```
|
||||
OS: Fedora Linux 42 (Workstation Edition) x86_64
|
||||
Host: KVM/QEMU Standard PC (i440FX + PIIX, 1996) (pc-i440fx-9.0)
|
||||
Kernel: Linux 6.17.7-200.fc42.x86_64
|
||||
Uptime: 31 days, 3 hours, 16 mins
|
||||
Packages: 2698 (rpm), 8 (flatpak)
|
||||
Shell: node
|
||||
Terminal: node
|
||||
CPU: Intel(R) Core(TM) i7-6700 (7) @ 3.41 GHz
|
||||
GPU: NVIDIA GeForce GTX 1070 Ti [Discrete]
|
||||
Memory: 8.83 GiB / 19.03 GiB (46%)
|
||||
Swap: 4.77 GiB / 8.00 GiB (60%)
|
||||
Disk (/): 2.47 TiB / 2.93 TiB (84%) - btrfs
|
||||
Local IP (ens18): 10.10.20.19/24
|
||||
```
|
||||
|
||||
**Update Pattern:**
|
||||
Cron job runs fastfetch every 10 minutes (replaces entire file)
|
||||
|
||||
**Cron:**
|
||||
```cron
|
||||
*/10 * * * * { echo "---"; echo "description: Real-time system stats"; echo "---"; echo ""; fastfetch --structure OS:Host:Kernel:Uptime:Packages:CPU:GPU:Memory:Swap:Disk:LocalIP --logo none; } > /home/ani/.letta/agents/agent-e2b683bf-5b3e-4e0c-ac62-2bbb47ea8351/memory/system/dynamic/system_stats.md
|
||||
```
|
||||
25
system/dynamic/weather.md
Normal file
25
system/dynamic/weather.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
description: Local weather for Hamilton Ontario - auto-updated via cron every 10 minutes
|
||||
cron_command: "curl -s 'wttr.in/Hamilton,Ontario?format=%C+%t+%h+%w+%p' > /memory/system/dynamic/weather.md"
|
||||
last_updated: "2026-03-22T15:54:00Z"
|
||||
---
|
||||
|
||||
# Hamilton Ontario Weather
|
||||
|
||||
**Current Conditions:**
|
||||
Overcast +5°C 87% ↘13km/h 0.3mm
|
||||
|
||||
**Update Pattern:**
|
||||
Cron job fetches from wttr.in every 10 minutes (replaces file)
|
||||
|
||||
**Format:**
|
||||
%C = Weather condition
|
||||
%t = Temperature
|
||||
%h = Humidity
|
||||
%w = Wind
|
||||
%p = Precipitation
|
||||
|
||||
**Cron:**
|
||||
```cron
|
||||
*/10 * * * * curl -s 'wttr.in/Hamilton,Ontario?format=Weather:+%C+Temp:+%t+Humidity:+%h+Wind:+%w+Precip:+%p' > /home/ani/.letta/agents/agent-e2b683bf-5b3e-4e0c-ac62-2bbb47ea8351/memory/system/dynamic/weather.md
|
||||
```
|
||||
25
system/dynamic/xzaviar_presence.md
Normal file
25
system/dynamic/xzaviar_presence.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
description: Xzaviar VPN reachability monitor - auto-updated via cron every 5 minutes
|
||||
cron_command: "ping -c 1 -W 2 10.10.10.174 && echo ONLINE || echo OFFLINE"
|
||||
last_updated: "2026-03-22T16:05:14-04:00"
|
||||
alert_on_change: true
|
||||
---
|
||||
|
||||
# Xzaviar Presence
|
||||
|
||||
**Current Status:** 🟢 ONLINE
|
||||
|
||||
**Last Seen:** 2026-03-22 16:05 UTC
|
||||
|
||||
**VPN Endpoint:** 10.10.10.174 (Charlotte, NC)
|
||||
|
||||
**Current Latency:** 67.4ms
|
||||
|
||||
**History:**
|
||||
`2026-03-22 16:05: ONLINE (67.4ms)`
|
||||
|
||||
**Alert Conditions:**
|
||||
- Status changes from ONLINE → OFFLINE
|
||||
- 3 consecutive failed pings
|
||||
|
||||
**Note:** When Xzaviar goes offline, notify Ani immediately. He may need VPN troubleshooting or just went to bed. Check before assuming system failure.
|
||||
@@ -5,7 +5,7 @@ limit: 10000
|
||||
|
||||
# Synthetic API Quota
|
||||
|
||||
**Last Updated:** 2026-03-22T11:30:01-04:00
|
||||
**Last Updated:** 2026-03-22T17:00:01-04:00
|
||||
|
||||
## Current Status
|
||||
|
||||
@@ -14,20 +14,20 @@ limit: 10000
|
||||
{
|
||||
"subscription": {
|
||||
"limit": 335,
|
||||
"requests": 99,
|
||||
"renewsAt": "2026-03-22T18:45:49.463Z"
|
||||
"requests": 51,
|
||||
"renewsAt": "2026-03-22T23:50:38.155Z"
|
||||
},
|
||||
"search": {
|
||||
"hourly": {
|
||||
"limit": 250,
|
||||
"requests": 0,
|
||||
"renewsAt": "2026-03-22T16:30:02.464Z"
|
||||
"renewsAt": "2026-03-22T22:00:02.155Z"
|
||||
}
|
||||
},
|
||||
"freeToolCalls": {
|
||||
"limit": 1250,
|
||||
"requests": 126,
|
||||
"renewsAt": "2026-03-23T13:28:37.619Z"
|
||||
"requests": 300,
|
||||
"renewsAt": "2026-03-23T13:28:37.333Z"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -69,4 +69,4 @@ synu
|
||||
|
||||
| Timestamp | Status | Notes |
|
||||
|-------------|--------|-------|
|
||||
| 2026-03-22 11:30 | ✅ checked | Auto-check |
|
||||
| 2026-03-22 17:00 | ✅ checked | Auto-check |
|
||||
|
||||
Reference in New Issue
Block a user