forked from alpadalar/ActiveDirectoryMCP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_server.sh
More file actions
executable file
·37 lines (27 loc) · 916 Bytes
/
start_server.sh
File metadata and controls
executable file
·37 lines (27 loc) · 916 Bytes
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
#!/bin/bash
# ActiveDirectoryMCP Server Startup Script
# This script starts the ActiveDirectoryMCP server in stdio mode
set -e
echo "Starting ActiveDirectoryMCP Server..."
# Check if virtual environment exists
if [ ! -d ".venv" ]; then
echo "Virtual environment not found. Please run setup first."
exit 1
fi
# Activate virtual environment
source .venv/bin/activate
# Check if config file exists
if [ -z "$AD_MCP_CONFIG" ]; then
export AD_MCP_CONFIG="ad-config/config.json"
fi
if [ ! -f "$AD_MCP_CONFIG" ]; then
echo "Configuration file not found: $AD_MCP_CONFIG"
echo "Please copy ad-config/config.example.json to ad-config/config.json and configure it."
exit 1
fi
echo "Using configuration: $AD_MCP_CONFIG"
# Set PYTHONPATH
export PYTHONPATH="$PWD/src:$PYTHONPATH"
# Start the server
echo "Starting ActiveDirectoryMCP server in stdio mode..."
python -m active_directory_mcp.server