Connect the Google Sheets MCP server to your AI agent Open source, MIT, on npm. Setup instructions for Claude, Cursor and Codex are in the repository; adoption questions — Telegram. GitHub repository Telegram

Google Sheets: Save the OAuth client — MCP tool

Google Sheets MCP tool: Reads the OAuth client JSON downloaded from Google Cloud Console and stores it for every mcp-google-* server to reuse.

Technical name: set_client

What task it solves

I want to register my Google OAuth client once, without pasting the secret into a chat.

Takes the path to the client_secret_*.json file that "Download JSON" produces on a Desktop-app client and stores it in the shared, owner-only ~/.config/mcp-google-auth/client.json. The secret never travels through the conversation, and every other mcp-google-* server picks the same client up — tokens stay per server.

When to use it

Use it right after the user creates a Desktop OAuth client with the steps from setup_instructions, or when switching to a different Cloud project. Not needed when GOOGLE_SHEETS_CLIENT_ID and GOOGLE_SHEETS_CLIENT_SECRET are already set in the environment — those win.

What to provide

  • path — required. Absolute path to the client_secret_*.json file downloaded from Google Cloud Console.

What it returns

Confirmation with the stored client id and the file it was written to. The secret is never returned.

What changes in Google Sheets

Nothing in Google Sheets. Locally, the shared client file is created or overwritten with owner-only permissions.

Example request

I downloaded the OAuth client JSON to ~/Downloads/client_secret_123.json — register it.

Errors and limitations

The file must exist and be readable, and it must be a Desktop-app client: a Web-application client cannot complete the loopback redirect. The credentials are not verified here — a wrong or mismatched pair only surfaces during finish_login as invalid_client. The secret is stored in plain text in an owner-only file because Google requires it on every token refresh.

Related MCP tools

Technical details