mcp-gsuite

mcp-gsuite

MCP server for integrating Google Gmail and Calendar with AI tools

457
Stars
89
Forks
457
Watchers
22
Issues
mcp-gsuite enables seamless integration of Google Workspace products, such as Gmail and Calendar, with AI models via the Model Context Protocol (MCP). It supports multiple Google accounts, OAuth2 authentication, and a variety of email and calendar management functions. Users can retrieve, compose, and manage emails or calendar events, and provide rich contextual information to AI systems.

Key Features

Supports multiple Google accounts
Gmail user information retrieval
Flexible email querying and search
Draft creation and management for emails
Reply and response functionality for emails
Attachment saving from emails
Manage multiple Google calendars
Retrieve and create calendar events with various options
Event deletion and attendee management
OAuth2 authentication setup

Use Cases

Automatically summarizing new emails using AI
Scheduling meetings and events based on user prompts
Querying emails from specific senders or with particular attributes
Creating and managing email drafts via AI-powered tools
Automating replies and responses to emails
Saving important email attachments to a local system
Checking upcoming agenda items and events
Handling multiple Google accounts in a unified AI-driven workflow
Coordinating calendar scheduling with multiple attendees
Managing personal and shared Google calendars using an AI assistant

README

mcp-gsuite MCP server

smithery badge MCP server to interact with Google products.

Example prompts

Right now, this MCP server supports Gmail and Calendar integration with the following capabilities:

  1. General
  • Multiple google accounts
  1. Gmail
  • Get your Gmail user information
  • Query emails with flexible search (e.g., unread, from specific senders, date ranges, with attachments)
  • Retrieve complete email content by ID
  • Create new draft emails with recipients, subject, body and CC options
  • Delete draft emails
  • Reply to existing emails (can either send immediately or save as draft)
  • Retrieve multiple emails at once by their IDs.
  • Save multiple attachments from emails to your local system.
  1. Calendar
  • Manage multiple calendars
  • Get calendar events within specified time ranges
  • Create calendar events with:
    • Title, start/end times
    • Optional location and description
    • Optional attendees
    • Custom timezone support
    • Notification preferences
  • Delete calendar events

Example prompts you can try:

  • Retrieve my latest unread messages

  • Search my emails from the Scrum Master

  • Retrieve all emails from accounting

  • Take the email about ABC and summarize it

  • Write a nice response to Alice's last email and upload a draft.

  • Reply to Bob's email with a Thank you note. Store it as draft

  • What do I have on my agenda tomorrow?

  • Check my private account's Family agenda for next week

  • I need to plan an event with Tim for 2hrs next week. Suggest some time slots.

Quickstart

Install

Installing via Smithery

To install mcp-gsuite for Claude Desktop automatically via Smithery:

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

Oauth 2

Google Workspace (G Suite) APIs require OAuth2 authorization. Follow these steps to set up authentication:

  1. Create OAuth2 Credentials:

    • Go to the Google Cloud Console
    • Create a new project or select an existing one
    • Enable the Gmail API and Google Calendar API for your project
    • Go to "Credentials" → "Create Credentials" → "OAuth client ID"
    • Select "Desktop app" or "Web application" as the application type
    • Configure the OAuth consent screen with required information
    • Add authorized redirect URIs (include http://localhost:4100/code for local development)
  2. Required OAuth2 Scopes:

json
   [
     "openid",
     "https://mail.google.com/",
     "https://www.googleapis.com/auth/calendar",
     "https://www.googleapis.com/auth/userinfo.email"
   ]
  1. Then create a .gauth.json in your working directory with client
json
{
    "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. Create a .accounts.json file with account information
json
{
    "accounts": [
        {
            "email": "alice@bob.com",
            "account_type": "personal",
            "extra_info": "Additional info that you want to tell Claude: E.g. 'Contains Family Calendar'"
        }
    ]
}

You can specifiy multiple accounts. Make sure they have access in your Google Auth app. The extra_info field is especially interesting as you can add info here that you want to tell the AI about the account (e.g. whether it has a specific agenda)

Note: When you first execute one of the tools for a specific account, a browser will open, redirect you to Google and ask for your credentials, scope, etc. After a successful login, it stores the credentials in a local file called .oauth.{email}.json . Once you are authorized, the refresh token will be used.

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json

On Windows: %APPDATA%/Claude/claude_desktop_config.json

json
{
  "mcpServers": {
    "mcp-gsuite": {
      "command": "uv",
      "args": [
        "--directory",
        "<dir_to>/mcp-gsuite",
        "run",
        "mcp-gsuite"
      ]
    }
  }
}

Note: You can also use the uv run mcp-gsuite --accounts-file /path/to/custom/.accounts.json to specify a different accounts file or --credentials-dir /path/to/custom/credentials to specify a different credentials directory.

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

Configuration Options

The MCP server can be configured with several command-line options to specify custom paths for authentication and account information:

  • --gauth-file: Specifies the path to the .gauth.json file containing OAuth2 client configuration. Default is ./.gauth.json.
  • --accounts-file: Specifies the path to the .accounts.json file containing information about the Google accounts. Default is ./.accounts.json.
  • --credentials-dir: Specifies the directory where OAuth credentials are stored after successful authentication. Default is the current working directory with a subdirectory for each account as .oauth.{email}.json.

These options allow for flexibility in managing different environments or multiple sets of credentials and accounts, especially useful in development and testing scenarios.

Example usage:

bash
uv run mcp-gsuite --gauth-file /path/to/custom/.gauth.json --accounts-file /path/to/custom/.accounts.json --credentials-dir /path/to/custom/credentials

This configuration is particularly useful when you have multiple instances of the server running with different configurations or when deploying to environments where the default paths are not suitable.

Development

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:
bash
uv sync
  1. Build package distributions:
bash
uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:
bash
uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN
  • Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

bash
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-gsuite run mcp-gsuite

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

You can also watch the server logs with this command:

bash
tail -n 20 -f ~/Library/Logs/Claude/mcp-server-mcp-gsuite.log

Star History

Star History Chart

Repository Owner

Repository Details

Language Python
Default Branch main
Size 93 KB
Contributors 5
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

Python
98.36%
Dockerfile
1.64%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Google Workspace MCP Server

    Google Workspace MCP Server

    Full natural language control of Google Workspace through the Model Context Protocol.

    Google Workspace MCP Server enables comprehensive natural language interaction with Google services such as Calendar, Drive, Gmail, Docs, Sheets, Slides, Forms, Tasks, and Chat via any MCP-compatible client or AI assistant. It supports both single-user and secure multi-user OAuth 2.1 authentication, providing a production-ready backend for custom apps. Built on FastMCP, it delivers high performance and advanced context handling, offering deep integration with the entire Google Workspace suite.

    • 890
    • MCP
    • taylorwilsdon/google_workspace_mcp
  • Google MCP Tools

    Google MCP Tools

    Seamless Google Workspace integration for AI-driven clients via the MCP protocol

    Google MCP Tools enables AI clients to interact with Google services like Gmail, Calendar, and Drive using the Model Context Protocol (MCP). It provides secure OAuth and service account support for managing emails, calendar events, and drive files. Core capabilities include sending and drafting emails with attachments, managing labels, scheduling calendar events, and handling files in Google Drive. Designed for smooth integration with AI assistants such as Claude and Cursor.

    • 12
    • MCP
    • vakharwalad23/google-mcp
  • Google Calendar MCP Server

    Google Calendar MCP Server

    MCP-compliant server enabling Google Calendar integration with Claude Desktop.

    Google Calendar MCP Server provides a Model Context Protocol server implementation for seamless integration between Claude Desktop and Google Calendar. It enables natural language-based scheduling, creation, updating, and deletion of calendar events by handling OAuth2 authentication and offering standardized tool interfaces. The server employs TypeScript, leverages the MCP SDK, and ensures secure token handling with AES-256-GCM encryption. Robust schema validation and environment-based configuration enable secure, reliable, and flexible calendar management.

    • 53
    • MCP
    • takumi0706/google-calendar-mcp
  • MyMCP Server (All-in-One Model Context Protocol)

    MyMCP Server (All-in-One Model Context Protocol)

    Powerful and extensible Model Context Protocol server with developer and productivity integrations.

    MyMCP Server is a robust Model Context Protocol (MCP) server implementation that integrates with services like GitLab, Jira, Confluence, YouTube, Google Workspace, and more. It provides AI-powered search, contextual tool execution, and workflow automation for development and productivity tasks. The system supports extensive configuration and enables selective activation of grouped toolsets for various environments. Installation and deployment are streamlined, with both automated and manual setup options available.

    • 93
    • MCP
    • nguyenvanduocit/all-in-one-model-context-protocol
  • keep-mcp

    keep-mcp

    Connect Google Keep notes to the Model Context Protocol ecosystem.

    Provides an MCP server interface for Google Keep, enabling standardized interaction with Keep notes via the Model Context Protocol. Allows users to search, create, update, and delete Google Keep notes through MCP, supporting integration with MCP-compatible platforms. It restricts modification and deletion operations to notes managed by the MCP server unless configured otherwise. Credentials for Google authentication are securely handled through environment variables.

    • 52
    • MCP
    • feuerdev/keep-mcp
  • MCP ChatGPT Server

    MCP ChatGPT Server

    Enables direct access to OpenAI's ChatGPT API from Claude Desktop via the Model Context Protocol.

    MCP ChatGPT Server runs as an MCP-compliant server, allowing users to access OpenAI's ChatGPT API seamlessly within Claude Desktop. It supports customizable model parameters, automated conversation state management, integrated web search for up-to-date information, and facilitates interactive discussions between Claude and ChatGPT. Users can configure model selection, temperature, token limits, and use their own OpenAI API keys.

    • 14
    • MCP
    • billster45/mcp-chatgpt-responses
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results