Skip to main content
Glama
saydurrahman-ORCA

orca-drive-sa-mcp

ORCA Drive SA MCP

一个模型上下文协议(MCP)服务器,通过 Streamable HTTP 暴露 Google Drive 文件夹,并部署为 Vercel serverless 函数。

它通过 Google 服务账号(Drive API v3,只读作用域)读取 Google Drive,因此无需 Apps Script Web 应用。

工具

工具

描述

list_files

列出文件夹中的文件(默认为 DRIVE_FOLDER_ID)

search_files

按名称子串搜索文件

get_file

按 ID 获取单个文件的元数据

read_file

读取文件的文本内容(JSON、CSV、TXT 等)

Related MCP server: Google Drive MCP Server

1. 创建 Google 服务账号

  1. 前往 https://console.cloud.google.com 并创建(或选择一个)项目。

  2. 启用 Google Drive API(APIs & Services → Library → "Google Drive API")。

  3. 创建服务账号:

    • APIs & Services → Credentials → Create credentials → Service account。

    • 为其命名,点击 Create and continue,然后点击 Done。

  4. 生成密钥:

    • 打开服务账号 → Keys → Add key → Create new key → JSON。

    • 下载 JSON 密钥文件。

  5. 复制服务账号邮箱(例如 orca-drive@my-project.iam.gserviceaccount.com)。

  6. 将目标 Drive 文件夹共享给该邮箱(在 Drive 中右键单击文件夹 → Share → 粘贴该邮箱 → Viewer)。

只有与服务账号共享的文件/文件夹才能被访问。

2. 配置环境变量

将 .env.example 复制为 .env(本地开发),并在 Vercel(Project > Settings > Environment Variables)中设置相同的值:

变量

描述

GOOGLE_SERVICE_ACCOUNT_JSON

完整的 JSON 密钥内容(单行)

GOOGLE_SERVICE_ACCOUNT_JSON_ENCODED

如果 JSON 值是 base64 编码,则设置为 base64

DRIVE_FOLDER_ID

要列出的默认文件夹 ID

3. 本地运行

npm install
vercel dev

使用 MCP Inspector(npx @modelcontextprotocol/inspector)并通过传输方式 Streamable HTTP 和 URL http://localhost:3000/ 进行测试。

4. 部署到 Vercel

vercel --prod

你的端点将是 https://<project>.vercel.app/。

5. 连接客户端

Claude Desktop(claude_desktop_config.json):

{
  "mcpServers": {
    "orca-drive-sa": {
      "type": "http",
      "url": "https://<project>.vercel.app/"
    }
  }
}

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables interaction with Google Drive through the Google Cloud API. It allows users to list, read, and upload files directly from MCP-compatible clients like manus.im or Cursor.
    -
  • A
    license
    A
    quality
    D
    maintenance
    A local MCP server that enables LLMs to securely search and read files within designated Google Drive folders. Supports Google Docs, Google Sheets, PDFs, and plain text with strict folder-scoping via service account authentication.
    4
    MIT