Skip to content

ljchang/google-docs-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

google-docs-plugin

A small Claude Code plugin marketplace that adds in-place Google Docs editing + name search to Claude Code, via the google-drive-mcp server run with service-account authentication and least-privilege scopes.

Built because Anthropic's first-party Google Drive connector is read/create only (it can't edit an existing Doc's body). This plugin closes that gap.

  • Marketplace: ljchang-tools → plugin google-docs
  • Server: npx @piotr-agier/google-drive-mcp@2.2.0 (no local build needed)
  • Scopes (least privilege): documents (edit Docs by ID) + drive.file (create/open) + drive.metadata.readonly (find Docs by name only, not contents)
  • Auth: service account (no browser/OAuth-consent flow)

⚠️ No secrets live in this repo. The service-account key is a credential you keep locally at ~/.config/google-drive-mcp/service-account.json (the .mcp.json references it via ${HOME} expansion). Key/token files are .gitignored — never commit them.

Layout

.claude-plugin/marketplace.json     # marketplace catalog
google-docs/
├── .claude-plugin/plugin.json      # plugin manifest
└── .mcp.json                       # bundled MCP server (service-account mode)

Requirements

  • Claude Code, and Node.js (for npx to fetch/run the server).

Service-account setup (one time)

  1. Google Cloud Console → create/pick a project → enable Google Docs API and Google Drive API.
  2. IAM & Admin → Service Accounts → create one → Keys → Add key → JSON → download. Save it at ~/.config/google-drive-mcp/service-account.json (chmod 600).
  3. Copy the service account's email (…@<project>.iam.gserviceaccount.com).
  4. Share each Google Doc you want to edit with that email (Editor). The service account acts as itself — no Workspace admin / domain-wide delegation, no browser consent. Edits show as authored by the service account.

New docs the service account creates land in its Drive, so this is for editing docs you share with it. For "create as you", use OAuth mode instead (set GOOGLE_DRIVE_OAUTH_CREDENTIALS + GOOGLE_DRIVE_MCP_TOKEN_PATH in .mcp.json and run the server's auth command once).

Install + use (per session)

/plugin marketplace add ljchang/google-docs-plugin
/plugin install google-docs@ljchang-tools

Toggle per session with /plugin (enable/disable); check status with /mcp; /reload-plugins picks up changes. The server only runs while the plugin is enabled.

Optional: pinned local build (instead of npx)

For an auditable, version-pinned server, clone + build it and point .mcp.json at the local entry instead of npx:

git clone https://github.com/piotr-agier/google-drive-mcp ~/Github/google-drive-mcp
cd ~/Github/google-drive-mcp && npm install   # builds dist/index.js
"command": "node",
"args": ["${HOME}/Github/google-drive-mcp/dist/index.js"]

Security

  • Credentials stay local (only your machine ⇄ Google). The model sees document contents it reads/edits (as with any Docs work), never your key.
  • The service account can only touch Docs explicitly shared with it.

License: MIT (this plugin wrapper). Bundled server: piotr-agier/google-drive-mcp, MIT.

About

Claude Code plugin: in-place Google Docs editing + name search via google-drive-mcp (service-account auth, least-privilege scopes)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors