Full task definition with 6 phases: 1. Ubuntu Server Setup (detailed checklist created) 2. SSH Infrastructure (claude_executor users) 3. Cloudflare Tunnel 4. MCP Server Development 5. Arbiter Integration (approval workflow) 6. Testing & Monitoring Phase 1 checklist has copy-paste friendly commands for: - Ubuntu install, Cockpit, UFW, fail2ban - Lid switch ignore (shelf mode) - Docker and Node.js Architecture based on Gemini consultations from April 8-9. Chronicler #73
5.5 KiB
5.5 KiB
task_number, title, status, priority, is_blocker, owner, tags, estimated_hours
| task_number | title | status | priority | is_blocker | owner | tags | estimated_hours | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 92 | Trinity Core — Desktop MCP Gateway | In Progress | P1-High | false | Michael |
|
8 |
Task #92: Trinity Core — Desktop MCP Gateway
Overview
A dedicated Ubuntu Server on Michael's HP laptop that acts as an MCP gateway, allowing Claude.ai to execute commands on Firefrost servers with approval workflows.
Hardware: HP Laptop (dedicated, shelf-mode)
OS: Ubuntu Server 24.04 LTS
Codename: Trinity Core
The Vision
Claude.ai → MCP Request → Laptop (Trinity Core) → SSH → Firefrost Servers
↓
Arbiter (Discord Approval)
↓
Michael clicks "Approve"
↓
Command executes
No more copy-paste from Claude to MobaXterm. Claude can execute commands directly with Michael's approval.
Architecture (Gemini-Approved)
| Component | Decision | Rationale |
|---|---|---|
| MCP Server | Docker container | Isolation — bugs stay contained |
| SSH Keys | One Ed25519 key | claude_executor user on all target servers |
| Firewall | UFW | Allow 22, 9090 only; deny all else |
| Security | fail2ban + Cloudflare Access | Defense in depth |
| Approval | Arbiter integration | Don't reinvent — use existing Discord bot |
| Tunnel | cloudflared | Zero incoming ports needed |
| Startup | docker-compose + systemd | Auto-recovery on reboot |
| Monitoring | Uptime Kuma | CPU temp, disk I/O, endpoint health |
Implementation Phases
Phase 1: Ubuntu Server Setup ⬅️ CURRENT
Status: Ready to begin (laptop is wiped)
- Download Ubuntu Server 24.04 LTS ISO
- Flash to USB with Rufus or balenaEtcher
- Install Ubuntu Server on HP laptop
- During install: enable OpenSSH server
- First boot: update system (
apt update && apt upgrade) - Install Cockpit for web management
- Configure UFW firewall
- Install fail2ban
- Configure lid switch behavior
- Install Docker and docker-compose
Detailed checklist: docs/tasks/task-092-trinity-core/phase-1-ubuntu-setup.md
Phase 2: SSH Infrastructure
- Generate Ed25519 key pair on laptop
- Create
claude_executoruser on Command Center - Create
claude_executoruser on TX1 - Create
claude_executoruser on NC1 - Create
claude_executoruser on Panel (if needed) - Add public key to all
authorized_keys - Test SSH connections
- Configure restricted sudo for
claude_executor
Phase 3: Cloudflare Tunnel
- Install cloudflared
- Create tunnel in Cloudflare Zero Trust dashboard
- Configure tunnel to point to MCP server port
- Set up Cloudflare Access policy (Service Token)
- Create systemd service for cloudflared
- Test tunnel connectivity
Phase 4: MCP Server Development
- Scaffold MCP server (Node.js)
- Implement SSH command execution
- Add Arbiter webhook integration (approval requests)
- Handle approval responses
- Add command allowlist/denylist
- Containerize with Docker
- Create docker-compose.yml
- Mount SSH keys as read-only volume
Phase 5: Arbiter Integration
- Add MCP approval endpoint to Arbiter
- Create
#mcp-approvalsDiscord channel - Implement approval button UI
- Add timeout handling (auto-deny after X minutes)
- Implement callback to MCP server
- Add audit logging
Phase 6: Testing & Monitoring
- Add to Uptime Kuma (endpoint health)
- Add CPU temp monitoring
- Add disk I/O monitoring
- Test full flow: Claude → MCP → Approval → Execute
- Test failure scenarios
- Document troubleshooting guide
Target Servers
| Server | IP | claude_executor needed |
|---|---|---|
| Command Center | 63.143.34.217 | Yes |
| TX1 Dallas | 38.68.14.26 | Yes |
| NC1 Charlotte | 216.239.104.130 | Yes |
| Panel VPS | 45.94.168.138 | Maybe |
| Dev Panel | 64.50.188.128 | Maybe |
Security Model
Zero-Trust Principles:
- Cloudflare Access validates identity before traffic reaches laptop
- MCP server validates request format/signature
- Arbiter requires Discord button approval for execution
claude_executorhas restricted sudo (no root)- SSH keys mounted read-only in container
- All commands logged for audit
Command Classification:
- Safe: Read-only commands (ls, cat, systemctl status) — maybe auto-approve
- Moderate: Service restarts, git operations — require approval
- Dangerous: File deletion, user management — require approval + confirmation
Related Tasks
- Task #93: Trinity Codex (RAG knowledge base) — could query via MCP
- Task #94: Global Restart Scheduler — could trigger via MCP
- Task #87: Arbiter lifecycle handlers — approval system extends this
Consultations
docs/consultations/gemini-claude-code-workflow-2026-04-08.md— Original architecturedocs/consultations/gemini-task-92-ubuntu-setup-2026-04-09.md— Implementation guidance
Success Criteria
- Laptop runs Ubuntu Server, accessible via Cockpit
- Claude.ai can send MCP requests through Cloudflare Tunnel
- Approval buttons appear in Discord
- Commands execute on target servers after approval
- Full audit trail exists
- System auto-recovers from reboots
Fire + Frost + Foundation = Where Love Builds Legacy 💙🔥❄️