MCP.so
登录
G

Google Drive MCP Server (Official)

@googleworkspace

基本信息

传输方式

streamable-http

认证方式

OAuth

分类

生产力

作者

googleworkspace

关于 Google Drive MCP Server (Official)

Google 在 https://drivemcp.googleapis.com/mcp/v1 托管了官方的 Google Drive 远程 MCP 服务器,使用 Streamable HTTP 和 OAuth 2.0。Claude 和 Google Antigravity 等 AI 智能体可以搜索文件、读取内容和元数据、创建和复制文件以及下载内容,权限与登录用户自己的 Drive 权限一致。它通过 Google Workspace Developer Preview Program 提供。

连接信息

https://drivemcp.googleapis.com/mcp/v1

接入方式

claude mcp add drive --transport http https://drivemcp.googleapis.com/mcp/v1

Google Drive MCP Server 工具

8

Call this tool to copy an existing File in Google Drive. The tool allows specifying a new title and a parent folder for the copy. If the title is not specified, the copy title will be 'Copy of {original title}'. If the parent folder is not specified, the copy will be created in the same folder as the original file, unless the requesting user does not have write access to that folder, in which case the copy will be created in the user's root folder.Returns the newly created File object upon successful copying.

Call this tool to create or upload a File to Google Drive. If uploading content, prefer `textContent` for text content. For non-UTF8 contents, use the `base64Content` field and base64 encode the data to set on that field. Returns a single File object upon successful creation. The following Google first-party mime types can be created without providing content: - `application/vnd.google-apps.document` - `application/vnd.google-apps.spreadsheet` - `application/vnd.google-apps.presentation` Folders can be created by setting the mime type to `application/vnd.google-apps.folder`. When uploading content, the `contentMimeType` field is required and should match the type of the content being uploaded. By default, supported content will be converted to Google first-party mime types. To disable conversions for first-party mime types, set `disableConversionToGoogleType` to true.

Call this tool to download the content of a Drive file as a base64 encoded string. If the file is a Google Drive first-party mime type, the `exportMimeType` field specifies the desired export mime type. When the field is unset, defaults to plain text types (e.g. `text/plain`, `text/csv`). If the file is not found, try using other tools like `search_files` to find the file the user is requesting. If the user wants a natural language representation of their Drive content, use the `read_file_content` tool (`read_file_content` should be smaller and easier to parse).

Call this tool to find general metadata about a user's Drive file. Context window token management can be tuned via `snippetVerbosity` (default is `SnippetVerbosity.DETAILED`) or if only metadata is needed, use `excludeContentSnippets`. If the file is not found, try using other tools like `search_files` to find the file the user is requesting.

Call this tool to list the permissions of a Drive File.

Call this tool to find recent files for a user specified a sort order. Default sort order is `recency` if orderBy is not set or set to an unsupported value. Context window token management can be tuned via `snippetVerbosity` (default is `SnippetVerbosity.DETAILED`) or if only metadata is needed, use `excludeContentSnippets`. Supported sort orders are: - `recency`: The most recent timestamp from the file's date-time fields. - `lastModified`: The last time the file was modified by anyone. - `lastModifiedByMe`: The last time the file was modified by the user. The default page size is 10. Utilize `next_page_token` to paginate through the results.

Call this tool to fetch a natural language representation of a known Drive file, and if specified, its comments. REQUIREMENTS & WORKFLOW: - `fileId` is required. You MUST pass an exact Drive file ID returned by a previous discovery tool (`search_files` or `list_recent_files`) or provided explicitly in the user prompt. - NEVER guess, invent, or hallucinate a `fileId` string from a file title or name. - If given a file title, name, or topic without an explicit `fileId`, you MUST FIRST call `search_files` to find the file and retrieve its `fileId` before invoking this tool. The file content may be incomplete for very large files. The text representation will change over time, so don't make assumptions about the particular format of the text returned by this tool. If supported and specified, comment tags will be included in the content. Supported Mime Types: - `application/vnd.google-apps.document` (supports comments) - `application/vnd.google-apps.presentation` (supports comments) - `application/vnd.google-apps.spreadsheet` (supports comments) - `application/pdf` - `application/msword` - `application/vnd.openxmlformats-officedocument.wordprocessingml.document` - `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` - `application/vnd.openxmlformats-officedocument.presentationml.presentation` - `application/vnd.oasis.opendocument.spreadsheet` - `application/vnd.oasis.opendocument.presentation` - `application/x-vnd.oasis.opendocument.text` - `image/png` - `image/jpeg` - `image/jpg` If the file is not found, try using other tools like `search_files` to find the file the user is requesting using keywords.

Search for Drive files using a structured query (syntax: `query_term operator values`). Only terms in this list are supported. Combine clauses with `and`, `or`, `not`, and parentheses. String values must be single-quoted; escape embedded quotes as `\'`. Context window token management can be tuned via `snippetVerbosity` (default is `SnippetVerbosity.DETAILED`) or if only metadata is needed, use `excludeContentSnippets`. Do NOT include document type terms (e.g., 'presentation', 'slides', 'deck', 'document', 'doc', 'spreadsheet', 'sheet', 'pdf', 'folder') inside `title contains '...'` or `fullText contains '...'` clauses. Separate title keywords from file type terms. Instead map them to `mimeType` clauses in the query (e.g., 'slides' -> `mimeType = 'application/vnd.google-apps.presentation'`). Query terms & operators: - `title` (ops: contains, =, !=) — file title - `fullText` (ops: contains) — title or body text - `mimeType` (ops: contains, =, !=) — MIME type - `modifiedTime`, `viewedByMeTime`, `createdTime` (ops: `<=`, `<`, `=`, `!=`, `>`, `>=`). Use RFC 3339 UTC, e.g., `2012-06-04T12:00:00-08:00`. Date types not comparable. - `parentId` (ops: `=`, `!=`). Use `'root'` for the user's "My Drive". - `owner` (ops: `=`, `!=`). Use `'me'` for the requesting user. - `sharedWithMe` (ops: `=`, `!=`). Values: `true` or `false`. - `starred` (ops: `=`, `!=`). Values: `true` or `false`. - `folderProperties` (ops: `in`): `'syncedComputer'` (synced computer), `'syncFolder'` (synced folder). Other operators: `and`, `or`, `not`, `in`. Examples: - `title contains 'hello' and title contains 'goodbye'` - `modifiedTime > '2024-01-01T00:00:00Z' and (mimeType contains 'image/' or mimeType contains 'video/')` - `parentId = '1234567'` - `fullText contains 'hello'` - `owner = 'test@example.org'` - `sharedWithMe = true` - `starred = true` - `owner = 'me'` (for files owned by the user) Use `next_page_token` to paginate. Duplicate results can occur across page boundaries. An empty response means no more results.

概览

什么是 Google Drive MCP Server (Official)?

Google Drive MCP Server (Official) 是 Google 托管的 Google Drive MCP 服务器,地址为 https://drivemcp.googleapis.com/mcp/v1。它让 AI 智能体以你自己的权限搜索、读取、创建、复制和下载 Drive 文件。目前处于 Developer Preview 阶段。

这是一个远程服务器,本地无需运行任何程序,使用 Streamable HTTP 协议和 OAuth 2.0 认证。目前需要加入 Google Workspace Developer Preview Program 才能使用。配置方法和工具列表见 Google 的指南 Configure the Drive MCP server。较早的开源参考服务器仍以 Google Drive MCP Server 收录在 mcp.so 上,但已归档。

如何使用 Google Drive MCP Server (Official)?

前提条件:已加入 Developer Preview,有一个 Google Cloud 项目;如果要运行下面的命令,还需要 gcloud CLI。不需要 API Key,认证使用你创建的 OAuth 客户端。

  1. 在项目中启用 Drive API 和 Drive MCP 服务:
gcloud services enable drive.googleapis.com --project=PROJECT_ID
gcloud services enable drivemcp.googleapis.com --project=PROJECT_ID
  1. 在 Google Auth Platform > Branding 中配置 OAuth 同意屏幕。能选 Internal 就选 Internal;否则选 External,并把自己加为测试用户。在 Data Access 中添加以下 scope:
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/drive.file
  1. 在 Google Auth Platform > Clients > Create Client 中创建 OAuth 客户端:类型选 Web application,添加对应客户端的重定向 URI(见下文),并勾选 Use this client for an AI-powered agent。然后复制客户端 ID 和密钥。

Claude Desktop

Claude.ai 和 Claude Desktop 的自定义连接器需要 Pro、Max、Team 或 Enterprise 套餐。OAuth 重定向 URI 使用 https://claude.ai/api/mcp/auth_callback。然后进入 Settings(或 Admin settings)> Connectors > Add custom connector,填写:

  • Server name:Google Drive
  • Remote MCP server URL:https://drivemcp.googleapis.com/mcp/v1
  • Advanced settings:你的 OAuth 客户端 ID 和客户端密钥

Antigravity

重定向 URI 使用 https://antigravity.google/oauth-callback。把以下内容添加到 ~/.gemini/config/mcp_config.json,然后打开 MCP 设置(Antigravity CLI 中使用 /mcp)并选择 Authenticate:

{
  "mcpServers": {
    "drive": {
      "serverUrl": "https://drivemcp.googleapis.com/mcp/v1",
      "oauth": {
        "clientId": "${OAUTH_CLIENT_ID}",
        "clientSecret": "${OAUTH_CLIENT_SECRET}"
      }
    }
  }
}

其他客户端(Claude Code、Cursor、VS Code)

Google 没有为这些客户端提供专门的步骤。它的通用参数适用于任何支持 OAuth 远程服务器的客户端:服务器名 drive,URL https://drivemcp.googleapis.com/mcp/v1,传输方式 Streamable HTTP,认证方式 OAuth 2.0。客户端必须能使用你预先创建的客户端 ID 和密钥,并且要把该客户端自己的回调 URL 注册为重定向 URI。

测试连接时可以提问:“Summarize the file Marketing Plan.” 客户端应先调用 search_files,再调用 read_file_content。

Google Drive MCP Server (Official) 的主要功能

  • 由 Google 运营,无需安装、托管或更新
  • 远程 Streamable HTTP 端点,使用 OAuth 2.0 认证
  • 沿用登录用户原有的权限和数据治理控制
  • 支持在 Drive 中进行全文和结构化搜索,并能列出最近的文件
  • 以自然语言文本读取 Docs、Sheets 等文件,可选包含评论
  • 可创建文件和文件夹(包括 Google Docs、Sheets 和 Slides)、上传内容、复制文件
  • OAuth scope 范围很窄:drive.readonly 加 drive.file
  • 没有删除、移入回收站或共享文件的工具

Google Drive MCP Server (Official) 工具

服务器在唯一的 /mcp/v1 工具集中提供八个工具。

  • 查找文件:search_files 执行结构化查询,例如按标题、全文或 MIME 类型;list_recent_files 可按最近活动、最后修改时间或你本人最后修改时间排序。
  • 读取文件:read_file_content 返回文件的文本形式,可附带评论;download_file_content 以 base64 返回原始内容,Google 文件可指定导出 MIME 类型;get_file_metadata 和 get_file_permissions 显示文件详情和访问权限。
  • 写入文件:create_file 创建或上传文件和文件夹;copy_file 复制文件,可指定新标题和父文件夹。

Google Drive MCP Server (Official) 的使用场景

  • 总结文档:“总结 Marketing Plan 文件并列出待解决的问题。”
  • 查找信息:“找出我这周编辑过的有关 Q3 预算的表格。”
  • 在 Drive 中起草:“在我的 Projects 文件夹里新建一个名为 Meeting Notes 的 Google Doc,写入这些要点。”
  • 使用模板:“复制 Proposal Template,并命名为 Acme Proposal。”
  • 权限检查:“谁有 Roadmap 文件的访问权限?”
  • 智能体流程:智能体可以把 Drive 内容提供给其他工具,每一步操作都由你审核。

Google Drive MCP Server (Official) 与替代方案对比

已归档的参考版 Google Drive MCP Server 在本地运行,只读(只有一个 search 工具),npm 包已弃用。Google Workspace MCP 等社区服务器除 Drive 外还覆盖 Gmail、Calendar、Docs 和 Sheets,而且不需要加入 Developer Preview,但需要自行托管,由第三方维护。如果你能加入预览计划,官方 Google Drive MCP 服务器是一个有官方支持的托管选择。

Google Drive MCP Server (Official) 常见问题排查

  • 请求被拒绝:OAuth 客户端必须勾选 Use this client for an AI-powered agent。如果现有客户端无法修改这一项,就单独为智能体新建一个客户端。
  • 大约每小时都要重新登录:客户端没有拿到 refresh token。如果客户端支持自定义授权参数,在授权请求中添加 access_type=offline(要重新获取时再加 prompt=consent)。
  • 连接出错:请管理员在安全调查工具中查看 OAuth 日志事件。
  • 找不到服务或访问被拒:确认已启用 drivemcp.googleapis.com 和 drive.googleapis.com,并且你的账号已加入 Developer Preview Program。

常见问题

1

有官方的 Google Drive MCP 服务器吗?

有。Google 在 `https://drivemcp.googleapis.com/mcp/v1` 托管了一个,通过 Google Workspace Developer Preview Program 提供。

2

Google Drive MCP 服务器免费吗?

Google 文档没有列出单独的价格。你需要一个 Google Cloud 项目、Developer Preview 资格和一个 MCP 客户端。Claude 的自定义连接器需要付费的 Claude 套餐。

3

需要 API Key 吗?

不需要。它使用 OAuth 2.0,客户端 ID 和密钥在 Google Auth Platform 中创建,请求以登录用户的身份执行。

4

能在 Claude Code、Cursor 或 VS Code 中使用吗?

Google 只介绍了 Antigravity 和 Claude.ai/Claude Desktop 的配置方法。其他客户端只要支持预先注册的 OAuth 客户端,就可以用通用的 Streamable HTTP 和 OAuth 参数连接。

5

它能编辑或删除我的文件吗?

它可以创建和复制文件,但文档中的工具不包括删除、移入回收站或共享。Google 仍然提醒,已连接的主机可以修改数据,所以请审核每一步操作。

6

连接我的 Drive 安全吗?

它遵循你现有的 Drive 权限。Google 提醒要防范来自不可信文档的间接提示注入,建议使用 Model Armor 或你自己的筛查方案。

7

@modelcontextprotocol/server-gdrive 怎么样了?

这个参考服务器已经归档,npm 包也已弃用。它在 mcp.so 上的页面 `/servers/gdrive` 仍保留,供现有用户参考。

8

Google Drive MCP 服务器正式发布了吗?

还没有。截至 2026 年 10 月,Google 将其标记为 Developer Preview。

9

Google Drive MCP server 远程 MCP 服务器是什么?

Google Drive MCP server 的远程 MCP 服务器是一个托管的 Model Context Protocol 端点,地址是 https://drivemcp.googleapis.com/mcp/v1,AI 助手无需在本地安装或运行任何东西即可连接。

10

怎么连接 Google Drive MCP server 的 MCP 服务器?

把端点 https://drivemcp.googleapis.com/mcp/v1 添加到任意支持 MCP 的客户端,比如 Claude Code、Cursor 或 VS Code。本页的接入代码块可以一步配置好每个客户端。

11

Google Drive MCP server 的 MCP 服务器需要认证吗?

需要。Google Drive MCP server 使用 OAuth——第一次连接时,你的 MCP 客户端会打开浏览器窗口登录并授权,之后会复用这个凭证。

12

Google Drive MCP server 的 MCP 服务器用的是哪种传输方式?

Google Drive MCP server 暴露的是 streamable-http 端点,这是远程 MCP 服务器普遍使用、主流客户端都支持的传输方式。

评论