-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_ormcp.sh
More file actions
executable file
·52 lines (41 loc) · 1.44 KB
/
start_ormcp.sh
File metadata and controls
executable file
·52 lines (41 loc) · 1.44 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
#!/bin/bash
# Script to start the ORMCP server with proper environment variables
set -euo pipefail
echo "🚀 Starting ORMCP Server for Inventory Watchdog"
echo "================================================"
# Set environment variables
export GILHARI_BASE_URL="http://localhost:8081/gilhari/v1/"
export MCP_SERVER_NAME="InventoryWatchdog"
export GILHARI_TIMEOUT="30"
export LOG_LEVEL="INFO"
export READONLY_MODE="false"
echo "📋 Configuration:"
echo " GILHARI_BASE_URL: $GILHARI_BASE_URL"
echo " MCP_SERVER_NAME: $MCP_SERVER_NAME"
echo " READONLY_MODE: $READONLY_MODE"
echo ""
# Check if ormcp-server command is available
if ! command -v ormcp-server &> /dev/null; then
echo "❌ Error: ormcp-server command not found"
echo " Please install ormcp-server:"
echo " pip install ormcp-server"
echo ""
echo " Or use Python module:"
echo " python -m ormcp_server"
exit 1
fi
# Check if Gilhari microservice is running
echo "🔍 Checking Gilhari microservice..."
if ! curl -s http://localhost:8081/gilhari/v1/getObjectModelSummary/now > /dev/null; then
echo "❌ Error: Gilhari microservice is not running"
echo " Please start it first:"
echo " ./setup_docker.sh"
exit 1
fi
echo "✅ Gilhari microservice is running"
echo ""
# Start ORMCP server in HTTP mode
echo "🚀 Starting ORMCP server in HTTP mode on port 8080..."
echo " (Press Ctrl+C to stop)"
echo ""
ormcp-server --mode http --port 8080