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.1.0.tar.gz (14.0 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.1.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: google_auth_core-0.1.0.tar.gz
  • Upload date:
  • Size: 14.0 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.1.0.tar.gz
Algorithm Hash digest
SHA256 0c73b7b683b21fa7a3bc3db8156315689d397bc04bbbcc4ce2bf23d0439f9d35
MD5 e9f543f8bb700948c9f038c88fe93019
BLAKE2b-256 7c0d4beafd5956e244f22c63e88e8a6bf124131b68010f2863e56547b328d220

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for google_auth_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 540b1b20f5be63b0e9b504dca9702cdfb2ee041bae5b864afa9ea32ea2e3ccb9
MD5 1029232ea30ecae80be3d2c9dd8e09f7
BLAKE2b-256 3d0e4dab3df9d6cd60c4ba75992b336f2bb53f36f722b511a648e0fdb9957a27

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