@botrun/mcp-google-drive

中文文档
0.2.1发布于 2026/03/18MITTypeScriptES Module近 30 天下载 4690

MCP server for Google Drive - list files, read content from Google Docs/Sheets/Slides

原始使用文档
文档目录12 节
  1. Features
  2. Installation
  3. Setup in Cursor / Claude Desktop
  4. For Public Files Only (No credentials needed)
  5. For Private Files (Requires Service Account)
  6. Getting Service Account Credentials
  7. Available Tools
  8. list-drive-files
  9. get-drive-file-content
  10. Output Format
  11. Environment Variables
  12. License

@botrun/mcp-google-drive

MCP (Model Context Protocol) server for Google Drive integration. List files, read content from Google Docs, Sheets, and Slides.

Features

  • 📁 List Drive Files - List all files in a Google Drive folder
  • 📄 Get File Content - Read content from Google Docs, Sheets, Slides, and other text files
  • 🔓 Public Access - Access public files without credentials
  • 🔐 Private Access - Access private files with Service Account

Installation

npm install -g @botrun/mcp-google-drive

Or use with npx:

npx @botrun/mcp-google-drive

Setup in Cursor / Claude Desktop

Add to your MCP configuration file:

For Public Files Only (No credentials needed)

{
  "mcpServers": {
    "google-drive": {
      "command": "npx",
      "args": ["@botrun/mcp-google-drive"]
    }
  }
}

For Private Files (Requires Service Account)

{
  "mcpServers": {
    "google-drive": {
      "command": "npx",
      "args": ["@botrun/mcp-google-drive"],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/your/credentials.json"
      }
    }
  }
}

Getting Service Account Credentials

  1. Go to Google Cloud Console
  2. Create or select a project
  3. Enable the Google Drive API
  4. Go to Credentials → Create Credentials → Service Account
  5. Create the service account and download the JSON key file
  6. Share your Google Drive folder/files with the service account email

Available Tools

list-drive-files

List all files in a Google Drive folder.

Input:

  • url (required): Google Drive folder URL

Example:

List files in https://drive.google.com/drive/folders/xxxxx

get-drive-file-content

Get the content of a single file.

Input:

  • fileUrl (required): Google Drive file URL or file ID

Supported formats:

  • Google Docs → Plain text
  • Google Sheets → CSV
  • Google Slides → Plain text
  • Other text files → Raw content

Example:

Read content from https://docs.google.com/document/d/xxxxx/edit

Output Format

All responses follow a consistent JSON format:

{
  "isSuccess": true,
  "result": {
    "message": "Description"
    // ... data
  }
}

Environment Variables

VariableRequiredDescription
GOOGLE_APPLICATION_CREDENTIALSNoPath to Service Account JSON key file

License

MIT

版本与发布记录

@botrun/mcp-google-drive 共发布 4 个版本,首次发布于 2026/01/18;过去 12 个月发布了 4 个版本。

版本发布日期距今
0.2.1latest2026/03/187 个月前
0.2.02026/03/177 个月前
0.1.12026/03/177 个月前
0.1.02026/01/189 个月前

关于 @botrun/mcp-google-drive 的常见问题

@botrun/mcp-google-drive 是什么?

MCP server for Google Drive - list files, read content from Google Docs/Sheets/Slides

如何安装 @botrun/mcp-google-drive?

在项目目录运行 npm install @botrun/mcp-google-drive,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 mcp-google-drive,可以用 npx mcp-google-drive 直接运行。

@botrun/mcp-google-drive 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@botrun/mcp-google-drive 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@botrun/mcp-google-drive 可以商用吗?

@botrun/mcp-google-drive 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@botrun/mcp-google-drive 的下载量有多少?

根据 npm 官方下载统计,@botrun/mcp-google-drive 在 2026/10/09 – 2026/11/07 这 30 天内被下载 4,690 次,日均约 156 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@botrun/mcp-google-drive 还在维护吗?

最新版本 0.2.1 发布于 2026/03/18(7 个月前);至今共发布 4 个版本,其中过去 12 个月发布了 4 个;首次发布于 2026/01/18。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。