Google Calendar MCP OAuth Proxy
Provides OAuth-authenticated access to Google Calendar through the official Google Calendar MCP, allowing MCP clients to interact with calendar data such as calendars, events, and free/busy availability.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Calendar MCP OAuth ProxyWhat meetings do I have tomorrow?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Calendar MCP OAuth Proxy
This Worker acts as the OAuth boundary between an MCP client such as Codex and Google's official Calendar MCP.
Codex / MCP client
|
| OAuth to this Worker
v
Cloudflare OAuth Provider
|
| Google OAuth (client ID + client secret)
v
Google OAuth
|
| Google access token
v
Google Calendar MCP
https://calendarmcp.googleapis.com/mcp/v1The client never receives the Google OAuth client secret. Google access and refresh tokens are stored in the encrypted OAuth grant props managed by the Cloudflare OAuth provider. The protected /mcp handler replaces the client's local bearer token with the user's Google access token before forwarding MCP traffic upstream.
Google scopes
wrangler.jsonc defines the Google Calendar scopes in GOOGLE_OAUTH_SCOPES:
https://www.googleapis.com/auth/calendar.calendarlist.readonly
https://www.googleapis.com/auth/calendar.events.freebusy
https://www.googleapis.com/auth/calendar.events.readonly
https://www.googleapis.com/auth/calendar.calendarsThe Worker automatically adds email profile because the callback uses Google's user-info endpoint to identify the authorized user.
The Google authorization request also uses access_type=offline and prompt=consent so Google returns a refresh token.
Related MCP server: google-mcp-server
Local secrets
Copy the example file:
cp .dev.vars.example .dev.varsSet:
GOOGLE_CLIENT_ID=<Google OAuth web client ID>
GOOGLE_CLIENT_SECRET=<Google OAuth client secret>
COOKIE_ENCRYPTION_KEY=<strong random secret>
HOSTED_DOMAIN=<optional Google Workspace domain restriction>GOOGLE_OAUTH_SCOPES and GOOGLE_MCP_URL are non-secret Worker variables in wrangler.jsonc.
Google Cloud OAuth client
Use a Google OAuth Web application client.
The authorized redirect URI must be the public hostname of this Worker or tunnel plus /callback:
https://mcp-auth.example.com/callbackAdd the Calendar scopes listed above to the Google Auth Platform consent/data-access configuration.
Run locally
Install dependencies and generate Worker types:
npm install
npm run cf-typegenStart Wrangler locally on port 5555:
npm run devThe local endpoint is:
http://localhost:5555/mcpOAuth requires a public HTTPS callback, so for end-to-end local testing use a Cloudflare Tunnel.
Stable named tunnel
A stable hostname is preferable because the same callback must be registered in Google Cloud.
npx wrangler dev --tunnel-name=mcp-google-auth --tunnelConfigure the named tunnel hostname to route to the Wrangler development server. For example:
https://mcp-auth.example.com -> local Wrangler dev serverThen register:
https://mcp-auth.example.com/callbackas the Google OAuth redirect URI.
The MCP URL exposed to Codex is:
https://mcp-auth.example.com/mcpCodex configuration
Because this Worker is the OAuth authorization server seen by Codex, Codex does not need the Google client ID or Google client secret.
[mcp_servers.google_calendar_proxy]
enabled = true
url = "https://mcp-auth.example.com/mcp"
auth = "oauth"Then authenticate:
codex mcp login google_calendar_proxyThe expected flow is:
Codex discovers this Worker's OAuth endpoints.
Codex registers/authenticates with this Worker.
The Worker sends the browser to Google.
Google returns to
/callbackon the Worker/tunnel.The Worker exchanges Google's authorization code using
GOOGLE_CLIENT_SECRET.Codex receives a Worker-issued OAuth token.
Calls to
/mcpare forwarded to Google's official Calendar MCP using the user's Google access token.
Token refresh behavior
Google's refresh token is retained in encrypted OAuth grant props. The proxy keeps a bounded, isolate-local LRU cache of Google access tokens, removes entries when they reach the refresh window, and caps the cache at 100 users. If the stored access token is expired, or Google's MCP returns 401, the Worker uses the Google refresh token plus the Worker-side client secret to mint a new Google access token and retries once.
The in-memory cache is an optimization only. A new Worker isolate can always refresh from the encrypted grant props.
Legacy grants
OAuth grants created before refresh-token support contain only the original Google access token plus user metadata. The proxy detects those grants and continues using their existing access token while Google still accepts it. Once Google rejects that token, the Worker returns 401 invalid_token so the MCP connection can be reauthorized rather than attempting a refresh with missing credentials.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables authentication and authorization with Google's OAuth2 API, allowing users to securely authenticate and access Google services through natural language interactions.
- AlicenseNot gradedqualityDmaintenanceMCP Server for Google Services, with the ability to define your own scopes and bring your own oauth key.3MIT
- FlicenseNot gradedqualityDmaintenanceEnables seamless Google Calendar integration with MCP-compatible clients, allowing creation, viewing, updating, and deletion of calendar events via OAuth 2.0 authentication.
- AlicenseNot gradedqualityCmaintenanceEnables access to Google Workspace services (Calendar, Gmail, Drive, Tasks) via an MCP server deployed on Vercel.1,226MIT
Related MCP Connectors
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Self-hosted federated MCP gateway: one OAuth 2.1 MCP server in front of N apps, user-level scopes.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/REVREBEL/cloudflare-mcp-google-auth'
If you have feedback or need assistance with the MCP directory API, please join our Discord server