Skip to content

Latest commit

 

History

History
78 lines (59 loc) · 3.28 KB

File metadata and controls

78 lines (59 loc) · 3.28 KB

Google Cloud Project Setup

This guide covers creating the Google Cloud project and OAuth credentials needed for the MCP server.

Prerequisites

  • A Google Workspace account (the same organization that uses Google Chat)
  • Access to create projects in Google Cloud Console

Steps

1. Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Click Select a projectNew Project
  3. Name: gchat-mcp-server (or similar)
  4. Organization: Select your organization
  5. Click Create

2. Enable the Google Chat API

  1. In your new project, go to APIs & ServicesLibrary
  2. Search for "Google Chat API"
  3. Click Enable

3. Configure OAuth Consent Screen

  1. Go to APIs & ServicesOAuth consent screen
  2. Select Internal (since this is for your organization only)
  3. Fill in:
    • App name: Google Chat MCP Server
    • User support email: your email
    • Developer contact: your email
  4. Click Save and Continue
  5. On the Scopes page, click Add or Remove Scopes and add:
    • https://www.googleapis.com/auth/chat.spaces.readonly
    • https://www.googleapis.com/auth/chat.messages.readonly
    • openid
  6. Click Save and ContinueBack to Dashboard

4. Create OAuth 2.0 Credentials

  1. Go to APIs & ServicesCredentials

  2. Click Create CredentialsOAuth client ID

  3. Application type: Web application

  4. Name: gchat-mcp-server

  5. Under Authorized redirect URIs, add all URIs where the server will receive the OAuth callback:

    • Production: https://your-domain.com/callback
    • Local development (if needed): https://<your-ngrok-id>.ngrok-free.app/callback

    Note: You can have multiple redirect URIs on the same credential. Add your ngrok URL during local development and leave the production URI in place. Google validates the redirect URI on each request, so only the URI actually used in a given flow needs to be present.

  6. Click Create

  7. Copy the Client ID and Client Secret — you'll need these for the .env file

5. Configure the Google Chat App

This step is required, not optional. The Google Chat API requires a Chat app to be configured before user OAuth tokens can call it — even for read-only access. Without this, list_spaces and other Chat API calls will fail with an error about the app not being configured.

  1. Go to APIs & ServicesGoogle Chat API
  2. Click the Configuration tab
  3. Fill in the app details:
    • App name: Google Chat MCP Server (or any name your team will recognize)
    • Avatar URL: any publicly accessible image URL (e.g. your company logo)
    • Description: MCP server for Claude Ask Your Org integration
  4. Under Functionality, enable:
    • Receive 1:1 messages
    • Join spaces and group conversations
  5. Under Connection settings, select HTTP endpoint URL and enter your server URL: https://your-domain.com/
  6. Under Visibility, set to your Google Workspace domain (so only your org can use it)
  7. Click Save

6. Share Credentials

Provide the following to whoever is setting up the server:

  • GOOGLE_CLIENT_ID — the client ID from step 4
  • GOOGLE_CLIENT_SECRET — the client secret from step 4

These go into the .env file on the server.