Skip to main content

Shared Google OAuth token store and authorized-service factory for CLIs and MCP servers

Project description

google-auth-core

Single source of truth for the ~/.google credential store, shared by the Google CLIs (gmail-cli, google-calendar-cli) and the Google Workspace MCP servers (gmail-mcp, gcal-mcp, gsheets-mcp, gdocs-mcp, gdrive-mcp).

What it provides

  • A unified per-account token store under ~/.google/tokens/google_<account>.json holding all scopes (Gmail + Calendar + Sheets + Docs + Drive), so one consent covers every service for both CLIs and MCP servers.
  • Account management: default account, aliases (work, personal), env and directory overrides.
  • get_service(api, version, account): an authorized googleapiclient service, cached per (account, api, version) for persistent, multi-account-safe use.
  • A consistent error taxonomy (AuthError, NotFoundError, RateLimitError, InvalidArgumentError, UpstreamError) and map_http_error.

CLI

google-auth login [account]        # one-time OAuth, writes a unified token
google-auth list                   # accounts, default, aliases
google-auth alias work you@work.com
google-auth status                 # token health per account
google-auth default you@work.com
google-auth logout you@work.com

Place your OAuth client (Desktop app) at ~/.google/credentials.json first.

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

google_auth_core-0.2.0.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

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

google_auth_core-0.2.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file google_auth_core-0.2.0.tar.gz.

File metadata

  • Download URL: google_auth_core-0.2.0.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for google_auth_core-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e7fcf1ca96defc119fa90424f9ef7ec9d508ccc30d7d35ce820d25d179dfeaaf
MD5 45713ae3e330dc544e7309163f4a1460
BLAKE2b-256 4bd7ec9db9e8362f4984ec275a13d42ddc83c37bfc8bb1fbfb28814f798eb8b5

See more details on using hashes here.

File details

Details for the file google_auth_core-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for google_auth_core-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 588bbea2b57833669b6b3513a53a141d23672b541aadae02e2d3b7cdbe886ca3
MD5 6bec2c3b95ffac1d615781a1e4f9f2b3
BLAKE2b-256 b7ff87b769198f67315fae9b8c56ccaa04c91ba1dc0ad27eea7ea298a67f97dd

See more details on using hashes here.

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