Skip to main content
Glama

Google Drive MCP Server

by konashevich
authenticate.sh5.32 kB
#!/bin/bash # OAuth Authentication Helper for Headless Linux Server # This script helps you authenticate when you don't have a browser on the server echo "╔══════════════════════════════════════════════════════════════════════╗" echo "║ MCP GDRIVE - OAUTH AUTHENTICATION ON LINUX SERVER ║" echo "╚══════════════════════════════════════════════════════════════════════╝" echo "" echo "To authenticate on this headless server, you'll use SSH port forwarding." echo "" echo "════════════════════════════════════════════════════════════════════════" echo "STEP 1: SSH Port Forwarding Setup" echo "════════════════════════════════════════════════════════════════════════" echo "" echo "From your Windows PC, you need to reconnect to this server with SSH" echo "port forwarding. This will allow the OAuth callback to reach the server." echo "" echo "You have TWO options:" echo "" echo "─────────────────────────────────────────────────────────────────────" echo "Option A: Using Windows PowerShell/Command Prompt" echo "─────────────────────────────────────────────────────────────────────" echo "" echo " 1. Close your current SSH session (or open a NEW terminal)" echo " 2. Run this command from Windows:" echo "" echo " ssh -L 3000:localhost:3000 pi@192.168.1.114" echo "" echo " 3. You'll be logged back into this Linux server" echo " 4. Continue to STEP 2 below" echo "" echo "─────────────────────────────────────────────────────────────────────" echo "Option B: If using VS Code Remote SSH" echo "─────────────────────────────────────────────────────────────────────" echo "" echo " 1. In VS Code, open Settings (Ctrl+,)" echo " 2. Search for: Remote.SSH: Local Server Download" echo " 3. Add to your SSH config (~/.ssh/config on Windows):" echo "" echo " Host cm3588" echo " HostName 192.168.1.114" echo " User pi" echo " LocalForward 3000 localhost:3000" echo "" echo " 4. Reconnect VS Code" echo "" echo "════════════════════════════════════════════════════════════════════════" echo "STEP 2: Run Authentication" echo "════════════════════════════════════════════════════════════════════════" echo "" echo "Once you're connected with port forwarding, run:" echo "" echo " cd /mnt/merged_ssd/mcp-gdrive" echo " rm /home/pi/.config/mcp-gdrive/.gdrive-server-credentials.json" echo " npm run start:stdio" echo "" echo "A URL will appear like:" echo " http://localhost:3000/?code=..." echo "" echo "════════════════════════════════════════════════════════════════════════" echo "STEP 3: Open URL in Windows Browser" echo "════════════════════════════════════════════════════════════════════════" echo "" echo "Copy the URL and paste it into your Windows browser." echo "The OAuth flow will work because of the SSH tunnel!" echo "" echo "After authorization:" echo " - Press Ctrl+C to stop the manual server" echo " - Start the service: sudo systemctl start mcp-gdrive" echo "" echo "════════════════════════════════════════════════════════════════════════" echo "" read -p "Press Enter when you've set up SSH port forwarding and are ready..." echo "" echo "Removing old credentials..." rm -f /home/pi/.config/mcp-gdrive/.gdrive-server-credentials.json echo "" echo "Starting authentication server..." echo "When you see the authorization URL, copy it to your Windows browser." echo "" echo "Press Ctrl+C after successful authentication." echo "" sleep 2 cd /mnt/merged_ssd/mcp-gdrive npm run start:stdio

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/konashevich/mcp-gdrive'

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