Remote MCP server for Google Drive and Sheets on Cloudflare Workers

Remote MCP server for Google Drive and Sheets on Cloudflare Workers

mcp-gdrive-cf•bybrianmoney

A remote HTTP/SSE MCP server exposing Google Drive and Sheets tools, deployed on Cloudflare Workers with a full OAuth 2.0 authorization server, PKCE, and dynamic client registration.

License: Not specified•Runtime: Awaiting documentation review•Category: productivity work

WHAT IT DOES

  • •Provides Drive operations including search, read, create folders, upload, delete, move, and share.
  • •Provides Sheets operations to batch read ranges, update cells, and append rows.
  • •Implements a complete OAuth 2.0 authorization server with dynamic client registration, PKCE, and automatic Google token refresh.
  • •Exposes 11 tools via SSE transport over a global edge network.

BEST FOR

  • •Connecting MCP clients such as Claude Desktop, Cline, or VS Code to Google Drive and Sheets without running a local process.
  • •Teams needing multi-client access to Drive and Sheets with OAuth 2.0 authorization and PKCE security.
  • •Workflows that search, read in many export formats, and reorganize or share Drive files.

ABOUT MCP-GDRIVE-CF

Remote MCP server for Google Drive and Sheets on Cloudflare Workers is cataloged as an MCP server attributed to brianmoney. A remote HTTP/SSE MCP server exposing Google Drive and Sheets tools, deployed on Cloudflare Workers with a full OAuth 2.0 authorization server, PKCE, and dynamic client registration. It is categorized under productivity work. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Remote MCP server for Google Drive and Sheets on Cloudflare Workers are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

Upstream README

View this exact version on GitHub

README.md · 3eb8cedcf4b7 · Fetched 2026-11-13 12:11:42 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

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:

  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\`


🔐 OAuth 2.0 Flow

This server implements a complete OAuth 2.0 authorization server per the MCP specification.

Using MCP Inspector

The easiest way to test the OAuth flow:

```bash npx @modelcontextprotocol/inspector https://your-worker.workers.dev/sse ```

  1. Discovery - Inspector auto-discovers OAuth endpoints
  2. Registration - Click "Guided Setup" → registers client automatically
  3. Authorization - Redirects to Google → authenticates → redirects back
  4. Token Exchange - Automatically exchanges code for access token
  5. Use Tools - All 11 tools now available!

Security Features

  • ✅ PKCE (RFC 7636) - Proof Key for Code Exchange
  • ✅ State Parameter - CSRF protection
  • ✅ HTTPS Only - Enforced by Cloudflare Workers
  • ✅ Secure Token Storage - Encrypted in Workers KV
  • ✅ Token Expiration - Access tokens expire in 1 hour
  • ✅ Client Secret Hashing - SHA-256 hashed storage
  • ✅ Authorization Code Single-Use - Codes deleted after exchange

🛠️ Available Tools

Drive Tools

  • `gdrive_search` - Basic search across all files
  • `gdrive_search_advanced` - Advanced search with filters
  • `gdrive_read_file` - Read files with 22+ export formats
  • `gdrive_create_folder` - Create folders
  • `gdrive_upload_file` - Upload files (up to 5MB)
  • `gdrive_delete_file` - Move files to trash
  • `gdrive_move_file` - Move files between folders
  • `gdrive_add_permission` - Share files/folders

Sheets Tools

  • `gsheets_read` - Read multiple ranges
  • `gsheets_update_cell` - Update single cells
  • `gsheets_append_row` - Append rows

🔌 Client Configuration

VS Code with MCP Extension

Create `.vscode/settings.json`:

```json { "mcp.servers": { "gdrive": { "url": "https://your-worker.workers.dev/sse", "authorization": { "type": "oauth2" } } } } ```

Claude Desktop / Cline

macOS/Linux: `~/Library/Application Support/Claude/claude_desktop_config.json`
Windows: `%APPDATA%\Claude\claude_desktop_config.json`

```json { "mcpServers": { "gdrive": { "url": "https://your-worker.workers.dev/sse" } } } ```


🧪 Testing

Local Development

```bash npm start

Server available at http://localhost:8788

```

Test with MCP Inspector

```bash npx @modelcontextprotocol/inspector http://localhost:8788/sse ```

Check CloudFlare Logs

```bash wrangler tail --format pretty ```


🐛 Troubleshooting

"Failed to discover OAuth metadata"

Solution:

  • Ensure `/.well-known/oauth-authorization-server` returns valid JSON
  • Check CORS headers are present
  • Verify latest version is deployed: `wrangler deploy`

"Token exchange failed: HTTP 400"

Solutions:

  • Check code_verifier matches original code_challenge
  • Ensure redirect_uri exactly matches registration
  • Verify client credentials are correct
  • Check CloudFlare logs: `wrangler tail`

Tools not working

Solutions:

  • Check Google OAuth scopes include `drive` and `spreadsheets`
  • Re-authenticate if scopes changed: visit `/google/authorize`
  • Verify Worker has valid Google access token
  • Check KV namespace bindings in `wrangler.toml`

📊 Performance & Limits

ResourceLimitNotes
Request Timeout30 secondsCloudFlare Workers limit
File Upload5 MBSimple upload API limit
File Export10 MBGoogle Drive export limit
Token Storage30 daysAutomatic cleanup
Authorization Code10 minutesSingle-use
Access Token1 hourAuto-refreshed

🔒 Security Best Practices

  1. Never commit secrets - Use `wrangler secret put`
  2. Rotate client secrets - Periodically regenerate OAuth credentials
  3. Monitor access - Use CloudFlare Analytics to track usage
  4. Limit OAuth scopes - Only request necessary Google permissions
  5. Use PKCE - Always use PKCE for public clients
  6. Validate redirect URIs - Whitelist exact URIs in Google Console
  7. Enable 2FA - Protect your CloudFlare and Google accounts

📄 License

MIT License


🙏 Acknowledgments


Made with ☁️ by Brian Money

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Remote MCP server for Google Drive and Sheets on Cloudflare Workers from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-gdrive-cf)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related productivity work MCP Servers

Alternative and complementary servers in the same category

View all in productivity work →
Tuqui hosted MCP server for Odoo
tuqui-odoo-mcp-for-claude-chatgpt•tuqui-ai

Tuqui is a hosted MCP server that connects Odoo with Claude and ChatGPT so users can ask about sales, stock, customers and overdue invoices in plain language.

Repository stats unavailable
Productivity & Ops