feat(google-workspace): bundle our REST-based Google MCPs (8 services, 162 tools)#422
Open
JonasJesus42 wants to merge 1 commit intomainfrom
Open
feat(google-workspace): bundle our REST-based Google MCPs (8 services, 162 tools)#422JonasJesus42 wants to merge 1 commit intomainfrom
JonasJesus42 wants to merge 1 commit intomainfrom
Conversation
…, 162 tools)
Replaces the previous implementation that proxied Google's official MCP
servers (Calendar/Chat/Drive/Gmail/People) — that approach was blocked
because Google's MCP endpoints don't support Dynamic Client Registration
and our requested 26-scope union ran into OAuth-consent-screen
configuration drift, leaving most services with "caller does not have
permission" errors.
The new google-workspace composes the existing per-service Google MCPs
already shipping in this monorepo:
google-calendar/tools → calendar_* (20 tools)
google-gmail/tools (basic) → gmail_* (26 tools)
google-drive/tools → drive_* (15 tools)
google-docs/tools → docs_* (13 tools)
google-sheets/tools → sheets_* (55 tools)
google-slides/tools → slides_* (12 tools)
google-forms/tools → forms_* (9 tools)
google-meet/tools → meet_* (12 tools)
A small `prefix-tool.ts` helper clones each child tool factory's output
with a service-prefixed id so collisions across services are resolved
without modifying the upstream packages. `createGoogleOAuth` runs the
PKCE flow with the union of scopes from all eight services.
Chat and People are intentionally dropped — their Google official MCPs
require additional OAuth consent-screen verification we haven't
completed. They'll come back in a separate `google-workspace-official`
MCP that wraps the upstream Google endpoints once verification lands.
Side changes to enable the composition:
- google-gmail/.../tools/index.ts: split the existing tools array into
basicTools (no webhook triggers) + tools (with triggers). Workspace
imports basicTools because it doesn't have the Workers KV binding the
trigger machinery requires.
- google-{gmail,drive,docs,sheets,slides,forms,meet}/package.json: add
./tools and ./constants exports so workspace can import them.
Removed (no longer needed):
- google-workspace/server/lib/{mcp-proxy,json-schema-to-zod,wrap-tool}.ts
- google-workspace/server/scripts/generate-tools.ts
- google-workspace/server/tools/generated/*.json
Prompts updated: drop chat/people guides, add per-service guides for
Docs/Sheets/Slides/Forms/Meet, plus user templates for new-deck and
form-from-questions.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the previous
google-workspaceimplementation that proxied Google's official MCP servers (Calendar/Chat/Drive/Gmail/People) with a bundle of our existing per-service REST-based Google MCPs. Brings Workspace from 5 services to 8 while dropping the OAuth-consent-screen issues that left most tools returning 403.Why
Live testing of the official-MCP wrapper hit "caller does not have permission" on 4 of 5 services. The fundamental issue: Google's MCPs don't support Dynamic Client Registration, and the 26-scope union we requested didn't match what was actually configured on the OAuth client's consent screen — Google silently dropped the rest.
Our existing standalone Google MCPs (
google-calendar,google-gmail, etc.) already work in production with their REST API integrations. Composing them gives us the "1 login for everything" UX that motivatedgoogle-workspacein the first place, with no proxy layer in the way.What's in the bundle now
calendar_*google-calendargmail_*google-gmail(basicTools only — no webhook triggers)drive_*google-drivedocs_*google-docssheets_*google-sheetsslides_*google-slidesforms_*google-formsmeet_*google-meetTotal: 162 tools, 1 OAuth login.
What got dropped
google-workspace-officialMCP that wraps the upstream Google endpoints once verification lands.Implementation
The composition is a small helper:
Each child MCP's
toolsisArray<(env) => Tool>. We invoke the factory with workspace'senv(structurally compatible — every Google MCP just readsMESH_REQUEST_CONTEXT.authorization) and clone the result with a prefixed id.Side changes to make composition possible
google-gmail/server/tools/index.ts— split the existing tools array intobasicTools(no webhook triggers) +tools(with triggers). Workspace importsbasicToolsbecause it doesn't have the Workers KV binding the trigger machinery requires.google-{gmail,drive,docs,sheets,slides,forms,meet}/package.json— add./toolsand./constantsexports so workspace can import them.Removed (no longer needed)
google-workspace/server/lib/{mcp-proxy,json-schema-to-zod,wrap-tool}.tsgoogle-workspace/server/scripts/generate-tools.tsgoogle-workspace/server/tools/generated/*.jsonPrompts updated
Per-service agent guides now cover Docs/Sheets/Slides/Forms/Meet (Chat/People removed). Two new user templates:
new_deck_from_outlineandcreate_formandcreate_meet_for_event.Test plan
bun scripts/check.tson all 9 affected MCPs — all passbun run buildsucceeds (2.45 MB / 513 modules)tools/listreturns 162 tools across 8 prefixed namespacesBackwards compatibility
The MCP keeps its name (
google-workspace) and connection URL (sites-google-workspace.decocache.com/mcp). Existing installs continue to work after re-authentication (different scope set). Tool ids change shape — agents using prior Chat/People tools will need to switch to the standalone Chat/People MCPs (or wait forgoogle-workspace-official).🤖 Generated with Claude Code
Summary by cubic
Replaces the proxy to Google’s official MCPs with a bundled set of our REST-based Google MCPs. Expands
google-workspaceto 8 services and 162 tools under one OAuth login while removing the consent-screen issues that caused 403s.New Features
google-calendar,google-gmail(basic tools),google-drive,google-docs,google-sheets,google-slides,google-forms,google-meet→ 162 toolscalendar_*,gmail_*,drive_*,docs_*,sheets_*,slides_*,forms_*,meet_*Migration
google-workspaceconnections (scope set changed)google-workspace-officialWritten for commit c201ba8. Summary will update on new commits.