
Google service integration tools for AI clients via MCP protocol
Google service integration tools for AI clients via MCP protocol
This is a collection of Google-native tools (e.g., Gmail, Calendar) for the MCP protocol, designed to integrate seamlessly with AI clients like Claude or Cursor.
Click below for one-click install with .dxt
:
{ "mcpServers": { "google-mcp": { "command": "bunx", "args": ["--no-cache", "google-mcp@latest"], "env": { // Either can be used, but not both // Use OAuth "GOOGLE_OAUTH_CLIENT_ID": "<YOUR_CLIENT_ID>", "GOOGLE_OAUTH_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>", "GOOGLE_OAUTH_TOKEN_PATH": "<PATH_TO_STORE_TOKENS> CAN_BE_ANYWHERE_ON_YOUR_SYSTEM", // Use Service Account "GOOGLE_CLIENT_EMAIL": "<YOUR_SERVICE_ACCOUNT_EMAIL>", "GOOGLE_PRIVATE_KEY": "<YOUR_SERVICE_ACCOUNT_PRIVATE_KEY>", "GMAIL_USER_TO_IMPERSONATE": "<USER_TO_IMPERSONATE>" } } } }
OAuth Management:
Gmail:
Calendar:
Drive:
Tasks:
TODO Plans:
You can chain commands for workflows, e.g.:
"List my unread emails, draft a reply to the latest one, and schedule a follow-up meeting tomorrow at 2 PM."
The server includes built-in OAuth token management to handle expired access tokens gracefully:
If you encounter authentication errors or want to proactively refresh your tokens, simply ask:
Refresh my Google OAuth tokens
This will:
If you get invalid_grant
errors or your refresh token has expired, you can start fresh:
Re-authenticate my Google account
This automated process will:
You'll only need to click "Allow" in the browser - everything else is automated!
Note: If you don't have a valid refresh token, you'll need to go through the initial OAuth authentication flow again.
Prerequisites:
brew install oven-sh/bun/bun # macOS/Linux with Homebrew
Set Up OAuth:
Configure Your Client: Edit your claude_desktop_config.json (or equivalent config file for your client):
{ "mcpServers": { "google-mcp": { "command": "bunx", "args": ["--no-cache", "google-mcp@latest"], "env": { // Either can be used, but not both // Use OAuth "GOOGLE_OAUTH_CLIENT_ID": "<YOUR_CLIENT_ID>", "GOOGLE_OAUTH_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>", "GOOGLE_OAUTH_TOKEN_PATH": "<PATH_TO_STORE_TOKENS>", // Use Service Account "GOOGLE_CLIENT_EMAIL": "<YOUR_SERVICE_ACCOUNT_EMAIL>", "GOOGLE_PRIVATE_KEY": "<YOUR_SERVICE_ACCOUNT_PRIVATE_KEY>", "GMAIL_USER_TO_IMPERSONATE": "<USER_TO_IMPERSONATE>" } } } }
Now, ask Claude to use the google-mcp
tool.
Send an email to [email protected] with the subject "Meeting Notes" and body "Here are the notes from today."
List my upcoming calendar events for the next 3 days.
Create a calendar event titled "Team Sync" tomorrow at 10 AM for 1 hour.
Refresh my Google OAuth tokens
Re-authenticate my Google account
git clone https://github.com/vakharwalad23/google-mcp.git cd google-mcp bun install bun run index.ts
Thank you for using Google MCP Tools! If you have any questions or suggestions, feel free to open an issue or contribute to the project.
Play around with the tools and enjoy!!