-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·118 lines (97 loc) · 3.82 KB
/
start.sh
File metadata and controls
executable file
·118 lines (97 loc) · 3.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/bin/bash
# Start configured IBEX MCP servers and Open WebUI
set -e
DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$DIR"
# ── Colors ──────────────────────────────────────────────────
if [ -t 1 ]; then
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
else
GREEN='' RED='' NC=''
fi
# ── Load credentials ────────────────────────────────────────
ENV_FILE="$HOME/.ibex-mcp.env"
if [ -f "$ENV_FILE" ]; then
set -a
source "$ENV_FILE"
set +a
else
echo "No configuration found at $ENV_FILE"
echo "Run ~/IBEX/configure.sh to set up connectors first."
exit 1
fi
# ── Start configured servers ────────────────────────────────
echo ""
echo "Starting IBEX servers..."
echo ""
started=0
if [ -n "${SLACK_TOKEN:-}" ]; then
node servers/slack.js --http &
printf " ${GREEN}✓${NC} Slack → http://localhost:3001/mcp\n"
started=$((started + 1))
else
printf " ${RED}✗${NC} Slack (SLACK_TOKEN not configured)\n"
fi
if [ -n "${NOTION_TOKEN:-}" ]; then
node servers/notion.js --http &
printf " ${GREEN}✓${NC} Notion → http://localhost:3002/mcp\n"
started=$((started + 1))
else
printf " ${RED}✗${NC} Notion (NOTION_TOKEN not configured)\n"
fi
if [ -n "${JIRA_DOMAIN:-}" ] && [ -n "${JIRA_EMAIL:-}" ] && [ -n "${JIRA_API_TOKEN:-}" ]; then
node servers/jira.js --http &
printf " ${GREEN}✓${NC} Jira → http://localhost:3003/mcp\n"
started=$((started + 1))
else
printf " ${RED}✗${NC} Jira (JIRA credentials not configured)\n"
fi
if [ -n "${GITHUB_TOKEN:-}" ] && [ -n "${GITHUB_OWNER:-}" ] && [ -n "${GITHUB_REPO:-}" ]; then
node servers/memory.js --http &
printf " ${GREEN}✓${NC} Memory → http://localhost:3004/mcp\n"
started=$((started + 1))
else
printf " ${RED}✗${NC} Memory (GITHUB credentials not configured)\n"
fi
if [ -n "${SERVICENOW_INSTANCE:-}" ] && [ -n "${SERVICENOW_USERNAME:-}" ] && [ -n "${SERVICENOW_PASSWORD:-}" ]; then
node servers/servicenow.js --http &
printf " ${GREEN}✓${NC} ServiceNow → http://localhost:3005/mcp\n"
started=$((started + 1))
else
printf " ${RED}✗${NC} ServiceNow (SERVICENOW credentials not configured)\n"
fi
if [ -n "${SALESFORCE_INSTANCE_URL:-}" ] && [ -n "${SALESFORCE_ACCESS_TOKEN:-}" ]; then
node servers/salesforce.js --http &
printf " ${GREEN}✓${NC} Salesforce → http://localhost:3006/mcp\n"
started=$((started + 1))
else
printf " ${RED}✗${NC} Salesforce (SALESFORCE credentials not configured)\n"
fi
# ── Start Open WebUI ────────────────────────────────────────
echo ""
if command -v docker &>/dev/null && docker info &>/dev/null 2>&1; then
if docker ps --format '{{.Names}}' | grep -q '^open-webui$'; then
printf " ${GREEN}✓${NC} Open WebUI → http://localhost:8080\n"
else
docker start open-webui 2>/dev/null && \
printf " ${GREEN}✓${NC} Open WebUI → http://localhost:8080\n" || \
printf " ${RED}✗${NC} Open WebUI (container not found — run install.sh)\n"
fi
else
printf " ${RED}✗${NC} Open WebUI (Docker not running)\n"
fi
# ── Summary ─────────────────────────────────────────────────
echo ""
echo "$started server(s) started."
echo ""
echo "Open WebUI → http://localhost:8080"
echo "Add connectors → ~/IBEX/configure.sh"
echo ""
if [ $started -gt 0 ]; then
echo "Press Ctrl+C to stop all IBEX servers"
wait
else
echo "No servers started. Run ~/IBEX/configure.sh to add credentials."
fi