Back to MCP Catalog

Google Workspace Integration MCP Server

Cloud PlatformsPython
Interact with Gmail and Google Calendar through Claude
Available Tools

gmail_get_user_info

Get information about the Gmail user

account_email

gmail_search_emails

Search for emails in Gmail using query parameters

account_emailquerymax_results

gmail_get_email

Get a specific email by its ID

account_emailemail_id

gmail_create_draft

Create a draft email in Gmail

account_emailtosubjectbodycc

gmail_delete_draft

Delete a draft email in Gmail

account_emaildraft_id

gmail_reply_to_email

Reply to an existing email in Gmail

account_emailemail_idbodysave_as_draft

gmail_get_emails

Get multiple emails by their IDs

account_emailemail_ids

gmail_save_attachments

Save attachments from an email to the local system

account_emailemail_idsave_dir

calendar_list_calendars

List available Google Calendars

account_email

calendar_get_events

Get calendar events within a specified time range

account_emailcalendar_idtime_mintime_maxmax_results

calendar_create_event

Create a new calendar event

account_emailcalendar_idsummarystart_timeend_timelocationdescriptionattendeestimezonereminders

calendar_delete_event

Delete a calendar event

account_emailcalendar_idevent_id

Google Workspace Integration provides a seamless connection between Claude and your Google services. This MCP enables you to manage emails in Gmail and events in Google Calendar directly through Claude, supporting multiple Google accounts and offering comprehensive functionality for both services. With this integration, you can search and retrieve emails, create drafts, reply to messages, download attachments, and more. For Calendar, you can view upcoming events, create new appointments, and manage your schedule across multiple calendars. All of this is done securely through OAuth2 authentication with Google's APIs.

Overview

The Google Workspace Integration MCP allows Claude to interact with your Gmail and Google Calendar accounts. This integration enables you to manage emails, search for specific messages, handle calendar events, and more through natural language conversations with Claude.

Setup and Installation

Prerequisites

Before using this MCP, you need to:

  1. Have a Google account with access to Gmail and/or Google Calendar
  2. Create OAuth2 credentials in the Google Cloud Console

Creating OAuth2 Credentials

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Gmail API and Google Calendar API for your project
  4. Navigate to "Credentials" → "Create Credentials" → "OAuth client ID"
  5. Select "Desktop app" or "Web application" as the application type
  6. Configure the OAuth consent screen with required information
  7. Add http://localhost:4100/code to the authorized redirect URIs
  8. Note your client ID and client secret

Configuration Files

You need to create two configuration files in your working directory:

  1. .gauth.json - Contains your OAuth2 client configuration:
{
    "web": {
        "client_id": "YOUR_CLIENT_ID",
        "client_secret": "YOUR_CLIENT_SECRET",
        "redirect_uris": ["http://localhost:4100/code"],
        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
        "token_uri": "https://oauth2.googleapis.com/token"
    }
}
  1. .accounts.json - Contains information about your Google accounts:
{
    "accounts": [
        {
            "email": "your.email@gmail.com",
            "account_type": "personal",
            "extra_info": "Contains Family Calendar"
        }
    ]
}

You can specify multiple accounts in this file. The extra_info field allows you to add context about each account that Claude can reference.

Installation Methods

Using Smithery (Recommended)

The easiest way to install is via Smithery:

npx -y @smithery/cli install mcp-gsuite --client claude

Manual Installation

  1. Clone the repository or download the source code
  2. Install the package using uv:
    uv pip install -e /path/to/mcp-gsuite
    
  3. Configure your Claude client to use the MCP server

Claude Desktop Configuration

Add the following to your Claude Desktop configuration file:

  • On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mcp-gsuite": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-gsuite",
        "run",
        "mcp-gsuite"
      ]
    }
  }
}

Authentication Process

When you first use a tool with a specific account, a browser window will open asking you to log in to your Google account and grant the necessary permissions. After successful authentication, your credentials will be stored locally in a file named .oauth.{email}.json for future use.

Advanced Configuration

You can customize the MCP server with these command-line options:

  • --gauth-file: Path to your OAuth2 client configuration (default: ./.gauth.json)
  • --accounts-file: Path to your accounts configuration (default: ./.accounts.json)
  • --credentials-dir: Directory to store OAuth credentials (default: current working directory)

Example with custom paths:

{
  "mcpServers": {
    "mcp-gsuite": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-gsuite",
        "run",
        "mcp-gsuite",
        "--accounts-file",
        "/path/to/custom/.accounts.json",
        "--credentials-dir",
        "/path/to/custom/credentials"
      ]
    }
  }
}

Usage Examples

Once configured, you can ask Claude to perform various tasks with your Google Workspace accounts:

Gmail Examples

  • "Show me my unread emails"
  • "Search for emails from [sender]"
  • "Find emails with attachments from last week"
  • "Summarize the email about [topic]"
  • "Draft a reply to [person]'s latest email"

Calendar Examples

  • "What meetings do I have tomorrow?"
  • "Check my calendar for next week"
  • "Create a meeting with [person] for 2 hours next Tuesday"
  • "Find a free time slot for a team meeting next week"

The MCP handles the authentication and API interactions, allowing Claude to present the information in a conversational manner.

Related MCPs

AWS CLI
Cloud PlatformsPython

Execute AWS CLI commands securely through AI assistants

Kubernetes
Cloud PlatformsGo

Connect to and manage Kubernetes clusters through natural language

Cloudflare
Cloud PlatformsTypeScript

A Model Context Protocol server for Cloudflare services

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.