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 分

    請在儲存庫或註冊中心條目中宣告授權條款。