Skip to main content

At a glance

  • Availability: Enabled by default.
  • Authentication: OAuth 2.0.
  • Connection: A user authorizes the connection in the provider’s consent screen.
  • Scopes: https://www.googleapis.com/auth/documents, https://www.googleapis.com/auth/drive.readonly.

Credentials

Set these per environment. See Connect an integration. These variables are required only when you supply your own OAuth app. If a managed app is available, you can connect without setting them. Provider permissions and consent still apply.

Setup

  1. Create or select a Google Cloud project: Open the Google Cloud Console and select the project that will own the OAuth client.
  2. Enable the Google Docs API: Enable the Docs API used to read, create, and edit documents.
  3. Enable the Google Drive API: Enable the Drive API used to list and search Google Docs files.
  4. Configure the OAuth consent screen: Authorize exactly https://www.googleapis.com/auth/documents and https://www.googleapis.com/auth/drive.readonly.
  5. Create a web OAuth client: Create an OAuth 2.0 Client ID for a web application and register http://localhost:3000/api/auth/docs-google/callback for local development plus the matching HTTPS callback for each deployed environment.
  6. Configure credentials: Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in the application environment. Keep the client secret out of source control.
  7. Connect Google Docs: Start the application and open /api/auth/docs-google to complete the OAuth flow.

Provider notes

  • The same Google OAuth client can serve Gmail, Calendar, Drive, Docs, and Sheets when all required APIs, scopes, and callback URLs are configured.
  • Production deployments must use the application’s durable OAuth token store and verified user identity resolver.
Provider API reference.

Tools

Verify the connection

Call a read tool such as docs-google__list_documents with arguments for your account. Confirm that the result comes from the intended account or workspace before enabling write tools.