This guide covers creating the Google Cloud project and OAuth credentials needed for the MCP server.
- A Google Workspace account (the same organization that uses Google Chat)
- Access to create projects in Google Cloud Console
- Go to Google Cloud Console
- Click Select a project → New Project
- Name:
gchat-mcp-server(or similar) - Organization: Select your organization
- Click Create
- In your new project, go to APIs & Services → Library
- Search for "Google Chat API"
- Click Enable
- Go to APIs & Services → OAuth consent screen
- Select Internal (since this is for your organization only)
- Fill in:
- App name:
Google Chat MCP Server - User support email: your email
- Developer contact: your email
- App name:
- Click Save and Continue
- On the Scopes page, click Add or Remove Scopes and add:
https://www.googleapis.com/auth/chat.spaces.readonlyhttps://www.googleapis.com/auth/chat.messages.readonlyopenid
- Click Save and Continue → Back to Dashboard
-
Go to APIs & Services → Credentials
-
Click Create Credentials → OAuth client ID
-
Application type: Web application
-
Name:
gchat-mcp-server -
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.
- Production:
-
Click Create
-
Copy the Client ID and Client Secret — you'll need these for the
.envfile
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.
- Go to APIs & Services → Google Chat API
- Click the Configuration tab
- 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
- App name:
- Under Functionality, enable:
- Receive 1:1 messages
- Join spaces and group conversations
- Under Connection settings, select HTTP endpoint URL and enter your server URL:
https://your-domain.com/ - Under Visibility, set to your Google Workspace domain (so only your org can use it)
- Click Save
Provide the following to whoever is setting up the server:
GOOGLE_CLIENT_ID— the client ID from step 4GOOGLE_CLIENT_SECRET— the client secret from step 4
These go into the .env file on the server.