gogcli-mcp-contacts
v4.12.0Extended Google Contacts + People MCP server via gogcli — auth + Contacts + Workspace directory (People API)
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
gog_auth_list
List the Google accounts stored in gogcli, with their scopes. This reads local configuration only — it does not contact Google and does NOT tell you whether an account still works: a signed-out account whose refresh token expired or was revoked is listed here exactly like a healthy one, scopes and all. Use gog_auth_health to check whether an account can actually authenticate.
gog_auth_status
Show gogcli auth CONFIGURATION: keyring backend, credential files, and auth setup. Despite the name this is not a health check — it reads local setup and does not contact Google, so it says nothing about whether an account can still authenticate. Use gog_auth_health for that.
gog_auth_health
Check the LIVE health of each stored Google account. Unlike gog_auth_status (which only reports keyring/config setup), this performs a real token refresh against Google, so it detects expired or revoked (invalid_grant) refresh tokens — the account-wide sign-out that blocks every service. Reports per account: whether the token is currently valid, the mapped cause when it is not, how long ago it was authorized, and a warning as it approaches the 7-day refresh-token limit that applies to OAuth apps whose consent screen is still in "Testing" mode. Run it proactively to re-authorize on your own s…
gog_auth_services
List all Google services supported by gogcli and the OAuth scopes each requires.
gog_auth_add
Authorize a Google account via browser-based OAuth. Opens a browser window where the user must sign in and grant access. Blocks for up to 5 minutes waiting for the user to complete authorization. If the browser does not open automatically, a fallback URL is included in the response. Use gog_auth_list to check which accounts are already configured.
| Parameter | Type | Description |
|---|---|---|
email * | string | Google account email to authorize |
extraScopes | string | Additional raw OAuth scope URIs to request, comma-separated, on top of the ones `services` implies. Use for scopes no service covers — e.g. https://www.googleapis.com/auth/bigquery.readonly, require… |
services | string | Services to authorize: "all" or comma-separated list (e.g. "sheets,gmail,calendar"). Default: "contacts". Prefer the narrowest set you need — requesting a service whose Google API is not enabled on… |
gog_auth_add_url
Begin REMOTE/headless Google authorization (step 1 of 2). Returns a sign-in URL to open in any browser — no local server or terminal on the gogcli host is needed, so this works on a hosted deployment where the interactive gog_auth_add cannot. Hand the URL to the user; after they sign in, the browser is redirected to a localhost URL that fails to load — that is expected. They copy that full redirected URL (from the address bar) and you pass it to gog_auth_add_complete. The link is valid for 10 minutes. If you pass a custom `services` here, pass the SAME value to gog_auth_add_complete or the…
| Parameter | Type | Description |
|---|---|---|
email * | string | Google account email to authorize |
extraScopes | string | Additional raw OAuth scope URIs to request, comma-separated, on top of the ones `services` implies. Use for scopes no service covers — e.g. https://www.googleapis.com/auth/bigquery.readonly, require… |
services | string | Services to authorize: "all" or comma-separated list (e.g. "sheets,gmail,calendar"). Default: "contacts". Prefer the narrowest set you need — requesting a service whose Google API is not enabled on… |
gog_auth_add_complete
Complete REMOTE/headless Google authorization (step 2 of 2). Takes the full redirected localhost URL the user copied after finishing gog_auth_add_url, exchanges it for a refresh token, and stores it. Use the SAME `services` value you passed to gog_auth_add_url. Must run within 10 minutes of step 1 and against the same gogcli host.
| Parameter | Type | Description |
|---|---|---|
email * | string | Google account email being authorized (same as step 1) |
redirectUrl * | string | The full localhost redirect URL the user copied from the browser address bar after signing in (contains code and state; the page itself fails to load, which is expected). |
extraScopes | string | Extra OAuth scope URIs — MUST match the value passed to gog_auth_add_url, for the same reason `services` must: the two steps have to describe the same grant. |
services | string | Services authorized — MUST match the value passed to gog_auth_add_url. Default: "contacts". |
gog_auth_run
Run any gog auth subcommand not covered by the other tools. Run `gog auth --help` for the full list of subcommands, or `gog auth <subcommand> --help` for flags on a specific subcommand. Only these subcommands are available: list, status, services, alias. Flags that override server safety controls (--readonly, --enable-commands, --disable-commands, --account, --access-token, --home, --client, --gmail-no-send, --no-input) and a bare "--" are refused. Local file paths (--out, --out-dir, --attach, --file, --*-file, @file JSON) must be inside GOG_FILE_ROOTS; subcommands that take a local path posit…
| Parameter | Type | Description |
|---|---|---|
args * | array | Additional positional args and flags |
subcommand * | string | The gog auth subcommand to run, e.g. "alias", "list", "status" |
gog_contacts_search
Search personal Google Contacts by name, email, or phone. For searching the Workspace directory (internal users not in your personal contacts), use gog_people_search from gogcli-mcp-contacts.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query (name, email, or phone) |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
gog_contacts_list
List all Google Contacts.
| Parameter | Type | Description |
|---|---|---|
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
gog_contacts_get
Get a contact by resource name.
| Parameter | Type | Description |
|---|---|---|
resourceName * | string | Contact resource name (e.g. people/c12345) |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
gog_contacts_create
Create a new Google Contact.
| Parameter | Type | Description |
|---|---|---|
givenName * | string | Given (first) name |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
email | string | Email address |
familyName | string | Family (last) name |
org | string | Organization/company name |
phone | string | Phone number |
title | string | Job title |
gog_contacts_run
Run any gog contacts subcommand not covered by the other tools. Run `gog contacts --help` for the full list of subcommands, or `gog contacts <subcommand> --help` for flags on a specific subcommand. Flags that override server safety controls (--readonly, --enable-commands, --disable-commands, --account, --access-token, --home, --client, --gmail-no-send, --no-input) and a bare "--" are refused. Local file paths (--out, --out-dir, --attach, --file, --*-file, @file JSON) must be inside GOG_FILE_ROOTS; subcommands that take a local path positionally (e.g. drive upload) are refused in favour of thei…
| Parameter | Type | Description |
|---|---|---|
args * | array | Additional positional args and flags |
subcommand * | string | The gog contacts subcommand to run, e.g. "update", "delete", "directory" |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
gog_people_me
Show your own People profile (people/me).
| Parameter | Type | Description |
|---|---|---|
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
gog_people_get
Get a People profile by resource name.
| Parameter | Type | Description |
|---|---|---|
userId * | string | Person resource name (people/...) or email |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
gog_people_search
Search the Google Workspace directory (covers internal users, unlike contacts search which is limited to your personal contacts).
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query (name, email, etc.) |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
all | boolean | Fetch all pages |
max | number | Max results (default: 50) |
page | string | Deprecated alias for pageToken, accepted so existing callers keep working. Use pageToken — it matches the nextPageToken field in the response. |
pageToken | string | Cursor for the NEXT page. Pass back the nextPageToken from a previous response verbatim, keeping the query and max identical: call once, then call again with pageToken=<that value>. A response with NO… |
gog_people_relations
Get relations (manager, reports, etc.) for a user. Defaults to self when userId is omitted.
| Parameter | Type | Description |
|---|---|---|
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
type | string | Filter to a specific relation type (e.g. "manager") |
userId | string | Person resource name (defaults to self when omitted) |
gog_contacts_update
Update an existing Google Contact. Empty string clears a field; repeatable fields (url/address/custom/relation) take comma/semicolon-separated lists.
| Parameter | Type | Description |
|---|---|---|
resourceName * | string | Contact resource name (people/...) |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
address | string | Postal address(es), semicolon-separated (empty string clears all) |
birthday | string | Birthday in YYYY-MM-DD (empty string clears) |
email | string | Email address (empty string clears) |
family | string | Family (last) name |
given | string | Given (first) name |
ignoreEtag | boolean | Allow update even if a supplied etag is stale (may overwrite concurrent changes) |
note | string | Note/biography (empty string clears) |
org | string | Organization/company name (empty string clears) |
phone | string | Phone number (empty string clears) |
title | string | Job title (empty string clears) |
url | string | URL(s), comma-separated (empty string clears all) |
gog_contacts_delete
Delete a Google Contact by resource name.
| Parameter | Type | Description |
|---|---|---|
resourceName * | string | Contact resource name (people/...) |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
gog_contacts_batch_get
Fetch exact Google Contacts by People resource name in native API batches (up to 200).
| Parameter | Type | Description |
|---|---|---|
resourceNames * | array | Exact resource names such as people/c123; maximum 200 |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
gog_contacts_batch_create
Create Google Contacts in native People API batches (up to 200). peopleJson is a JSON array of People API Person resources. The payload is materialized in a temporary file on the gog host.
| Parameter | Type | Description |
|---|---|---|
peopleJson * | string | JSON array of People API Person resources, up to 200 contacts |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
gog_contacts_batch_update
Update Google Contacts in native People API batches. peopleByResourceName is a JSON object keyed by People resource name; each value must include the CONTACT source metadata and etag returned by a prior read. gog preserves those etag guards and reports partial progress.
| Parameter | Type | Description |
|---|---|---|
peopleByResourceName * | string | JSON object keyed by people/... resource name, with Person resources including CONTACT source metadata and etag |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
gog_contacts_batch_delete
Permanently delete exact Google Contacts in native People API batches (up to 500). Requires explicit user confirmation; deleted contacts cannot be restored from Trash.
| Parameter | Type | Description |
|---|---|---|
resourceNames * | array | Exact People resource names; maximum 500 |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
confirmToken | string | ONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see… |
gog_contacts_export
Export contacts as vCard (.vcf). Provide a selector (resource name, email, or name), or use query / all to export multiple.
| Parameter | Type | Description |
|---|---|---|
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
all | boolean | Export all personal contacts |
max | number | Max results for query (1-30) |
out | string | Output path (.vcf), or - for stdout (default: stdout) |
page | string | Deprecated alias for pageToken, accepted so existing callers keep working. Use pageToken — it matches the nextPageToken field in the response. |
pageToken | string | Cursor for the NEXT page. Pass back the nextPageToken from a previous response verbatim, keeping the query and max identical: call once, then call again with pageToken=<that value>. A response with NO… |
query | string | Search query to export (max 30 results) |
selector | string | Contact resource name (people/...), email, or name |
gog_contacts_dedupe
Find likely duplicate personal contacts. Defaults to a read-only preview of the merge plan; set apply to actually merge each duplicate group and delete the redundant contacts (etag-checked, with ambiguous or unmergeable groups refused). Scope a risky apply with resource. Always preview first.
| Parameter | Type | Description |
|---|---|---|
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
apply | boolean | Merge each duplicate group and DELETE the redundant contacts. Without this the tool only previews the plan. Destructive — preview first. |
failEmpty | boolean | Exit with an error (code 3) when no duplicates are found, instead of succeeding empty. |
match | string | Match fields, comma-separated from email,phone,name (default: email,phone) |
max | number | Max contacts to scan (0 = all). Mutually exclusive with resource — gog rejects passing both. |
resource | array | Limit dedupe to these exact contact resource names (e.g. people/c123), repeatable — useful to scope an apply to known duplicates. Mutually exclusive with max. |
gog_contacts_directory_list
List people from the Google Workspace directory (domain shared contacts).
| Parameter | Type | Description |
|---|---|---|
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
all | boolean | Fetch all pages |
max | number | Max results (default: 50) |
page | string | Deprecated alias for pageToken, accepted so existing callers keep working. Use pageToken — it matches the nextPageToken field in the response. |
pageToken | string | Cursor for the NEXT page. Pass back the nextPageToken from a previous response verbatim, keeping the query and max identical: call once, then call again with pageToken=<that value>. A response with NO… |
gog_contacts_other_list
List "other contacts" — auto-collected addresses (e.g. people you have emailed) that are not in your saved contacts.
| Parameter | Type | Description |
|---|---|---|
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
all | boolean | Fetch all pages |
max | number | Max results (default: 100) |
page | string | Deprecated alias for pageToken, accepted so existing callers keep working. Use pageToken — it matches the nextPageToken field in the response. |
pageToken | string | Cursor for the NEXT page. Pass back the nextPageToken from a previous response verbatim, keeping the query and max identical: call once, then call again with pageToken=<that value>. A response with NO… |
gog_contacts_other_search
Search "other contacts" — auto-collected addresses not in your saved contacts.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
max | number | Max results (default: 50) |
gog_people_raw
Dump the raw People API response as JSON (lossless; for scripting and LLM consumption).
| Parameter | Type | Description |
|---|---|---|
userId * | string | Person resource name (people/...) or email |
account | string | Google account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account. |
personFields | string | People API personFields mask (default: broad set) |
pretty | boolean | Pretty-print JSON (default: compact single-line) |