remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Allows listing, reading, and searching over files in Google Drive. Supports all file types with automatic export of Google Workspace files (Docs to Markdown, Sheets to CSV, Presentations to Plain text, Drawings to PNG).
Google Drive 服务器
该 MCP 服务器与 Google Drive 集成,允许列出、读取和搜索文件。
成分
工具
- 搜索
- 在 Google Drive 中搜索文件
- 输入:
query
(字符串):搜索查询 - 返回匹配文件的文件名和 MIME 类型
资源
该服务器提供对 Google Drive 文件的访问:
- 文件(
gdrive:///<file_id>
)- 支持所有文件类型
- Google Workspace 文件会自动导出:
- 文档 → Markdown
- 表格 → CSV
- 演示文稿 → 纯文本
- 图纸 → PNG
- 其他文件以其原始格式提供
入门
- 创建新的 Google Cloud 项目
- 启用 Google Drive API
- 配置 OAuth 同意屏幕(“内部”适合测试)
- 添加 OAuth 范围
https://www.googleapis.com/auth/drive.readonly
- 为应用程序类型“桌面应用程序”创建 OAuth 客户端 ID
- 下载客户端 OAuth 密钥的 JSON 文件
- 将密钥文件重命名为
gcp-oauth.keys.json
并将其放入此 repo 的根目录中(即servers/gcp-oauth.keys.json
)
确保使用npm run build
或npm run watch
构建服务器。
验证
要验证并保存凭据:
- 使用
auth
参数运行服务器:node ./dist auth
- 这将在您的系统浏览器中打开身份验证流程
- 完成身份验证过程
- 凭证将保存在此 repo 的根目录中(即
servers/.gdrive-server-credentials.json
)
与桌面应用程序一起使用
要将此服务器与桌面应用程序集成,请将以下内容添加到应用程序的服务器配置中:
Docker
验证:
假设您已在 Google Cloud 上完成 OAuth 应用程序的设置,您现在可以使用以下命令对服务器进行身份验证,将/path/to/gcp-oauth.keys.json
替换为您的 OAuth 密钥文件的路径:
该命令将打印出一个 URL,供您在浏览器中打开。在浏览器中打开此 URL 并完成身份验证过程。凭据将保存在mcp-gdrive
卷中。
一旦通过身份验证,您就可以在应用程序的服务器配置中使用该服务器:
NPX
执照
此 MCP 服务器采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目仓库中的 LICENSE 文件。
This server cannot be installed
该 MCP 服务器与 Google Drive 集成,允许列出、读取和搜索文件。