Google MCP 标志

Google MCP

社区
quinnjr

Model Context Protocol (MCP) server for Google Workspace - Calendar, Gmail, Drive, Docs, Sheets, Slides, Meet, Chat, Forms, YouTube, Tasks, and Contacts with OAuth 2.0 authentication

发布者quinnjr
代码仓库google-mcp
语言TypeScript
复刻数
10
星标数
11
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    Google MCP 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 11 个 Star 和 10 个 Fork。

Google MCP Server

A comprehensive Model Context Protocol (MCP) server for Google integration, providing access to Google Calendar, Docs, Sheets, Slides, Drive, Gmail, Contacts, YouTube, Tasks, Forms, Chat, and Meet.

Features

Google Forms

  • Create and manage Google Forms
  • Add questions (multiple choice, short answer, checkboxes, etc.)
  • Add page breaks, text items, images, and videos
  • List and retrieve form responses
  • Update form settings (quiz mode, etc.)

Google Chat

  • List, create, and manage Chat spaces
  • Send, update, and delete messages
  • Add and remove reactions
  • Manage space members
  • Thread support for conversations

Google Meet

  • Create meeting spaces with access controls
  • Schedule meetings via Calendar integration
  • Create instant meetings
  • List and access conference records
  • View participant information
  • Access meeting recordings and transcripts

Google Calendar

  • List calendars and events
  • Create, update, and delete events
  • Quick add events using natural language
  • Get today's events and upcoming events
  • Check free/busy availability

Google Gmail

  • Read, search, and list emails
  • Send emails and reply to threads, with file attachments
  • List and download attachments on received messages
  • Mark as read/unread, trash messages
  • List labels and organize emails

Google Contacts (People API)

  • List, search, and manage contacts
  • Create, update, and delete contacts
  • List contact groups

Google Drive

  • List, search, and browse files and folders
  • Upload, download, copy, move, and delete files, text or binary
  • Replace the contents of an existing file
  • Export Google Workspace files to other formats (PDF, DOCX, CSV, ...)
  • Create folders
  • Rename files

Google Docs

  • Create new documents with optional initial content
  • Read document content
  • Insert and append text
  • Find and replace text
  • List all documents

Google Sheets

  • Create spreadsheets with multiple sheets
  • Read values from ranges
  • Update and append values
  • Clear ranges
  • Add and delete sheets
  • List all spreadsheets

Google Slides

  • Create and manage presentations
  • Add, delete, and duplicate slides
  • Add text boxes and images
  • Find and replace text
  • List all presentations

Google YouTube

  • Search videos, channels, and playlists
  • Get video and channel details
  • View and manage playlists
  • Get video comments
  • View subscriptions and liked videos
  • Rate videos

Google Tasks (Keep Alternative)

  • Manage task lists (similar to Keep categories)
  • Create, update, complete, and delete tasks
  • Tasks support notes/descriptions (similar to Keep notes)
  • Convenience "notes" tools that provide Keep-like functionality

Note: Google Keep does not have an official public API. This server uses Google Tasks API as an alternative, which provides similar note-taking capabilities through tasks with descriptions.

Installation

bash
# Clone the repository
cd google-mcp

# Install dependencies
pnpm install

# Build the project
pnpm build

Google Cloud Setup

Before using this server, you need to set up Google Cloud credentials:

1. Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the following APIs:
    • Google Calendar API
    • Google Docs API
    • Google Sheets API
    • Google Slides API
    • Google Drive API
    • Gmail API
    • People API (Contacts)
    • YouTube Data API v3
    • Google Tasks API
    • Google Forms API
    • Google Chat API
    • Google Meet REST API

2. Create OAuth 2.0 Credentials

  1. Navigate to APIs & Services > Credentials
  2. Click Create Credentials > OAuth client ID
  3. Select Desktop app as the application type
  4. Download the JSON file

3. Place Credentials File

Save the downloaded JSON file as credentials.json at the appropriate location for your platform:

Linux:

~/.config/google-mcp/credentials.json

(or $XDG_CONFIG_HOME/google-mcp/credentials.json if XDG_CONFIG_HOME is set)

macOS:

~/Library/Application Support/google-mcp/credentials.json

Windows:

%APPDATA%\google-mcp\credentials.json

(typically C:\Users\<username>\AppData\Roaming\google-mcp\credentials.json)

The file should look like:

json
{
  "installed": {
    "client_id": "YOUR_CLIENT_ID.apps.googleusercontent.com",
    "project_id": "your-project-id",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "client_secret": "YOUR_CLIENT_SECRET",
    "redirect_uris": ["http://localhost:3000/oauth2callback"]
  }
}

Usage with MCP Clients

The server runs as a long-lived pooled worker, not as a stdio subprocess. It exposes the current Streamable HTTP transport at /mcp and retains the legacy HTTP+SSE transport at /sse plus /messages for older clients. Start the worker once, then point clients at /mcp.

Start the worker:

bash
node /path/to/google-mcp/dist/index.js
# or from the project directory:
pnpm dev

It listens on 127.0.0.1:3015 by default. Override with GOOGLE_MCP_HOST and GOOGLE_MCP_PORT (or PORT).

Add to your MCP settings configuration:

json
{
  "mcpServers": {
    "google": {
      "url": "http://127.0.0.1:3015/mcp"
    }
  }
}

Every client that connects gets its own MCP session while sharing one authenticated Google session, so you only complete the OAuth flow once no matter how many clients or agents attach. Legacy SSE clients can continue to use http://127.0.0.1:3015/sse.

Authentication

On first use, call the google_auth tool to initiate OAuth authentication:

  1. The server will provide a URL to authenticate
  2. Open the URL in a browser and sign in with your Google account
  3. Grant the requested permissions
  4. Authentication will complete automatically

Tokens are stored locally and will be refreshed automatically:

  • Linux: ~/.local/share/google-mcp/tokens.json (or $XDG_DATA_HOME/google-mcp/)
  • macOS: ~/Library/Application Support/google-mcp/tokens.json
  • Windows: %APPDATA%\google-mcp\tokens.json

Local Files

Tools that read a local file (path) or write one (savePath) resolve every path inside a single sandbox directory, defaulting to ~/Downloads/google-mcp. Relative paths are taken from that root; absolute paths must fall inside it.

This matters because the arguments come from a model that may have just read a hostile email. Without a boundary, an injected "attach ~/.ssh/id_rsa" is an exfiltration primitive and an injected savePath of ~/.ssh/authorized_keys is code execution. Inside the sandbox both are inert.

bash
export GOOGLE_MCP_FILE_ROOT="$HOME/Documents/mcp-files"

Regardless of the root, the server refuses to touch key and credential directories (.ssh, .aws, .gnupg, ...) or files that look like secrets (*.pem, *.key, tokens.json, credentials.json, .env*), does not follow symlinks out of the root, and never overwrites an existing file.

Inline transfers are capped at 1 MB, since they land in the model's context; pass savePath for anything larger, up to 25 MB.

Available Tools

Authentication

ToolDescription
google_authInitiate OAuth authentication
google_auth_statusCheck authentication status
google_auth_codeManually set auth code
google_logoutLog out and clear tokens

Google Calendar

ToolDescription
calendar_listList all calendars
calendar_getGet calendar details
calendar_list_eventsList events from calendar
calendar_get_eventGet event details
calendar_create_eventCreate new event
calendar_update_eventUpdate existing event
calendar_delete_eventDelete an event
calendar_quick_addAdd event via natural language
calendar_get_freebusyCheck availability
calendar_todayGet today's events
calendar_upcomingGet upcoming events

Google Gmail

ToolDescription
gmail_get_profileGet Gmail profile info
gmail_list_labelsList Gmail labels
gmail_list_messagesList emails
gmail_get_messageGet specific email
gmail_sendSend an email
gmail_replyReply to an email
gmail_get_attachmentDownload an attachment from a message
gmail_trashMove to trash
gmail_mark_readMark as read
gmail_mark_unreadMark as unread
gmail_searchSearch emails
gmail_get_unreadGet unread emails
gmail_get_threadGet email thread

Google Contacts

ToolDescription
contacts_listList contacts
contacts_getGet contact details
contacts_searchSearch contacts
contacts_createCreate contact
contacts_deleteDelete contact
contacts_list_groupsList contact groups

Google Drive

ToolDescription
drive_list_filesList files with filtering
drive_get_fileGet file metadata
drive_download_fileDownload file content, text or binary
drive_upload_fileUpload a new file
drive_update_fileReplace an existing file's contents
drive_delete_fileDelete a file
drive_create_folderCreate a new folder
drive_searchSearch files by content
drive_move_fileMove file to folder
drive_copy_fileCopy a file
drive_rename_fileRename a file

Google Docs

ToolDescription
docs_createCreate a new document
docs_readRead document content
docs_insert_textInsert text at position
docs_append_textAppend text to end
docs_replace_textFind and replace text
docs_listList all documents

Google Sheets

ToolDescription
sheets_createCreate spreadsheet
sheets_getGet spreadsheet info
sheets_readRead values from range
sheets_updateUpdate values in range
sheets_appendAppend rows
sheets_clearClear a range
sheets_add_sheetAdd a new sheet
sheets_delete_sheetDelete a sheet
sheets_listList all spreadsheets

Google Slides

ToolDescription
slides_createCreate presentation
slides_getGet presentation
slides_listList presentations
slides_add_slideAdd a slide
slides_delete_slideDelete a slide
slides_add_textAdd text box
slides_add_imageAdd image
slides_replace_textFind/replace text
slides_duplicate_slideDuplicate slide

Google YouTube

ToolDescription
youtube_searchSearch YouTube
youtube_get_videoGet video details
youtube_get_channelGet channel details
youtube_get_my_channelGet your channel
youtube_list_playlistsList your playlists
youtube_get_playlist_itemsGet playlist videos
youtube_get_video_commentsGet video comments
youtube_list_subscriptionsList subscriptions
youtube_list_liked_videosList liked videos
youtube_rate_videoLike/dislike video

Google Tasks

ToolDescription
tasks_list_tasklistsList task lists
tasks_create_tasklistCreate task list
tasks_delete_tasklistDelete task list
tasks_list_tasksList tasks
tasks_create_taskCreate a task
tasks_update_taskUpdate a task
tasks_delete_taskDelete a task
tasks_complete_taskMark task complete

Notes (Keep-like)

ToolDescription
notes_createCreate a quick note
notes_listList all notes
notes_updateUpdate a note
notes_deleteDelete a note

Google Forms

ToolDescription
forms_createCreate a new form
forms_getGet form details
forms_update_infoUpdate title/description
forms_add_questionAdd a question
forms_delete_itemDelete form item
forms_list_responsesList form responses
forms_get_responseGet specific response
forms_add_page_breakAdd page break
forms_add_textAdd text item
forms_add_imageAdd image
forms_add_videoAdd YouTube video

Google Chat

ToolDescription
chat_list_spacesList Chat spaces
chat_get_spaceGet space details
chat_create_spaceCreate a space
chat_delete_spaceDelete a space
chat_list_messagesList messages
chat_get_messageGet message details
chat_send_messageSend a message
chat_update_messageUpdate a message
chat_delete_messageDelete a message
chat_list_membersList space members
chat_add_memberAdd a member
chat_remove_memberRemove a member
chat_add_reactionAdd emoji reaction

Google Meet

ToolDescription
meet_create_spaceCreate meeting space
meet_get_spaceGet space details
meet_end_conferenceEnd active meeting
meet_scheduleSchedule a meeting
meet_create_instantCreate instant meeting
meet_get_by_eventGet meeting from event
meet_list_upcomingList upcoming meetings
meet_list_conference_recordsList past meetings
meet_get_conference_recordGet meeting record
meet_list_participantsList participants
meet_list_recordingsList recordings
meet_get_recordingGet recording
meet_list_transcriptsList transcripts
meet_get_transcriptGet transcript
meet_list_transcript_entriesGet transcript text

Examples

Send an Email

Use gmail_send with to "recipient@example.com", subject "Hello", and body "This is a test email."

Create a Calendar Event

Use calendar_create_event with summary "Team Meeting", startDateTime "2025-01-15T10:00:00-05:00", and endDateTime "2025-01-15T11:00:00-05:00"

Search YouTube

Use youtube_search with query "MCP tutorial" and type "video"

Create a Google Doc

Use docs_create with title "Meeting Notes" and content "# Weekly Meeting\n\nAttendees: ..."

Read a Spreadsheet

Use sheets_read with spreadsheetId "abc123" and range "Sheet1!A1:D10"

Search Drive

Use drive_search with query "quarterly report"

Create a Note

Use notes_create with title "Shopping List" and content "- Milk\n- Eggs\n- Bread"

Create a Google Form

Use forms_create with title "Customer Survey" and description "Help us improve our service"

Send a Chat Message

Use chat_send_message with spaceName "spaces/AAAAA" and text "Hello team!"

Schedule a Google Meet

Use meet_schedule with summary "Team Standup", startTime "2025-01-15T09:00:00-05:00", and endTime "2025-01-15T09:30:00-05:00"

Development

bash
# Run in development mode with hot reload
pnpm dev

# Build for production
pnpm build

# Run tests
pnpm test

License

MIT License - see LICENSE for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

将 Google MCP MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Google MCP 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 Google MCP 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Google MCP MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "google-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Google MCP MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Google MCP MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Google MCP 帮我完成这项任务吗?
Google MCP
当然。我已阅读。
以下是我使用 Google MCP 得到的结果。

常见问题

Google MCP MCP 服务器有什么用途?

Google MCP 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Google MCP MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 Google MCP,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 Google MCP MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 Google MCP 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Google MCP MCP 连接到 TypingMind?

Google MCP 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Google MCP MCP 在 TypingMind 中提供哪些工具?

Google MCP 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Google MCP MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 Google MCP 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇