
Remote MCP server for Google Drive and Sheets running on Cloudflare Workers with full OAuth 2.0 support.
概览
Remote MCP server for Google Drive and Sheets running on Cloudflare Workers with full OAuth 2.0 support. Adapted from isaacphi/mcp-gdrive to run as a remote HTTP/SSE MCP server on Cloudflare's edge network with complete OAuth 2.0 authorization server capabilities. \`bash git clone https://github.com/brianmoney/mcp-gdrive-cf.git cd mcp-gdrive-cf npm install wrangler kv:namespace create KV_TOKENS wrangler kv:namespace create KV_CLIENTS wrangler secret put GOOGLE_CLIENT_SECRET npx @modelcontextprotocol/inspector https://your-worker.workers.dev/sse \` - 🔍 - Basic and advanced search with filters (MIME type, owner, dates, shared drives) - 📄 - Read any file with 22+ export formats (PDF, DOCX, XLSX, Markdown, etc.
README
以下为原文 README 节选,完整内容请查看原文。
mcp-gdrive-cf
Remote MCP server for Google Drive and Sheets running on Cloudflare Workers with full OAuth 2.0 support.
Production Ready ✅ | 11 Tools | OAuth 2.0 | PKCE | Global Edge Network
Adapted from isaacphi/mcp-gdrive to run as a remote HTTP/SSE MCP server on Cloudflare’s edge network with complete OAuth 2.0 authorization server capabilities.
🚀 Quick Start
```bash
1. Clone and install
git clone https://github.com/brianmoney/mcp-gdrive-cf.git cd mcp-gdrive-cf npm install
2. Create KV namespaces
wrangler kv:namespace create KV_TOKENS wrangler kv:namespace create KV_CLIENTS
3. Update wrangler.toml with your namespace IDs
4. Configure Google OAuth credentials
wrangler secret put GOOGLE_CLIENT_SECRET
5. Deploy
wrangler deploy
6. Test with MCP Inspector
npx @modelcontextprotocol/inspector https://your-worker.workers.dev/sse ```
✨ Features
Drive Operations
- 🔍 Search - Basic and advanced search with filters (MIME type, owner, dates, shared drives)
- 📄 Read - Read any file with 22+ export formats (PDF, DOCX, XLSX, Markdown, etc.)
- 📁 Create Folders - Organize files with nested folder structures
- ⬆️ Upload - Upload files up to 5MB
- 🗑️ Delete - Move files to trash
- 📦 Move - Reorganize files between folders
- 🔐 Share - Add permissions (reader, writer, commenter, owner)
Sheets Operations
- 📊 Read - Batch read multiple ranges
- ✏️ Update - Update individual cells
- ➕ Append - Add rows to spreadsheets
Infrastructure
- ☁️ Global Edge Network - Runs on Cloudflare Workers worldwide
- 🔐 OAuth 2.0 Server - Full authorization server with PKCE support
- 🔑 Dynamic Client Registration - Automatic client onboarding
- 🔄 Auto Token Refresh - Seamless Google token renewal
- 📡 SSE Transport - Real-time Server-Sent Events
- 🛡️ Secure - HTTPS only, encrypted token storage
🎯 What Makes This Different
Unlike the original STDIO-based `mcp-gdrive`, this implementation:
- Runs remotely on Cloudflare Workers (no local process)
- Full OAuth 2.0 authorization server (not just OAuth client)
- Multi-client support via dynamic client registration
- PKCE security for public clients
- 22+ export formats for Drive files
- Write operations (create, delete, move, share, upload)
- Production tested with real workloads
📋 Prerequisites
Required
- Cloudflare Account with Workers enabled (free tier works)
- Google Cloud Project with Drive API and Sheets API enabled
- Node.js LTS (v18+)
- Wrangler CLI (`npm install -g wrangler`)
Google Cloud Setup
- Create a project at Google Cloud Console
- Enable APIs:
- Google Drive API
- Google Sheets API
- Create OAuth 2.0 credentials:
- Type: Web application
安装
npx @modelcontextprotocol/inspector https://your-worker.workers.dev/sse