-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·32 lines (27 loc) · 898 Bytes
/
Copy pathrun.sh
File metadata and controls
executable file
·32 lines (27 loc) · 898 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
#!/bin/bash
echo "Tesla MCP Server Launcher"
echo "========================="
# Check if .env file exists
if [ ! -f .env ]; then
echo "Error: .env file not found. Please create one with your Tesla API credentials."
exit 1
fi
# Check if refresh token exists in .env
if ! grep -q "TESLA_REFRESH_TOKEN=" .env || grep -q "TESLA_REFRESH_TOKEN=your_refresh_token" .env; then
echo "No valid refresh token found in .env file."
echo "Would you like to get a refresh token now? (y/n)"
read -r response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
echo "Running token retrieval script..."
pnpm get-token
else
echo "Please update your .env file with a valid TESLA_REFRESH_TOKEN."
exit 1
fi
fi
# Build the application
echo "Building Tesla MCP Server..."
pnpm build
# Run the server with the inspector
echo "Starting Tesla MCP Server with inspector..."
pnpm inspector