Skip to main content

Remote MCP connector wrapping gcal-mcp with Google OAuth 2.0 over Streamable HTTP

Project description

PyPI License: MIT Python 3.10+

gcal-mcp-remote

Remote MCP server wrapping gcal-mcp with Google OAuth 2.0 and Streamable HTTP transport — designed for Claude.ai connectors.

How it works

Claude.ai ──HTTP+Bearer──> gcal-mcp-remote ──Google API──> Google Calendar
                                │
                          imports gcal-mcp's FastMCP (all 14 tools)
                          patches get_client() with per-request ContextVar
                          adds Google OAuth + /health + /oauth/callback

Three-party OAuth: Claude ↔ this server ↔ Google. Each user authorizes their own Google Calendar via OAuth. The server stores per-user Google refresh tokens (encrypted at rest).

Prerequisites

  1. A Web application OAuth client in Google Cloud Console:
    • Create Credentials → OAuth client ID → Type: Web application
    • Add authorized redirect URI: {BASE_URL}/oauth/callback
    • Note the Client ID and Client Secret
  2. Google Calendar API enabled in the same project

Setup

git clone https://github.com/ldraney/gcal-mcp-remote.git
cd gcal-mcp-remote
cp .env.example .env
# Edit .env with your Google OAuth credentials, BASE_URL, and SESSION_SECRET
make install
make run

Environment Variables

Variable Description
GCAL_OAUTH_CLIENT_ID Google OAuth Web application client ID
GCAL_OAUTH_CLIENT_SECRET Google OAuth Web application client secret
SESSION_SECRET Random secret for encrypting token store
BASE_URL Public HTTPS URL where this server is reachable
HOST Bind address (default: 127.0.0.1)
PORT Listen port (default: 8001)

Verification

curl http://127.0.0.1:8001/health                                    # {"status": "ok"}
curl http://127.0.0.1:8001/.well-known/oauth-authorization-server    # OAuth metadata
curl -X POST http://127.0.0.1:8001/mcp                               # 401 (auth required)

Deploying

Standalone

Use any HTTPS tunnel (Tailscale Funnel, ngrok, Cloudflare Tunnel) to expose the server publicly, then add the URL as a Claude.ai connector.

A systemd service file is provided in systemd/gcal-mcp-remote.service.

Kubernetes (production)

Production deployment is managed by mcp-gateway-k8s, which runs this server as a pod with Tailscale Funnel ingress. That repo contains the Dockerfile, K8s manifests, and secrets management.

Full integration testing (Claude.ai connector → OAuth → Google Calendar) is tracked in mcp-gateway-k8s#12 and #6.

Privacy

See PRIVACY.md for our privacy policy.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gcal_mcp_remote_ldraney-0.1.5.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gcal_mcp_remote_ldraney-0.1.5-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file gcal_mcp_remote_ldraney-0.1.5.tar.gz.

File metadata

  • Download URL: gcal_mcp_remote_ldraney-0.1.5.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gcal_mcp_remote_ldraney-0.1.5.tar.gz
Algorithm Hash digest
SHA256 92e2fb2eca96dd188a650939aa3b063a804a0f5f2ac2828a8b6cb92ebf92dce9
MD5 1a582e9c1ff0f596ccf2bd909b5edc3f
BLAKE2b-256 b85ab2c583ccd473f39fa79cb3257405db05ba5166772e9595ecfb6907992aed

See more details on using hashes here.

Provenance

The following attestation bundles were made for gcal_mcp_remote_ldraney-0.1.5.tar.gz:

Publisher: publish.yml on ldraney/gcal-mcp-remote

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gcal_mcp_remote_ldraney-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for gcal_mcp_remote_ldraney-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 52fef2ce73181c3d0e9ac5387da9d9df6bd17d5e235ccc9eaed5facfce0bd8e3
MD5 f49b992d6e26e8637d5850b8b7010e36
BLAKE2b-256 301f082e9666902da0405513c19742d9c78e5971230bd2b6ea466eebdf73d7d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gcal_mcp_remote_ldraney-0.1.5-py3-none-any.whl:

Publisher: publish.yml on ldraney/gcal-mcp-remote

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page