Google Calendar connection via Google's hosted MCP server - #6
Merged
Conversation
Adds Google's remote Calendar MCP server as a toggleable app. OAuth 2.0 with a pre-registered client (Google does no dynamic registration): a custom provider fixes the redirect URI, injects offline access so a refresh token is issued, and persists tokens on the user's desk DO — consent happens once from My apps, and that user's chats reuse the tokens over DO RPC. The Worker forwards the fixed /oauth/google/callback to the signed-in user's desk. Scopes are read-only (calendar list, events, free/busy), matching PI's never-writes promise, and the system prompt tells the model so. Also removes dev fixture files that slipped into an earlier merge. Claude-Session: https://claude.ai/code/session_01MKLJUWk6biNAKXupHTTWn5
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.
Adds Google Calendar to My apps, backed by Google's remote Calendar MCP server (
calendarmcp.googleapis.com/mcp/v1, streamable HTTP, MCP auth spec verified live).GoogleOAuthProviderpins the exact redirect URI, requestsaccess_type=offline&prompt=consent(else no refresh token), and stores tokens on the user's desk DO. Chats reuse those tokens via DO RPC — consent is once per user, from My apps ("Connect with Google →").calendar.calendarlist.readonly,calendar.events.freebusy,calendar.events.readonly)./oauth/google/callbackforwards to the signed-in user's desk DO, which holds the OAuth state.GOOGLE_OAUTH_CLIENT_ID(var) +GOOGLE_OAUTH_CLIENT_SECRET(secret) from the Google Cloud project before the toggle works; until then the card reports it plainly.https://claude.ai/code/session_01MKLJUWk6biNAKXupHTTWn5