install.sh•1.84 kB
#!/bin/bash
# GCP MCP Server - One-command installer
set -e
echo "🚀 Installing GCP MCP Server"
echo "=============================="
# Check Python
if ! command -v python3.11 &> /dev/null; then
echo "❌ Python 3 is required but not installed"
exit 1
fi
if ! python3 -c "import sys; exit(0 if sys.version_info >= (3, 8) else 1)" 2>/dev/null; then
echo "❌ Python 3.8+ is required"
exit 1
fi
echo "✅ Python version check passed"
# Install in current directory or create new one
if [ ! -f "pyproject.toml" ]; then
echo "📁 This doesn't look like the gcp-mcp directory"
echo "💡 Make sure you're in the gcp-mcp directory or clone it first:"
echo " git clone https://github.com/JayRajGoyal/gcp-mcp.git"
echo " cd gcp-mcp"
echo " ./install.sh"
exit 1
fi
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
echo "🔄 Activating virtual environment..."
source venv/bin/activate
# Install dependencies
echo "📚 Installing dependencies..."
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
echo ""
echo "✅ Installation complete!"
echo ""
echo "🎯 Quick Start:"
echo "1. Get your GCP service account key file"
echo "2. Run: python -m gcp_mcp.cli --credentials /path/to/your/credentials.json"
echo ""
echo "🔗 For Claude Code integration, add this to your config:"
echo '{'
echo ' "mcpServers": {'
echo ' "gcp": {'
echo ' "command": "python",'
echo ' "args": ['
echo ' "-m", "gcp_mcp.cli",'
echo ' "--credentials", "/path/to/your/credentials.json"'
echo ' ],'
echo " \"cwd\": \"$(pwd)\""
echo ' }'
echo ' }'
echo '}'
echo ""
echo "📖 See QUICKSTART.md for detailed instructions"