Google Drive

io.github.domdomegg由 GitHub 账号 domdomegg 发布v1.3.0更新于 Oct 24, 2026

Allow AI systems to list, search, upload, download, and manage files and folders in Google Drive.

概览

AI 生成的概览

让助手列出、搜索、读取、上传、整理、评论和共享 Google Drive 中的文件与文件夹。

可以做什么
把 Google Drive 操作暴露为工具:files_list 使用 Drive 查询语法搜索,file_get、file_download(支持导出 Google 文档和表格)、file_upload、file_update、file_copy、file_move、file_trash、file_untrash、file_delete,以及 folder_create。还覆盖协作功能:comments_list、comment_get、comment_create、comment_reply、comment_resolve、replies_list、reply_get、reply_update、reply_delete,以及 permissions_list、permission_get、permission_create、permission_update、permission_delete。该服务器在本地运行,作为 Google 的 OAuth 代理,本身不保存令牌或状态。
适用场景
适合让助手根据 Drive 中的文档回答问题、搭建项目文件夹结构、汇总多个文件中的评论,或整理和共享现有内容。适用于需要文件搜索、读取或整理的工作流,也可与 Google 文档或表格的配套服务器一起使用。
运行要求
需要本地 Node.js 运行环境,通过 npx 或 npm start 启动。需要 Google OAuth 凭据:GOOGLE_CLIENT_ID、GOOGLE_CLIENT_SECRET、GOOGLE_ACCESS_TOKEN,以及 MCP_TRANSPORT。配置过程包括创建 Google Cloud 项目、启用 Drive API、设置 OAuth 同意屏幕,并注册重定向 URI localhost:3000,可用 PORT 更改。
安装前请注意
声明的权限为完整 Drive 访问,因此助手可以读取、修改、共享、移入回收站并永久删除文件,也能通过权限工具更改访问者。GOOGLE_CLIENT_SECRET 和 GOOGLE_ACCESS_TOKEN 属于机密,必须妥善处理。永久删除和权限变更具有破坏性或泄露风险,授予广泛访问前请先评估。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Google Drive,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

google-drive-mcp

MCP server for Google Drive - list, search, upload, download, and manage files and folders.

Use Cases

Answer from files: "What was our revenue target in the Q2 board deck?" → searches Drive, reads the relevant doc, and answers your question.

Project scaffolding: Starting a new vendor onboarding → creates a folder structure with subfolders for contracts, compliance, deliverables, and meeting notes, plus template docs and sheets.

Feedback synthesis: "Summarize the feedback from my manager across my last 10 presentation decks" → reads comments from multiple files and identifies themes and development areas.

Localization workflow: "We're onboarding contractors in Japan - translate the onboarding folder from English to Japanese and flag anything that needs local adaptation (HR policies, holidays, etc.)" → reads multiple docs, translates, and highlights areas needing review.

(These are just examples - any workflow that needs file search, reading, or organization can use this. Use in combination with google-docs-mcp for reading/editing Google Docs, or google-sheets-mcp for Google Sheets.)

Setup

1. Create Google OAuth credentials

  1. Go to Google Cloud Console
  2. Create a new project (or use existing)
  3. Enable the Google Drive API
  4. Go to APIs & Services → OAuth consent screen, set up consent screen
  5. Go to APIs & Services → Credentials → Create Credentials → OAuth client ID
  6. Choose Web application
  7. Add http://localhost:3000/callback to Authorized redirect URIs
  8. Note your Client ID and Client Secret

2. Run the server

bash
GOOGLE_CLIENT_ID='your-client-id' \GOOGLE_CLIENT_SECRET='your-client-secret' \MCP_TRANSPORT=http \npm start

The server runs on http://localhost:3000 by default. Change with PORT=3001.

3. Add to your MCP client

With the server running, follow the instructions on install-mcp, which generates the right config for your MCP client (Claude Code, Claude Desktop, Cursor, Cline, VS Code, and more).

Architecture

This server acts as an OAuth proxy to Google:

mermaid
graph LR    A[MCP client] <--> B[google-drive-mcp] <--> C[Google OAuth/API]
  1. Server advertises itself as an OAuth authorization server via /.well-known/oauth-authorization-server
  2. /register returns the Google OAuth client credentials
  3. /authorize redirects to Google, encoding the client's callback URL in state
  4. /callback receives the code from Google and forwards to the client's callback
  5. /token proxies token requests to Google, injecting client credentials
  6. /mcp handles MCP requests, using the bearer token to call Drive API

The server holds no tokens or state - it just proxies OAuth to Google.

Tools

ToolDescription
Files
files_listList/search files using Drive query syntax
file_getGet file metadata
file_downloadDownload file content (supports export for Google Docs/Sheets)
file_uploadUpload a new file
file_updateUpdate file content or metadata
file_copyCopy a file
file_moveMove a file to a different folder
file_trashMove to trash
file_untrashRestore from trash
file_deletePermanently delete
Folders
folder_createCreate a new folder
Comments
comments_listList comments on a file
comment_getGet a comment and its replies
comment_createAdd a comment to a file
comment_replyReply to a comment
comment_resolveResolve or unresolve a comment
Replies
replies_listList replies to a comment
reply_getGet a specific reply
reply_updateUpdate a reply
reply_deleteDelete a reply
Permissions
permissions_listList who has access to a file
permission_getGet a specific permission
permission_createShare a file with a user, group, domain, or anyone
permission_updateChange a user's access level
permission_deleteRevoke access to a file

Drive Query Syntax

The files_list tool supports Drive's query syntax for filtering:

# By namename contains 'report'name = 'Budget 2024'
# By typemimeType = 'application/pdf'mimeType = 'application/vnd.google-apps.folder'mimeType = 'application/vnd.google-apps.document'
# By folder'folder-id' in parents
# By ownership'[email protected]' in owners
# Combinedname contains 'report' and mimeType = 'application/pdf'

Google Drive API Scopes

  • drive - Full access to Drive files

Contributing

Pull requests are welcomed on GitHub! To get started:

  1. Install Git and Node.js
  2. Clone the repository
  3. Install dependencies with npm install
  4. Run npm run test to run tests
  5. Build with npm run build

Releases

Versions follow the semantic versioning spec.

To release:

  1. Use npm version <major | minor | patch> to bump the version
  2. Run git push --follow-tags to push with tags
  3. Wait for GitHub Actions to publish to the NPM registry.

来源:README.md,提交 89770a3

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.3.0最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。