Skip to main content
Glama
install.sh3 kB
#!/bin/bash set -e echo "📧 Gmail MCP Server - Installation Script" echo "==========================================" echo "" # Get script directory SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "$SCRIPT_DIR" # Check Python version echo "🐍 Checking Python version..." if ! python3 --version | grep -q "Python 3"; then echo "❌ Python 3 is required but not found!" exit 1 fi echo "✅ Python 3 found" # Create virtual environment echo "" echo "📦 Creating virtual environment..." if [ ! -d ".venv" ]; then python3 -m venv .venv echo "✅ Virtual environment created" else echo "✅ Virtual environment already exists" fi # Activate virtual environment echo "" echo "🔧 Activating virtual environment..." source .venv/bin/activate # Install dependencies echo "" echo "📥 Installing dependencies..." if command -v uv &> /dev/null; then echo "Using uv for faster installation..." uv pip install -r requirements.txt else echo "Using pip (install uv for faster installs)..." pip install --upgrade pip pip install -r requirements.txt fi echo "✅ Dependencies installed" # Check for credentials.json echo "" echo "🔐 Checking OAuth credentials..." if [ ! -f "credentials.json" ]; then echo "⚠️ credentials.json not found!" echo "" echo "Next steps:" echo "1. Go to Google Cloud Console: https://console.cloud.google.com/" echo "2. Enable Gmail API" echo "3. Create OAuth 2.0 Client ID (Desktop app)" echo "4. Download credentials.json to this directory" echo "5. Run: python oauth_setup.py" echo "" else echo "✅ credentials.json found" echo "" echo "Run OAuth setup to get refresh token:" echo " python oauth_setup.py" echo "" fi # Check OpenBao agent echo "🔒 Checking OpenBao agent..." if curl -s http://127.0.0.1:18200/v1/sys/health > /dev/null 2>&1; then echo "✅ OpenBao agent is running" else echo "⚠️ OpenBao agent not detected" echo "" echo "Start the agent with:" echo " export BW_SESSION=\$(bw unlock --raw)" echo " start-openbao-mcp" echo "" fi # Test server echo "" echo "🧪 Testing server startup..." if timeout 5s python gmail_mcp.py 2>&1 | grep -q "MCP_SERVER_READY"; then echo "✅ Server starts successfully" else echo "⚠️ Server test inconclusive (may need OAuth setup)" fi echo "" echo "==========================================" echo "✅ Installation Complete!" echo "" echo "Next steps:" echo "1. Set up OAuth: python oauth_setup.py" echo "2. Store credentials in OpenBao (command will be shown)" echo "3. Add to mcp-proxy config: ~/.claude/mcp-proxy/config.json" echo "4. Run structure_generator to create hierarchy" echo "" echo "For development mode without OpenBao:" echo " export OPENBAO_DEV_MODE=1" echo " export GMAIL_CLIENT_ID='...'" echo " export GMAIL_CLIENT_SECRET='...'" echo " export GMAIL_REFRESH_TOKEN='...'" echo "" echo "See README.md for detailed instructions." echo ""

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IAMSamuelRodda/gmail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server