Sponsored by Deepsite.site

Mcp Gdrive Cloudflare

Created By
brianmoney2 months ago
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 Designed to run as a remote HTTP/SSE MCP server on Cloudflare's edge network with complete OAuth 2.0 authorization server capabilities.
Content

✨ 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:

  1. Runs remotely on Cloudflare Workers (no local process)
  2. Full OAuth 2.0 authorization server (not just OAuth client)
  3. Multi-client support via dynamic client registration
  4. PKCE security for public clients
  5. 22+ export formats for Drive files
  6. Write operations (create, delete, move, share, upload)
  7. 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

  1. Create a project at Google Cloud Console
  2. Enable APIs:
    • Google Drive API
    • Google Sheets API
  3. Create OAuth 2.0 credentials:
  4. Required OAuth scopes:

🔧 Installation & Deployment

1. Install Dependencies

```bash npm install ```

2. Create KV Namespaces

```bash

For user session tokens

wrangler kv:namespace create KV_TOKENS

For OAuth client registrations

wrangler kv:namespace create KV_CLIENTS ```

Copy the namespace IDs to `wrangler.toml`:

```toml [[kv_namespaces]] binding = "KV_TOKENS" id = "your-tokens-namespace-id"

[[kv_namespaces]] binding = "KV_CLIENTS" id = "your-clients-namespace-id" ```

3. Configure Environment Variables

Add to `wrangler.toml`:

```toml [vars] GOOGLE_CLIENT_ID = "your-client-id.apps.googleusercontent.com" ```

Set secrets:

```bash

Google OAuth client secret

wrangler secret put GOOGLE_CLIENT_SECRET ```

4. Deploy

```bash wrangler deploy ```

Your worker will be available at: `https://your-worker-name.your-account.workers.dev\`

Server Config

{
  "mcpServers": {
    "gdrive": {
      "url": "https://mcp-gdrive-cf.CFDOMAIN.workers.dev/sse",
      "type": "http"
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
WindsurfThe new purpose-built IDE to harness magic
CursorThe AI Code Editor
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Tavily Mcp
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
ChatWiseThe second fastest AI chatbot™
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Amap Maps高德地图官方 MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Serper MCP ServerA Serper MCP Server
Playwright McpPlaywright MCP server