drive-update-mcp

drive-update-mcp

Enables updating existing Google Drive files in place via Claude, preserving file ID, link, and revision history.

Category
访问服务器

README

drive-update-mcp

A small remote MCP server that gives Claude one capability the built-in Google Drive connector is missing: updating an existing Drive file in place.

When Claude calls update_drive_file, the file keeps the same file ID, the same shareable link, and Drive retains the previous version in its revision history. No duplicates, no broken links.


How it works

Claude (claude.ai / app)  ──►  this MCP server (on Render)  ──►  Google Drive API
                                                                   files.update()  ← overwrites in place
  • Claude connects to the server from Anthropic's cloud using the Streamable HTTP MCP transport.
  • The server authenticates to Google Drive with a service account — no interactive Google login to manage. You grant it access to a file by sharing that file (or its folder) with the service-account's email address.

Tools exposed

Tool What it does
update_drive_file Overwrite an existing file's contents by fileId (in place).
find_files Search by name to resolve a file's fileId.
create_drive_file Create a new file from base64 content (optionally in a folder).
list_revisions Show a file's revision history.

Prerequisites

  • A Google account with Google Drive.
  • A Google Cloud project (free).
  • A Render account (free tier is fine) — or any Node host that gives you an HTTPS URL.
  • A Claude Pro, Max, Team, or Enterprise plan (custom connectors are not on Free).

Setup

Part A — Create the Google service account

  1. Go to the Google Cloud Console → create or pick a project.
  2. APIs & Services → Library → enable the Google Drive API.
  3. IAM & Admin → Service Accounts → Create service account (any name, e.g. drive-updater).
  4. Open the service account → Keys → Add key → Create new key → JSON. A .json file downloads.
  5. Note the service account's email (looks like drive-updater@your-project.iam.gserviceaccount.com).

Part B — Give the service account access to your file

The service account can only touch files that are shared with it.

  • In Google Drive, share the target file (or, easier, the folder that holds it) with the service-account email from step A5, with Editor permission.
  • Do this once per file/folder you want Claude to be able to update.

Tip: keep all the docs Claude manages in one folder and share just that folder.

Part C — Deploy to Render

  1. Push this folder to a GitHub repo (or use Render's "deploy from local" / blueprint).
  2. In Render: New → Web Service → point it at the repo. render.yaml is included, so Render will pick up the build/start commands automatically. Otherwise set:
    • Build command: npm install
    • Start command: npm start
  3. Add two Environment Variables:
    • GOOGLE_SERVICE_ACCOUNT_JSON → paste the entire contents of the JSON key file from Part A4.
    • MCP_AUTH_TOKEN → a long random string you invent (this protects the endpoint).
  4. Deploy. When it's live, confirm https://YOUR-APP.onrender.com/health returns {"ok":true,...}.

Part D — Connect it to Claude

  1. In Claude: Settings → Connectors → "+" → Add custom connector (on Pro/Max you may need to enable connector/developer features first).
  2. Name: Drive Update
  3. URL: https://YOUR-APP.onrender.com/mcp?token=YOUR_MCP_AUTH_TOKEN (the ?token=... is how the server authorises the call — use the same value as MCP_AUTH_TOKEN).
  4. Click Add. Leave the OAuth fields blank.
  5. In a conversation, enable it via the "+" → Connectors toggle.

Using it with Claude

Once connected, the typical flow is:

  1. You ask Claude to make changes to a document it produces.
  2. Claude builds the updated file, then calls find_files (to get the fileId from the name) or you paste the Drive link, and update_drive_file to overwrite it in place.

For the very first upload, the file has to exist in Drive (so it has an ID to update). Either upload it once yourself, or have Claude call create_drive_file once; after that, every change is an in-place update_drive_file.

Note on size: the new content is passed to the tool base64-encoded, so very large files mean large tool calls. For typical Office documents (well under a few MB) this is fine.


Security notes

  • The MCP_AUTH_TOKEN in the URL is what stops anyone else from driving your server. Treat that URL like a password; rotate the token if it leaks.
  • The service account can reach only the files/folders you explicitly shared with it. It cannot see the rest of your Drive.
  • For a hardened setup you can replace the token gate with a full OAuth flow (Claude supports OAuth + Dynamic Client Registration); that's a later upgrade, not needed to start.

Local development

npm install
# put GOOGLE_SERVICE_ACCOUNT_JSON and MCP_AUTH_TOKEN in your shell env (or a .env loader)
npm start
# health check:
curl localhost:3000/health

drive-update-mcp-

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选