CLI Reference
The mcp-google binary can run as an MCP server or call the same Google Docs, Sheets, and Slides tools directly from the command line.
Discover Commands
mcp-google --help
mcp-google <command> --help
The CLI is generated with Cobra, so --help is the easiest way to reference the current command list and flags.
Server Commands
| Command |
Description |
mcp-google |
Start the MCP server using stdio |
mcp-google serve |
Start the MCP server explicitly (stdio, or HTTP with --http) |
mcp-google version |
Print version information |
HTTP Transport
mcp-google serve --http :8080 serves MCP over streamable HTTP instead of stdio, as an OAuth resource server that verifies externally-issued bearer tokens (ID-JAG / Enterprise-Managed Authorization). See HTTP Transport & ID-JAG for the full flag reference, scopes, and audit logging.
Google Docs Commands
| Command |
MCP tool |
get-document-metadata <document-id-or-url> |
get_document_metadata |
get-document-content <document-id-or-url> |
get_document_content |
get-document-text <document-id-or-url> |
get_document_text |
get-document-paragraphs <document-id-or-url> |
get_document_paragraphs |
Google Sheets Commands
| Command |
MCP tool |
get-spreadsheet-metadata <spreadsheet-id-or-url> |
get_spreadsheet_metadata |
list-sheets <spreadsheet-id-or-url> |
list_sheets |
get-sheet-values <spreadsheet-id-or-url> <range> |
get_sheet_values |
get-sheet-data <spreadsheet-id-or-url> |
get_sheet_data |
Google Slides Commands
| Command |
MCP tool |
get-presentation <presentation-id> |
get_presentation |
list-slides <presentation-id> |
list_slides |
get-slide <presentation-id> |
get_slide |
get-slide-notes <presentation-id> |
get_slide_notes |
get-presentation-content <presentation-id> |
get_presentation_content |
Global Flags
| Flag |
Environment variable |
Description |
--credentials |
GOOGLE_CREDENTIALS_FILE |
Google service account credentials JSON file |
--goauth-credentials-file |
GOAUTH_CREDENTIALS_FILE |
goauth CredentialsSet JSON file |
--goauth-credentials-account |
GOAUTH_CREDENTIALS_ACCOUNT |
Account key in the goauth CredentialsSet |
--vault |
OMNITOKEN_VAULT_URI |
Vault URI for credentials |
--credentials-name |
OMNITOKEN_CREDENTIALS_NAME |
Credential name in the vault |
-o, --output |
|
Output format: json or pretty |
serve-only Flags
| Flag |
Environment variable |
Description |
--http |
MCP_GOOGLE_HTTP_ADDR |
Serve over HTTP on this address instead of stdio |
--idjag-issuer |
MCP_GOOGLE_IDJAG_ISSUER |
Authorization server issuer URL (required for --http) |
--idjag-audience |
MCP_GOOGLE_IDJAG_AUDIENCE |
Expected token audience / resource identifier |
--idjag-jwks-url |
MCP_GOOGLE_IDJAG_JWKS_URL |
Pin the issuer JWKS endpoint, skipping discovery |
Examples
# Google Docs
mcp-google get-document-metadata https://docs.google.com/document/d/abc123/edit \
--credentials /path/to/service-account.json
mcp-google get-document-content abc123 \
--include-metadata \
--include-images \
--include-tables \
--include-headers \
--include-footers \
-o pretty
# Google Sheets
mcp-google get-spreadsheet-metadata https://docs.google.com/spreadsheets/d/xyz789/edit \
--credentials /path/to/service-account.json
mcp-google get-sheet-data xyz789 --sheet-name "Sheet1" -o pretty
mcp-google get-sheet-values xyz789 "A1:D10" --value-format typed -o pretty
# Google Slides
mcp-google get-slide presentation123 --index 0 -o pretty