Google Drive

io.github.mcp-z由 GitHub 账号 mcp-z 发布v2.4.4更新于 Oct 25, 2026

Google Drive integration with file operations, folder navigation, search, and sharing

已验证STDIO仅桌面效率与工作流文件与存储

概览

AI 生成的概览

一个本地 MCP 服务器,让助手连接 Google Drive,在多个已关联账户间搜索、浏览、上传、移动文件与文件夹,并移入回收站。

可以做什么
搜索文件和文件夹,可选择返回字段并可选解析路径;列出指定文件夹内容或从文件夹到根目录的完整路径。创建文件夹,并从本地文件路径或网址上传文件,返回后续操作可用的 ID。在位置之间移动文件与文件夹,或移入回收站(30 天内可恢复)。列出、查看、切换和移除已关联账户,移除时会删除已存储的令牌。
适用场景
当需要让助手处理已存放在 Google Drive 中的文档时使用:查找文件、整理文件夹结构、上传新资料,或在同一会话中管理多个 Drive 账户。
运行要求
通过 npx 在本地运行(需 Node.js)。需要 Google OAuth 凭据:GOOGLE_CLIENT_ID 为必需项,机密客户端还需 GOOGLE_CLIENT_SECRET;也可改用 GOOGLE_SERVICE_ACCOUNT_KEY_FILE 指定服务账号密钥文件。另有若干可选变量用于配置认证模式、HTTP 传输、重定向 URI、端口和日志。仅限桌面端,OAuth 流程通常需要浏览器,除非启用无头模式。
安装前请注意
服务器会在本机保存 Google 账户令牌,移除账户会将其永久删除。它可以移动文件并移入回收站,会改变你的 Drive 内容。上传会读取你提供的本地文件路径或网址,请只指向可信来源。OAuth 客户端密钥和服务账号密钥文件属于敏感凭据,不要放入共享配置。

安装

在 SourceWeft 中

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

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

工具

12

account-list

List all linked mcp-drive accounts with their aliases and active status.

无需输入参数。

account-me

Show current mcp-drive user identity. Returns email, alias (if set), and session expiry information.

无需输入参数。

account-remove

Remove mcp-drive account and delete stored tokens permanently. If removing the active account, the first remaining account becomes active. Requires email or alias parameter.

输入参数accountId必填

account-switch

Use mcp-drive account (smart mode). If email/alias provided and already linked, switches to it without triggering OAuth. If not linked or no email provided, triggers OAuth browser flow to add account. Returns account email, whether it was newly added, and total account count.

输入参数aliasemail

file-move

Move Files

Move files/folders to destination folder. Returns oldParents for undo. Use "root" for My Drive root.

输入参数fileIds必填returnOldParentsdestinationFolderId必填

file-move-to-trash

Move Files to Trash

Move files to trash (recoverable for 30 days).

输入参数ids必填

file-upload

Upload File

Upload a file to Google Drive from a file:// or http(s):// URI. Content is streamed from the source (no temp files) in a single multipart request. Returns file ID for use in other operations.

输入参数namemimeTypeparentIdsourceUri必填description

folder-contents

List Folder Contents

List files and folders in a specific folder with field selection.

输入参数shapefieldsfolderId必填pageSizepageToken

folder-create

Create Folder

Create a new folder in Google Drive. Returns folder ID for use in other operations.

输入参数name必填parentId

folder-path

Get Folder Path

Get full path from folder to root. Returns human-readable path and items with IDs.

输入参数folderId必填

版本历史

4
  1. v2.4.4最新Oct 25, 2026
  2. v2.4.3Oct 12, 2026
  3. v2.4.2Oct 10, 2026
  4. v2.1.1Sep 16, 2026

评分

已满足适用检查项的 65%

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

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分

    请声明包含 README 的 GitHub 仓库,或在 OAuth 受保护资源元数据中提供 resource_documentation。

  • 许可证10 分

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