Skip to content
Back to search

mcp-gsuite

MCP Server to interact with Google Gsuite prodcuts

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/markuspfundstein--mcp-gsuite/badge.svg)](/listings/markuspfundstein--mcp-gsuite)

HTML

<a href="/listings/markuspfundstein--mcp-gsuite"><img src="/api/listings/markuspfundstein--mcp-gsuite/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install

Installing via Smithery

To install mcp-gsuite for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mcp-gsuite):

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](https://console.cloud.google.com/) - 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:

   [
     "openid",
     "https://mail.google.com/",
     "https://www.googleapis.com/auth/calendar",
     "https://www.googleapis.com/auth/userinfo.email"
   ]

3. Then create a `.gauth.json` in your working directory with client

{
    "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"
    }
}

4. Create a `.accounts.json` file with account information

{
    "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`

<details> <summary>Development/Unpublished Servers Configuration</summary>

{
  "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.

{
  "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"
      ]
    }
  }
}

</details>

<details> <summary>Published Servers Configuration</summary>

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

</details>

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`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 255 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # mcp-gsuite MCP server
  2. [![smithery badge](https://smithery.ai/badge/mcp-gsuite)](https://smithery.ai/server/mcp-gsuite)
  3. MCP server to interact with Google products.
  4. ## Example prompts
  5. Right now, this MCP server supports Gmail and Calendar integration with the following capabilities:
  6. 1. General
  7. * Multiple google accounts
  8. 2. Gmail
  9. * Get your Gmail user information
  10. * Query emails with flexible search (e.g., unread, from specific senders, date ranges, with attachments)
  11. * Retrieve complete email content by ID
  12. * Create new draft emails with recipients, subject, body and CC options
  13. * Delete draft emails
  14. * Reply to existing emails (can either send immediately or save as draft)
  15. * Retrieve multiple emails at once by their IDs.
  16. * Save multiple attachments from emails to your local system.
  17. 3. Calendar
  18. * Manage multiple calendars
  19. * Get calendar events within specified time ranges
  20. * Create calendar events with:
  21. + Title, start/end times
  22. + Optional location and description
  23. + Optional attendees
  24. + Custom timezone support
  25. + Notification preferences
  26. * Delete calendar events
  27. Example prompts you can try:
  28. * Retrieve my latest unread messages
  29. * Search my emails from the Scrum Master
  30. * Retrieve all emails from accounting
  31. * Take the email about ABC and summarize it
  32. * Write a nice response to Alice's last email and upload a draft.
  33. * Reply to Bob's email with a Thank you note. Store it as draft
  34. * What do I have on my agenda tomorrow?
  35. * Check my private account's Family agenda for next week
  36. * I need to plan an event with Tim for 2hrs next week. Suggest some time slots.
  37. ## Quickstart
  38. ### Install
  39. ### Installing via Smithery
  40. To install mcp-gsuite for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mcp-gsuite):
  41. ```bash
  42. npx -y @smithery/cli install mcp-gsuite --client claude
  43. ```
  44. #### Oauth 2
  45. Google Workspace (G Suite) APIs require OAuth2 authorization. Follow these steps to set up authentication:
  46. 1. Create OAuth2 Credentials:
  47. - Go to the [Google Cloud Console](https://console.cloud.google.com/)
  48. - Create a new project or select an existing one
  49. - Enable the Gmail API and Google Calendar API for your project
  50. - Go to "Credentials" → "Create Credentials" → "OAuth client ID"
  51. - Select "Desktop app" or "Web application" as the application type
  52. - Configure the OAuth consent screen with required information
  53. - Add authorized redirect URIs (include `http://localhost:4100/code` for local development)
  54. 2. Required OAuth2 Scopes:
  55. ```json
  56. [
  57. "openid",
  58. "https://mail.google.com/",
  59. "https://www.googleapis.com/auth/calendar",
  60. "https://www.googleapis.com/auth/userinfo.email"
  61. ]
  62. ```
  63. 3. Then create a `.gauth.json` in your working directory with client
  64. ```json
  65. {
  66. "web": {
  67. "client_id": "$your_client_id",
  68. "client_secret": "$your_client_secret",
  69. "redirect_uris": ["http://localhost:4100/code"],
  70. "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  71. "token_uri": "https://oauth2.googleapis.com/token"
  72. }
  73. }
  74. ```
  75. 4. Create a `.accounts.json` file with account information
  76. ```json
  77. {
  78. "accounts": [
  79. {
  80. "email": "alice@bob.com",
  81. "account_type": "personal",
  82. "extra_info": "Additional info that you want to tell Claude: E.g. 'Contains Family Calendar'"
  83. }
  84. ]
  85. }
  86. ```
  87. 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)
  88. 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.
  89. #### Claude Desktop
  90. On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
  91. On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
  92. <details>
  93. <summary>Development/Unpublished Servers Configuration</summary>
  94. ```json
  95. {
  96. "mcpServers": {
  97. "mcp-gsuite": {
  98. "command": "uv",
  99. "args": [
  100. "--directory",
  101. "<dir_to>/mcp-gsuite",
  102. "run",
  103. "mcp-gsuite"
  104. ]
  105. }
  106. }
  107. }
  108. ```
  109. 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.
  110. ```json
  111. {
  112. "mcpServers": {
  113. "mcp-gsuite": {
  114. "command": "uv",
  115. "args": [
  116. "--directory",
  117. "<dir_to>/mcp-gsuite",
  118. "run",
  119. "mcp-gsuite",
  120. "--accounts-file",
  121. "/path/to/custom/.accounts.json",
  122. "--credentials-dir",
  123. "/path/to/custom/credentials"
  124. ]
  125. }
  126. }
  127. }
  128. ```
  129. </details>
  130. <details>
  131. <summary>Published Servers Configuration</summary>
  132. ```json
  133. {
  134. "mcpServers": {
  135. "mcp-gsuite": {
  136. "command": "uvx",
  137. "args": [
  138. "mcp-gsuite",
  139. "--accounts-file",
  140. "/path/to/custom/.accounts.json",
  141. "--credentials-dir",
  142. "/path/to/custom/credentials"
  143. ]
  144. }
  145. }
  146. }
  147. ```
  148. </details>
  149. ### Configuration Options
  150. The MCP server can be configured with several command-line options to specify custom paths for authentication and account information:
  151. * `--gauth-file`: Specifies the path to the `.gauth.json` file containing OAuth2 client configuration. Default is `./.gauth.json`.
  152. * `--accounts-file`: Specifies the path to the `.accounts.json` file containing information about the Google accounts. Default is `./.accounts.json`.
  153. * `--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`.
  154. These options allow for flexibility in managing different environments or multiple sets of credentials and accounts, especially useful in development and testing scenarios.
  155. Example usage:
  156. ```bash
  157. uv run mcp-gsuite --gauth-file /path/to/custom/.gauth.json --accounts-file /path/to/custom/.accounts.json --credentials-dir /path/to/custom/credentials
  158. ```
  159. 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.
  160. ## Development
  161. ### Building and Publishing
  162. To prepare the package for distribution:
  163. 1. Sync dependencies and update lockfile:
  164. ```bash
  165. uv sync
  166. ```
  167. 2. Build package distributions:
  168. ```bash
  169. uv build
  170. ```
  171. This will create source and wheel distributions in the `dist/` directory.
  172. 3. Publish to PyPI:
  173. ```bash
  174. uv publish
  175. ```
  176. Note: You'll need to set PyPI credentials via environment variables or command flags:
  177. * Token: `--token` or `UV_PUBLISH_TOKEN`
  178. * Or username/password: `--username`/`UV_PUBLISH_USERNAME` and `--password`/`UV_PUBLISH_PASSWORD`
  179. ### Debugging
  180. Since MCP servers run over stdio, debugging can be challenging. For the best debugging
  181. experience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).
  182. You can launch the MCP Inspector via [ `npm` ](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command:
  183. ```bash
  184. npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-gsuite run mcp-gsuite
  185. ```
  186. Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
  187. You can also watch the server logs with this command:
  188. ```bash
  189. tail -n 20 -f ~/Library/Logs/Claude/mcp-server-mcp-gsuite.log
  190. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.