Google Drive MCP

io.github.piotr-agier由 GitHub 账号 piotr-agier 发布v2.12.0更新于 Oct 24, 2026

Secure access to Google Drive, Docs, Sheets, Slides, and Calendar through MCP.

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

概览

AI 生成的概览

一个自托管的 MCP 服务器,通过你自己的 Google OAuth 凭据让助手访问 Google Drive、文档、表格、幻灯片和日历。

可以做什么
搜索、整理和管理云端硬盘文件、共享云端硬盘、权限和版本,并可通过可选的资源接口(gdrive:///)读取文件。创建和编辑 Google 文档,包括格式和评论。创建和格式化 Google 表格,并制作 Google 幻灯片演示文稿。创建和管理日历事件,包括 Meet 链接和云端硬盘附件。查看和切换当前 Google 账号,并可按工具选择账号。
适用场景
当你希望助手以自己的 Google 身份在 Google 云端硬盘和 Workspace 编辑器中工作时使用:查找和整理文件、起草文档、表格和幻灯片,或准备会议。它适合个人桌面客户端和自托管团队部署,而非覆盖所有 Workspace API。
运行要求
通过 npx 以 stdio 在本地运行(需要 Node.js)。需要一个启用了 Drive、Docs、Sheets、Slides 和 Calendar API 的 Google Cloud 项目、一个 Desktop app 类型的 OAuth 客户端,并在 GOOGLE_DRIVE_OAUTH_CREDENTIALS 中提供凭据 JSON 路径。需一次性在浏览器中完成授权,令牌保存在本地;也支持服务账号和外部令牌。
安装前请注意
它持有 Google OAuth 凭据和刷新令牌,请保护凭据文件和令牌存储文件,切勿提交到代码库。使用尽可能窄的 OAuth 权限范围。工具可以创建、编辑、移动、共享和删除云端硬盘内容以及更改日历事件,请审慎对待写入操作。团队模式会把成员的刷新令牌存入文件,该文件必须视为机密。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Google Drive MCP Server

[MCP Toplist]

Connect an MCP client to Google Drive, Docs, Sheets, Slides, and Calendar through one self-hosted server. Search and organize files, create and edit Workspace content, manage sharing, and automate multi-step workflows while keeping control of the Google identity and credentials used for every call.

Why this server

  • Drive-first workflows: 130 tools cover file management, Shared Drives, permissions, revisions, rich Docs editing, Sheets formatting, Slides authoring, and Calendar events.
  • Local or hosted: use stdio for a personal desktop client, Streamable HTTP for a hosted integration, or OAuth-protected team mode for a shared service.
  • Identity control: local OAuth supports multiple Google accounts and per-tool account selection; service accounts and externally managed OAuth tokens are also supported.
  • Agent-friendly access: tools expose targeted operations, while the optional gdrive:/// resource interface supports direct reading and discovery.
  • Open and self-hosted: credentials and tokens stay in the environment you operate.

This project remains focused on deep Drive and editor workflows rather than attempting to expose every Google Workspace API.

Client compatibility

Compatibility is determined by the transport and authentication flow a client supports.

Client typeTransportRecommended mode
Claude DesktopstdioLocal OAuth
Other local MCP clients, including Gemini CLIstdioLocal OAuth
claude.ai custom connectorsStreamable HTTPTeam mode
Other remote MCP clientsStreamable HTTPSingle identity behind access control, or team mode with OAuth 2.1

See Client configuration for configuration examples and transport requirements.

Quick start

1. Create Google OAuth credentials

In a Google Cloud project:

  1. Enable the Drive, Docs, Sheets, Slides, and Calendar APIs.
  2. Configure the OAuth consent screen and add your Google account as a test user when the app is in testing.
  3. Create an OAuth client with application type Desktop app.
  4. Download the JSON file and save it as:
text
~/.config/google-drive-mcp/gcp-oauth.keys.json

The setup guide has the complete Google Cloud walkthrough and alternative credential locations.

2. Authenticate

bash
npx -y @piotr-agier/google-drive-mcp auth

Complete the Google consent flow in the browser. Tokens are stored by default at ~/.config/google-drive-mcp/tokens.json.

3. Add the server to your MCP client

For clients that use the common mcpServers configuration shape:

json
{  "mcpServers": {    "google-drive": {      "command": "npx",      "args": ["-y", "@piotr-agier/google-drive-mcp"]    }  }}

Restart the client after saving its configuration. Claude Desktop paths and HTTP examples are documented in Client configuration.

4. Make a first tool call

Ask your client:

text
Run authGetStatus and tell me which Google account is active.

Then try a read-only Drive request:

text
Search my Google Drive for files modified in the last seven days.

If the identity is wrong or search returns no files, use the troubleshooting guide.

What you can do

Organize Drive

text
Find PDF files in /Reports, create an Archive folder there, and move files olderthan one year into it.

Build a report

text
Create a Google Sheet for monthly results, summarize it in a Google Doc, andcreate a short Google Slides presentation from the summary.

Edit a document

text
Find the "Project Plan" document, replace the old launch date, format the newdate in bold, and add a comment describing the change.

Prepare a meeting

text
Create a Calendar event with a Google Meet link and attach the project brieffrom Drive.

Documentation

Every section that used to live in this README is now in one of these guides.

GuideContents
SetupRequirements, Google Cloud APIs, OAuth credentials, and installation
Client configurationSupported transports and client configuration
AuthenticationLocal OAuth, multi-account, service accounts, external tokens, and scopes
ConfigurationCLI flags, environment variables, defaults, and precedence
DeploymentDocker, Streamable HTTP, team mode, and reverse-proxy security
Tool referenceAll Drive, Docs, Sheets, Slides, Calendar, and account tools
TroubleshootingAuthentication, API, identity, Docker, and rate-limit problems
DevelopmentRepository structure, build commands, tests, and contributions

Security

  • Never commit OAuth credentials, service-account keys, access tokens, refresh tokens, or tokens.json.
  • Use the narrowest OAuth scopes that support the tools you need.
  • Keep the default HTTP bind address on 127.0.0.1 unless the server is protected by TLS and access control.
  • Use team mode for shared deployments so every request is authenticated as its caller.
  • Treat team-store.json as a secret because it contains members' Google refresh tokens.

See Authentication and Deployment for the complete security and identity model.

Development and support

See the development guide to build and test the project.

  • Report defects and request features in GitHub Issues.
  • Review released changes in the changelog.
  • Contributions are welcome through pull requests.

License

MIT

Acknowledgments

来源:README.md,提交 26f9b83

工具

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

版本历史

3
  1. v2.12.0最新Sep 25, 2026
  2. v2.11.0Sep 19, 2026
  3. v2.10.0Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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