Setup steps for Google Workspace MCP Server
- Create OAuth 2.0 credentials (web application) in Google Cloud Console
- Navigate to APIs & Services > Credentials, then click Create Credentials > OAuth client ID.
- Select the appropriate application type (Web application) and configure any necessary settings like redirect URIs or JavaScript origins.
- To the OAuth 2.0 credentials form, add redirect URI: http://localhost:8000/oauth2callback
- Click create
- From the post-create modal, download credentials, name them
client_secret.json
and put them in your in project root
- In the
Audience
section (left), add your email as a test user.
- Configure your MCP client (Claude Desktop, Cursor, etc) to run the local MCP server. Steps vary, see here.
- My final config in Claude Code:
claude mcp add google_workspace -e GOOGLE_CLIENT_SECRETS=~/Code/mcp-servers/client_secret.json -- uvx workspace-mcp --tools gmail
- Tell your AI, "Alright, you should have access to a suite of tools for interacting with my google workspace. Can you see if you can authenticate with it? My email is ..."
- Click on the OAuth URL provided by the AI, grant the OAuth app permissions.
- If you have trouble clicking on the URL, have the AI write it to a file.
- Navigate to APIs & Services > Enabled APIs & services
- Click
+ Enable APIs and services
- Enable the APIs you want to use, e.g.
Gmail API
- If ever you want to use an API that you haven't enabled, the AI will hit a helpful error message with a URL to that brings you to the page to enable it.