feat(google-workspace): one OAuth login fanning out to 5 official Google MCP servers#418
Merged
Merged
Conversation
…gle MCP servers Adds a new MCP that holds the Google OAuth client credentials server-side and proxies JSON-RPC tools/call to the official Google MCP endpoints (calendarmcp, chatmcp, drivemcp, gmailmcp, people). After a single consent screen with all required scopes, ~33 tools become available under prefixes calendar_*, chat_*, drive_*, gmail_*, people_*. - Reuses createGoogleOAuth from @decocms/mcps-shared (PKCE + refresh). - generate-tools script snapshots tools/list and PRM scopes_supported from each backend; runtime reads the snapshots, converts JSON Schema to Zod via a small inline converter, and registers each tool through createPrivateTool. - Dedupes duplicate entries returned by Google's chat backend. Adding a new Google service later is two lines in constants.ts plus a re-run of generate-tools. Existing users get a re-consent prompt only for the new scopes. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The README explains how the snapshot pattern works and makes the `bun run generate-tools` requirement explicit — every time Google updates one of their MCP servers, the snapshot must be refreshed and committed. The generator now also produces TOOLS.md alongside the JSON snapshots, so the full tool catalog is visible from GitHub and the registry without having to boot the server. Both Google's `tools/list` and the RFC 9728 PRM endpoint are reachable without auth, so this preview costs nothing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CI's TS version flags `baseUrl` as deprecated. The block also declared a `server/*` alias we never used — every import inside the package is already relative — so the cleanest fix is to remove the block entirely rather than adding `ignoreDeprecations`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This MCP wraps Google's own official MCP servers (calendarmcp/chatmcp/drivemcp/gmailmcp/people.googleapis.com), so the "official" badge in the registry is warranted. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
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
google-workspaceproxies JSON-RPCtools/callto Google's official MCP endpoints (calendarmcp.googleapis.com,chatmcp...,drivemcp...,gmailmcp...,people.googleapis.com).calendar_*,chat_*,drive_*,gmail_*,people_*. Adding a 6th Google service later is a 2-line change inconstants.tsplusbun run generate-tools.Why not connect Google's MCPs directly to mesh?
The official Google MCP endpoints don't support Dynamic Client Registration (RFC 7591) and require
client_secret_post, while mesh's currentMcpOAuthProvideris a public PKCE client that relies on DCR. Wrapping them in our own MCP keeps the BYOC flow and secrets server-side, with zero mesh changes.How it works
server/scripts/generate-tools.tsfetchestools/listand PRMscopes_supportedfrom each backend (no auth needed for these endpoints) and writes snapshots toserver/tools/generated/<service>.json. Snapshots are committed for reproducible builds.server/lib/json-schema-to-zod.ts), and registers each tool throughcreatePrivateTool.tools/call, the wrapper proxies JSON-RPC to the upstream backend with the user's Bearer token (server/lib/mcp-proxy.ts).@decocms/mcps-shared/google-oauth— PKCE with refresh-token rotation handled by the existing helper.Test plan
GOOGLE_CLIENT_ID/GOOGLE_CLIENT_SECRETfor the deployed instance (Web client with redirect URI forsites-google-workspace.decocache.com).calendar_list_eventswith{ calendarId: "primary" }gmail_list_messageswith{ maxResults: 5 }drive_list_filespeople_list_directory_peoplechat_list_spacesexpires_atin the past and confirm refresh works transparently.proxyMcpCall.Notes
chatmcpreturns duplicate entries (list_messages,search_conversations) intools/list; we dedupe by prefixed name inserver/tools/index.ts.bun run generate-toolsis the one command needed to refresh tool definitions when Google updates their MCPs. CI could later run it and fail on diff.🤖 Generated with Claude Code
Summary by cubic
Adds a new
google-workspaceMCP that uses one OAuth login to fan out to Google’s official MCP servers (Calendar, Chat, Drive, Gmail, People), exposing ~33 prefixed tools and keeping Google credentials server-side. Marks the app as official in the registry and removes deprecatedbaseUrl/pathsfromtsconfigto quiet CI.New Features
tools/calltocalendarmcp.googleapis.com,chatmcp.googleapis.com,drivemcp.googleapis.com,gmailmcp.googleapis.com, andpeople.googleapis.com.@decocms/mcps-shared/google-oauth(PKCE + refresh) with merged scopes across all services.createPrivateTool, duplicates from Chat MCP deduped; extend viaconstants.ts+bun run generate-tools.README.mdand auto-generatedTOOLS.md; generator writes the catalog using unauthenticatedtools/listand RFC 9728 PRM scopes.officialinapp.jsonto show the official badge.Migration
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETfor the deployedgoogle-workspacesite.google-workspaceapp and authenticate once to grant Calendar, Chat, Drive, Gmail, and People scopes.Written for commit 9bbce94. Summary will update on new commits.