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.
接入你的智能体
從發布者安裝。不是 PlugMCP 端點。
遠端 URL 還是本機指令? 兩種安裝方式的差異
來自發布者
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.
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
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.
# Clone the repository
cd google-mcp
# Install dependencies
pnpm install
# Build the project
pnpm build
Before using this server, you need to set up Google Cloud credentials:
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:
{
"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"]
}
}
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:
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:
{
"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.
On first use, call the google_auth tool to initiate OAuth authentication:
Tokens are stored locally and will be refreshed automatically:
~/.local/share/google-mcp/tokens.json (or $XDG_DATA_HOME/google-mcp/)~/Library/Application Support/google-mcp/tokens.json%APPDATA%\google-mcp\tokens.jsonTools 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.
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.
Use gmail_send with to "[email protected]", subject "Hello", and body "This is a test email."
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"
Use youtube_search with query "MCP tutorial" and type "video"
Use docs_create with title "Meeting Notes" and content "# Weekly Meeting\n\nAttendees: ..."
Use sheets_read with spreadsheetId "abc123" and range "Sheet1!A1:D10"
Use drive_search with query "quarterly report"
Use notes_create with title "Shopping List" and content "- Milk\n- Eggs\n- Bread"
Use forms_create with title "Customer Survey" and description "Help us improve our service"
Use chat_send_message with spaceName "spaces/AAAAA" and text "Hello team!"
Use meet_schedule with summary "Team Standup", startTime "2025-01-15T09:00:00-05:00", and endTime "2025-01-15T09:30:00-05:00"
# Run in development mode with hot reload
pnpm dev
# Build for production
pnpm build
# Run tests
pnpm test
MIT License - see LICENSE for details.
Contributions are welcome! Please feel free to submit a Pull Request.
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
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
Google 透過 stdio 在本機執行。
上次檢查時間:2026-10-28。 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