π XPipe Integration
Connection Hub fΓΌr G100 MEGA ECOSYSTEM
π Γbersicht
XPipe ist ein Connection Hub, der deine gesamte Server-Infrastruktur von deinem lokalen Desktop aus verwaltet. Im G100 MEGA ECOSYSTEM nutzen wir XPipe fΓΌr:
- Cloudflare Workers Management (via Wrangler CLI)
- Server & Container Zugriffe (SSH, Docker, Kubernetes)
- AI Agent Integration (MCP Server)
- Team Collaboration (Git-basiertes Vault + Cloudflare Tunnel)
π₯ Team Remote Access
XPipe lΓ€uft lokal, aber Team kann via Cloudflare Tunnel zugreifen! - β HTTPS VerschlΓΌsselung - β AI Agents weltweit - β Keine Port-Forwarding
π― Use Cases
1. Cloudflare Workers Deployment
# XPipe Shell Script: "Deploy MORELO API"
#!/bin/bash
cd ~/projects/morelo-api
wrangler deploy --env production
wrangler tail --format pretty
Vorteile: - β Ein Klick Deployment aus XPipe - β Logs in Echtzeit - β Keine manuelle Terminal-Navigation
2. Multi-Instance Management
# XPipe Script: "Deploy All Instances"
#!/bin/bash
instances=("morelo" "flo" "contractplattform")
for instance in "${instances[@]}"; do
echo "π Deploying $instance..."
cd ~/projects/$instance-api
wrangler deploy --env production
echo "β
$instance deployed"
done
3. Database Operations
# XPipe Script: "Check Contract Counts"
#!/bin/bash
# MORELO
echo "=== MORELO Contracts ==="
wrangler d1 execute morelo-prod --command \
"SELECT COUNT(*) as total FROM contracts"
# FLO
echo "=== FLO Contracts ==="
wrangler d1 execute flo-prod --command \
"SELECT COUNT(*) as total FROM contracts"
# Master
echo "=== ContractPlattform Total ==="
wrangler d1 execute contractplattform-prod --command \
"SELECT instance_id, COUNT(*) as total FROM contracts GROUP BY instance_id"
4. Secret Management
# XPipe Script: "Rotate Adobe API Key"
#!/bin/bash
# Read new key from password manager (via XPipe integration!)
NEW_KEY=$(security find-generic-password -a "adobe-api-key" -w)
# Update on all instances
wrangler secret put ADOBE_API_KEY --env morelo <<< "$NEW_KEY"
wrangler secret put ADOBE_API_KEY --env flo <<< "$NEW_KEY"
echo "β
Adobe API Key rotated on all instances"
π§ Setup
1. XPipe installieren
# macOS (Homebrew)
brew install --cask xpipe-io/tap/xpipe
# Oder Download von:
# https://github.com/xpipe-io/xpipe/releases
2. Cloudflare Connection einrichten
In XPipe:
- New Connection β Custom Command
- Name:
Cloudflare - ContractPlattform - Command:
Custom Script erstellen:
- Scripts β New Script
- Name:
CF: Deploy All - Type:
Shell Script - Content: (siehe Beispiele oben)
3. MCP Server aktivieren (fΓΌr AI Agents)
Settings β Automation β MCP Server:
- β Enable MCP Server
- β Enable Write Operations
- π Generate API Key
In Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"xpipe": {
"command": "http",
"args": ["http://localhost:21721"],
"env": {
"XPIPE_API_KEY": "your-api-key-here"
}
}
}
}
π€ AI Agent Use Cases
Prompt Examples
Agent, deploy the latest MORELO API changes via XPipe
Agent, check the contract count across all G100 instances using XPipe
Agent, rotate the Stripe API key on all instances via XPipe
Agent, show me the latest error logs from the FLO production worker using XPipe
Agent Workflow (automatisch):
- Agent erkennt XPipe MCP Tool
- FΓΌhrt
run_scriptmit Script-Name aus - Liest Output
- Interpretiert Ergebnis
- Berichtet an dich
π Git Vault fΓΌr Team Collaboration
Setup
In XPipe: Settings β Sync β Git Repository:
- Enable Git Sync: β
- Repository URL:
- Branch:
main - Auto-Commit: β
- Auto-Push: β
Was wird gespeichert?
xpipe-vault/
βββ connections/
β βββ cloudflare-morelo.json
β βββ cloudflare-flo.json
β βββ aws-production.json
β βββ docker-local.json
βββ scripts/
β βββ deploy-all-instances.sh
β βββ check-contracts.sh
β βββ rotate-secrets.sh
βββ environments/
βββ production.env
βββ staging.env
Team Benefits:
- β Jeder hat gleiche Connections
- β Scripts werden geteilt
- β Versioniert mit Git
- β Self-hosted (kein externer Service)
π Integration Matrix
| Feature | XPipe | Cloudflare Dashboard | Wrangler CLI |
|---|---|---|---|
| Deployment | β Scripts | β | β Direct |
| Logs | β Scripts | β Live Tail | β
wrangler tail |
| Secrets | β Scripts | β GUI | β
wrangler secret |
| D1 Queries | β Scripts | β GUI | β
wrangler d1 |
| AI Agent Access | β MCP | β | β |
| Team Sharing | β Git Vault | β | β |
| SSH Integration | β Native | β | β |
π¬ Workflow Example
Szenario: "Deploy MORELO mit Health Check"
XPipe Script: deploy-morelo-safe.sh
#!/bin/bash
set -e # Exit on error
INSTANCE="morelo"
ENV="production"
echo "π Starting deployment for $INSTANCE..."
# 1. Pre-deployment check
echo "π Current worker status:"
wrangler tail --format json --once | jq '.outcome'
# 2. Deploy
echo "π¨ Deploying..."
wrangler deploy --env $ENV
# 3. Wait for propagation
echo "β³ Waiting 10s for propagation..."
sleep 10
# 4. Health check
echo "π₯ Running health check..."
HEALTH=$(curl -s https://api-morelo.contractplattform.dev/health)
if echo "$HEALTH" | jq -e '.status == "ok"' > /dev/null; then
echo "β
Deployment successful!"
echo "π Health: $HEALTH"
else
echo "β Health check failed!"
echo "π΄ Response: $HEALTH"
exit 1
fi
# 5. Notify
echo "π§ Sending notification..."
curl -X POST "https://hooks.slack.com/your-webhook" \
-d "{\"text\": \"β
MORELO deployed successfully\"}"
echo "π Done!"
AusfΓΌhren:
- In XPipe: Right-click auf Connection β Run Script β deploy-morelo-safe.sh
- ODER via AI Agent: "Deploy MORELO with health check using XPipe"
π₯ Advanced: Cloudflare API Integration
Direkt via REST API (ohne Wrangler)
# XPipe Script: "cf-api-deploy.sh"
#!/bin/bash
CF_ACCOUNT_ID="edeaf72f08c3145711f257893d9ddab1"
CF_API_TOKEN="${CLOUDFLARE_API_TOKEN}" # From XPipe env or password manager
WORKER_NAME="morelo-api"
# Get script content
SCRIPT=$(cat ~/projects/morelo-api/dist/index.js)
# Deploy via API
curl -X PUT \
"https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/workers/scripts/$WORKER_NAME" \
-H "Authorization: Bearer $CF_API_TOKEN" \
-H "Content-Type: application/javascript" \
--data-binary "@~/projects/morelo-api/dist/index.js"
echo "β
Deployed via API"
π Resources
| Resource | URL |
|---|---|
| XPipe Homepage | https://xpipe.io |
| XPipe GitHub | https://github.com/xpipe-io/xpipe |
| XPipe Docs | https://docs.xpipe.io |
| MCP Server Guide | https://docs.xpipe.io/guide/mcp |
| Reddit Discussion | https://www.reddit.com/r/selfhosted/comments/14ttg5o/ |
| Cloudflare API | https://developers.cloudflare.com/api/ |
β Vorteile fΓΌr G100
| Vorteil | Beschreibung |
|---|---|
| π― Zentralisiert | Alle Connections an einem Ort |
| π€ AI-ready | MCP Server fΓΌr Agents |
| π₯ Team-fΓ€hig | Git-basiertes Sharing |
| π Sicher | Password Manager Integration |
| β‘ Schnell | One-Click Deployments |
| π Transparent | Alle Logs zentral |