How It Works
You enable only the Google APIs you want (for example Gmail and Calendar) in Google Cloud Console, pass your Desktop OAuth Client ID and Secret via environment variables, and run the Workspace MCP server locally over STDIO so credentials stay on your machine.Step-by-Step Setup
1
Create Google Cloud OAuth credentials (one time)
- Open Google Cloud Console and create or select a project.
- Under APIs & Services → Library, enable only the APIs you need (for example Gmail API, Google Calendar API, Google Drive API, Google Docs API).
- Configure APIs & Services → OAuth consent screen and add your Google account under Test users.
- Under APIs & Services → Credentials → Create Credentials → OAuth client ID, choose Desktop app and copy the Client ID and Client Secret.
- Export both as environment variables:
2
Install prerequisites
Install PraisonAI with MCP support and
uv (which provides uvx to run Python MCP servers cleanly in isolated environments):3
Add the Google Workspace connector
- CLI (Local STDIO)
- Custom Remote URL (Hosted Gateway)
- PraisonAI Dashboard
Pass
--tools to expose only the Google Workspace apps you actually need:4
Verify and inspect tools
5
Run your agent safely
Scope Tools for Safety
Common Workflows
- Morning Schedule & Inbox Digest:
"List my calendar events today and highlight unread emails related to each meeting." - Draft-Only Replies:
"Search Gmail for messages about the Q4 invoice and create a draft reply summarizing our latest status."
Troubleshooting
Best Practices
Enable only the Workspace services you need with --tools
Enable only the Workspace services you need with --tools
Loading every Google service adds dozens of tool schemas to every LLM call. Pass
--tools gmail calendar (or drive docs) to keep prompts lean and focused.Prefer creating Gmail drafts over direct send
Prefer creating Gmail drafts over direct send
Restrict automated inbox agents to reading threads and creating drafts so a human reviews every outbound email before sending.
Keep OAuth secrets in environment variables
Keep OAuth secrets in environment variables
Never commit
GOOGLE_OAUTH_CLIENT_SECRET into config.yaml or Python files — always reference ${GOOGLE_OAUTH_CLIENT_SECRET}.Related
Google Drive Connector
Dedicated Google Drive MCP setup guide
Google Calendar Tools (Python)
Native Python tools for Google Calendar without MCP
List of Connectors
Browse all popular connectors and step-by-step guides
Human Approval
Require human approval before outbound actions

