Mcp Gdrive Cloudflare

MCP运维云端

提供方 brianmoney

运维云端 未标注 OAuth 授权 社区 / 第三方 ClaudeCursorCodexZed

Remote MCP server for Google Drive and Sheets running on Cloudflare Workers with full OAuth 2.0 support.

一句话选型结论

按资料字段整理

Mcp Gdrive Cloudflare 属于运维云端类 MCP 服务器,传输方式未标注,OAuth 授权,可直接接入 Claude、Cursor、Codex 等,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类运维云端 传输方式未标注 鉴权OAuth 授权 部署方式未标注
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

运维云端
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

cloudflare oauth2

支持客户端

适用场景

cloudflareoauth2

安装与配置

未标注 OAuth 授权
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
云资源查询

查实例、存储、账单等云上资源状态。

部署与发布

把部署、重启、回滚这类操作接进对话。

监控与告警

拉取监控指标,异常时让模型帮你判断。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 已适配 Claude、Cursor、Codex,换客户端不用重新研究配置。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好OAuth 授权对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 已经在用 Claude、Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Mcp Gdrive Cloudflare当前 未标注 未标注 未标注 无 未标注
lobehub 未标注 stdio · 本地进程 本地部署 有 2026-04-11
TrendRadar 未标注 stdio · 本地进程 本地部署 有 2026-04-13
Ui Tars Desktop 8a825770 未标注 stdio · 本地进程 本地部署 有 2026-05-17
ruflo 未标注 stdio · 本地进程 本地部署 有 2026-04-13
FastGPT 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

运维云端
字段来自项目仓库与公开索引,中文说明由本站标注
提供方brianmoney上游标注的维护方 brianmoney
分类运维云端本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式OAuth 授权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Cross-platform本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验未标注上游最后核验时间

详细介绍

8.3 KB
来自项目仓库与上游目录的原文,未做删改

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:
    - Type: Web application
    - Redirect URIs: `https://your-worker.workers.dev/google/callback`
  4. Required OAuth scopes:
    - `https://www.googleapis.com/auth/drive`
    - `https://www.googleapis.com/auth/spreadsheets`

🔧 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

Resource Limit Notes
Request Timeout 30 seconds CloudFlare Workers limit
File Upload 5 MB Simple upload API limit
File Export 10 MB Google Drive export limit
Token Storage 30 days Automatic cleanup
Authorization Code 10 minutes Single-use
Access Token 1 hour Auto-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

  • isaacphi/mcp-gdrive - Original STDIO implementation
  • Model Context Protocol - MCP specification
  • CloudFlare Workers - Serverless platform

Made with ☁️ by Brian Money

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
Mcp Gdrive Cloudflare 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Mcp Gdrive Cloudflare 怎么在 Claude、Cursor、Codex 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Mcp Gdrive Cloudflare 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Mcp Gdrive Cloudflare 需要 API Key 吗?

资料标注需要OAuth 授权认证,使用前准备好对应凭据,并按最小权限配置。

Mcp Gdrive Cloudflare 支持哪些客户端?

资料标注支持 Claude、Cursor、Codex、Zed;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Mcp Gdrive Cloudflare 能提供哪些能力?

资料显示能力标签包括 cloudflare、oauth2。具体工具清单以官方文档为准。

Mcp Gdrive Cloudflare 需要什么运行环境?

运行时为 Cross-platform。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 未标注。