How to Connect Multiple Gmail Accounts to Claude on Mac

Claude’s built-in Gmail connector only supports a single account. If you run multiple Gmail or Google Workspace accounts — a common setup for small business owners and freelancers — you’re left with a blind spot. This guide shows you how to connect multiple Gmail accounts to Claude on Mac using a local MCP server, giving Claude full read and send access across all your accounts simultaneously, including sent items.

The solution runs entirely on your Mac. No cloud hosting. No third-party service. Tokens are stored locally and refresh automatically.

Source code: github.com/DiegoMaldonadoRosas/gmail-mcp by Diego Maldonado Rosas.


What You’ll Need

  • macOS (tested on macOS 14+)
  • Claude Desktop installed on your Mac
  • Python 3.11 or later
  • A Google Cloud account (free)
  • The Gmail accounts you want to connect

What This Gives You

Once set up, you can ask Claude things like:

  • “Do I have any unread emails in my work account?”
  • “Search for invoices across all my accounts from the last month”
  • “What has been sent from my business account today?”
  • “Draft a reply to the budget email in my second account”

Claude can search, read, and send from any connected account — and can search all accounts at once. Sent items are fully visible on every account with no forwarding scripts required.


Step 1 — Set Up Google Cloud

This is a one-time setup that creates the OAuth credentials the MCP server uses to authenticate with Gmail.

  1. Go to console.cloud.google.com and sign in with the Google account you want to act as the project owner.
  2. Create a new project. Name it something memorable like Gmail MCP.
  3. Enable the Gmail API: go to APIs & Services → Library, search for Gmail API, and click Enable.
  4. Configure the OAuth consent screen: go to APIs & Services → OAuth consent screen (or Google Auth Platform in newer Console layouts). Choose External as the user type.
  5. Fill in the app name (e.g. Gmail MCP) and your email address as the support contact.
  6. On the Test Users page, add every Gmail or Google Workspace email address you want to connect. This is required while the app is in Testing status.
  7. Go to Clients (or APIs & Services → Credentials) and create a new OAuth 2.0 Client ID. Set the application type to Desktop app.
  8. When the client is created, a popup will show your Client ID and Client Secret. Download the JSON file before closing this popup — the secret will not be shown again.

Step 2 — Install the MCP Server on Your Mac

Open Terminal and run:

cd ~
git clone https://github.com/DiegoMaldonadoRosas/gmail-mcp.git
cd gmail-mcp
bash setup.sh

The setup script creates a Python virtual environment and installs all dependencies automatically.


Step 3 — Add Your Credentials and Configure Accounts

Move the JSON file you downloaded from Google Cloud into the credentials folder:

mkdir -p ~/gmail-mcp/credentials
mv ~/Downloads/client_secret_*.json ~/gmail-mcp/credentials/client_secret.json

Then create your account configuration file:

cp ~/gmail-mcp/config.json.example ~/gmail-mcp/config.json
open -e ~/gmail-mcp/config.json

Edit the file to list your accounts. The keys (personal, work, etc.) are the names you’ll use when talking to Claude:

{
  "accounts": {
    "personal": {
      "email": "[email protected]",
      "description": "Personal Gmail"
    },
    "work": {
      "email": "[email protected]",
      "description": "Work account"
    }
  },
  "credentials_dir": "./credentials"
}

Save and close the file.


Step 4 — Authenticate Each Account

Run the authentication script:

cd ~/gmail-mcp
python3 setup_auth.py

A browser window will open once for each account you configured. Sign into each account when prompted and grant the requested permissions. Tokens are saved locally to credentials/tokens/ — you won’t need to repeat this unless you revoke access.

Note: If you have multiple Google accounts open in your browser, make sure you sign into the correct one for each prompt. Use a different browser profile or incognito window if needed.


Step 5 — Connect to Claude Desktop

Open your Claude Desktop configuration file:

open -e ~/Library/Application\ Support/Claude/claude_desktop_config.json

If the file doesn’t exist yet, create it. Add the following, replacing YOUR_MAC_USERNAME with your actual Mac username (run echo $HOME in Terminal if unsure):

{
  "mcpServers": {
    "gmail": {
      "command": "/Users/YOUR_MAC_USERNAME/gmail-mcp/.venv/bin/python",
      "args": ["/Users/YOUR_MAC_USERNAME/gmail-mcp/server.py"]
    }
  }
}

If you already have other MCP servers configured, add the gmail block inside the existing mcpServers section.

Save the file, then fully quit Claude Desktop (Cmd+Q) and reopen it.


Step 6 — Test It

In a new Claude chat, type:

List my Gmail accounts

Claude will call the MCP server and return all your configured accounts with their authentication status. If all accounts show as ready, you’re done.

You can now ask Claude to search, read threads, check sent items, or draft replies across any of your connected Gmail accounts — all from a single conversation.


Adding Another Account Later

  1. Add the new email as a Test User in Google Cloud Console (Audience page).
  2. Add the account to config.json.
  3. Run python3 setup_auth.py — it will only prompt for accounts not yet authenticated.
  4. Restart Claude Desktop.

Security Notes

  • OAuth tokens are stored locally in credentials/tokens/ on your Mac only.
  • Nothing is sent to any third-party server — all communication is between your Mac and Google’s API directly.
  • To revoke access at any time, visit myaccount.google.com/permissions.

Was this of value to you? If so and you feel the desire: Buy Me A Coffee

Got a question? Want to know more?

Please enter your name.
Please enter a message.
Please check the captcha to verify you are not a robot.