Google Workspace in your terminal
open sourceMITself-hostablefreeMCP
gog is a single Go command-line client for Gmail, Calendar, Drive, Docs, Sheets, Slides, Forms, Contacts, Tasks, Chat, Meet, YouTube, Search Console, Analytics and Workspace administration, built for people, scripts, CI and coding agents. It routes between several Google accounts and OAuth clients, stores tokens in the system keyring, emits stable JSON or TSV, and has safety controls for automation: read-only mode, exact command allowlists, a Gmail no-send policy, dry runs and wrapping of untrusted content. gog mcp runs a typed, read-only-by-default MCP server, and the binary generates its own command schema and agent skills. MIT licensed, by Peter Steinberger, in the OpenClaw GitHub organization; not affiliated with Google.
Ways to install
Package managers
Problems it solves
- search and read my Gmail from the terminal or a script
- let my AI coding agent read my email and calendar without giving it full account access
- list today's calendar events as JSON for a script
- audit who a Drive folder is shared with from the command line
- read and write Google Sheets ranges from a shell script or CI job
- send email from a script using only a send-only Gmail permission
- switch between my personal and work Google accounts in one command-line tool
- find and merge duplicate Google contacts with a preview before anything changes
- manage Google Workspace users and groups from the command line
- give an agent a fixed set of Google Workspace tools over MCP instead of a shell
Features
- Gmail, Calendar, Drive, Docs, Sheets, Slides, Forms, Contacts, Tasks, Chat, Meet, Keep and Classroom
- Analytics, Search Console, AdSense and YouTube commands
- Workspace admin and groups
- Discovery API fallback (
gog api call) - multiple accounts, OAuth clients, service accounts and ADC
- tokens in the platform keyring or an encrypted file
--jsonand--plainTSV output- read-only mode, command allowlists, Gmail no-send, dry runs, untrusted-content wrapping
- typed stdio MCP server (
gog mcp) - generated command schema and agent skills
View 1 more
- Docker image on GHCR
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has an MCP server | plan not known |
Alternatives
The same job
These do what gog does.
- mcp-gsc Google Search Console MCP server for SEOs