Repository navigation
Expand file tree
/
Copy pathsetup.sh
More file actions
72 lines (59 loc) · 1.8 KB
/
Copy pathsetup.sh
File metadata and controls
72 lines (59 loc) · 1.8 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
#!/bin/bash
# Billy MCP Server Setup Script
set -e
echo "🚀 Setting up Billy MCP Server..."
# Check Node.js version
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js 26 or higher."
exit 1
fi
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 26 ]; then
echo "❌ Node.js version 26 or higher is required. Current version: $(node -v)"
exit 1
fi
echo "✅ Node.js version check passed: $(node -v)"
# Install dependencies
echo "📦 Installing dependencies..."
npm install
# Build the project
echo "🔨 Building TypeScript..."
npm run build
# Check if build was successful
if [ ! -f "build/index.js" ]; then
echo "❌ Build failed. Please check for errors above."
exit 1
fi
echo "✅ Build completed successfully"
# Create .env file if it doesn't exist
if [ ! -f ".env" ]; then
if [ -f ".env.example" ]; then
echo "📝 Creating .env file from template..."
cp .env.example .env
echo "⚠️ Please edit .env file and add your Billy access token"
else
echo "⚠️ No .env.example found; create .env with BILLY_ACCESS_TOKEN=... yourself"
fi
fi
# Make the script executable
chmod +x build/index.js
echo ""
echo "🎉 Setup completed successfully!"
echo ""
echo "Next steps:"
echo "1. Edit .env file and add your Billy access token"
echo "2. Add the server to your MCP client configuration"
echo "3. Test the connection with: npm start"
echo ""
echo "For Claude Desktop, add this to your claude_desktop_config.json:"
echo "{"
echo ' "mcpServers": {'
echo ' "billy": {'
echo ' "command": "node",'
echo " \"args\": [\"$(pwd)/build/index.js\"],"
echo ' "env": {'
echo ' "BILLY_ACCESS_TOKEN": "your_token_here"'
echo ' }'
echo ' }'
echo ' }'
echo "}"