Logo Google MCP

Google MCP

Cộng đồng
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

Nhà phát hànhquinnjr
Kho mãgoogle-mcp
Ngôn ngữTypeScript
Bản fork
10
Sao
11
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Google MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    11 sao và 10 bản fork từ kho mã được liên kết.

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.

Dùng MCP Google MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Google MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Google MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Google MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "google-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Google MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Google MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Google MCP giúp tôi làm việc này không?
Google MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Google MCP.

Câu hỏi thường gặp

Máy chủ MCP Google MCP dùng để làm gì?

Google MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Google MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Google MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Google MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Google MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Google MCP với TypingMind?

Google MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Google MCP cung cấp những công cụ nào trong TypingMind?

Google MCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Google MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Google MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇