Google Workspace MCP
Connects AI assistants to Google Workspace APIs, enabling management of Calendar, Gmail, Drive, Docs, Sheets, Slides, Chat, and People.
README
Google Workspace MCP
A Model Context Protocol (MCP) server that connects AI assistants to Google Workspace APIs.
English
Features
- Google Calendar - Create, update, delete events, find free time
- Gmail - Search, read, send emails, manage labels
- Google Drive - Search files, create folders, download files
- Google Docs - Create, read, edit documents with Markdown support
- Google Sheets - Read spreadsheet data in multiple formats
- Google Slides - Read presentation content
- Google Chat - Send messages, manage spaces
- People API - Get user profiles and relations
Installation
Download Binary
Download the latest binary from Releases:
| Platform | Architecture | Download |
|---|---|---|
| macOS | Apple Silicon (M1/M2/M3) | workspace-server-darwin-arm64 |
| macOS | Intel | workspace-server-darwin-amd64 |
| Linux | x86_64 | workspace-server-linux-amd64 |
| Linux | ARM64 | workspace-server-linux-arm64 |
| Windows | x86_64 | workspace-server-windows-amd64.exe |
# Example: macOS Apple Silicon
curl -L -o workspace-server https://github.com/tomohiro-owada/google-workspace-mcp/releases/latest/download/workspace-server-darwin-arm64
chmod +x workspace-server
sudo mv workspace-server /usr/local/bin/
Build from Source
git clone https://github.com/tomohiro-owada/google-workspace-mcp.git
cd google-workspace-mcp
go build -o workspace-server ./cmd/workspace-server/
Configuration
Claude Code
Add to ~/.claude.json:
{
"mcpServers": {
"google-workspace": {
"command": "/usr/local/bin/workspace-server"
}
}
}
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"google-workspace": {
"command": "/usr/local/bin/workspace-server"
}
}
}
Authentication
This server uses OAuth 2.0 for Google authentication. On first use, you need to authenticate:
# Check auth status
auth.status
# Login (opens browser)
auth.login
# Clear credentials
auth.clear
Access Modes
This server supports two access modes:
| Mode | Permissions | Setup Required |
|---|---|---|
| Basic | Read-only | None (default) |
| Full Access | Read + Write + Delete | Custom OAuth credentials |
Basic Mode (Default)
Works out of the box with read-only permissions. No additional setup required.
Full Access Mode
To enable write operations (send emails, create documents, etc.), you need to set up your own OAuth credentials.
<details> <summary><b>Setup Instructions</b></summary>
1. Create a Google Cloud Project
- Go to Google Cloud Console
- Create a new project (e.g.,
workspace-mcp) - Enable the following APIs:
- Google Calendar API
- Gmail API
- Google Drive API
- Google Docs API
- Google Sheets API
- Google Slides API
- Google Chat API
- People API
2. Configure OAuth Consent Screen
- Go to APIs & Services > OAuth consent screen
- Choose User Type:
- Internal: For Google Workspace organizations (all members can use)
- External: For personal Gmail accounts (requires adding test users or Google verification)
- Fill in the required fields (App name, User support email, Developer contact)
- Add scopes (or skip - they'll be requested at runtime)
- If External: Add test users (your Gmail address)
3. Create OAuth Credentials
- Go to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Select Desktop app
- Download or copy the Client ID and Client Secret
4. Configure the MCP Server
Add environment variables to your MCP configuration:
Claude Code (~/.claude.json):
{
"mcpServers": {
"google-workspace": {
"command": "/usr/local/bin/workspace-server",
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"google-workspace": {
"command": "/usr/local/bin/workspace-server",
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}
5. Re-authenticate
After configuration, restart the MCP server and run auth.login again.
</details>
Available Tools
<details> <summary><b>Auth Tools</b></summary>
| Tool | Description |
|---|---|
auth.login |
Initiate Google OAuth login |
auth.status |
Check authentication status |
auth.clear |
Clear stored credentials |
auth.refreshToken |
Manually refresh token |
</details>
<details> <summary><b>Calendar Tools</b></summary>
| Tool | Description |
|---|---|
calendar.list |
List all calendars |
calendar.listEvents |
List events in a time range |
calendar.getEvent |
Get event details |
calendar.createEvent |
Create a new event |
calendar.updateEvent |
Update an existing event |
calendar.deleteEvent |
Delete an event |
calendar.respondToEvent |
Accept/decline/tentative |
calendar.findFreeTime |
Find available time slots |
</details>
<details> <summary><b>Gmail Tools</b></summary>
| Tool | Description |
|---|---|
gmail.search |
Search emails |
gmail.get |
Get email content |
gmail.send |
Send an email |
gmail.sendWithAttachments |
Send with file attachments |
gmail.createDraft |
Create a draft |
gmail.sendDraft |
Send a draft |
gmail.modify |
Add/remove labels |
gmail.listLabels |
List all labels |
gmail.createLabel |
Create a label |
gmail.deleteLabel |
Delete a label |
gmail.downloadAttachment |
Download attachment |
gmail.trashMessage |
Move to trash |
gmail.untrashMessage |
Restore from trash |
gmail.getVacationSettings |
Get vacation settings |
gmail.setVacationSettings |
Set vacation auto-reply |
</details>
<details> <summary><b>Drive Tools</b></summary>
| Tool | Description |
|---|---|
drive.search |
Search files and folders |
drive.findFolder |
Find folder by name |
drive.createFolder |
Create a new folder |
drive.downloadFile |
Download a file |
drive.uploadFile |
Upload a local file |
drive.copyFile |
Copy a file |
drive.moveFile |
Move a file to folder |
drive.deleteFile |
Trash or permanently delete |
drive.getFileInfo |
Get detailed file info |
drive.shareFile |
Share with user or public |
drive.removeShare |
Remove sharing permission |
drive.listTrash |
List files in trash |
drive.restoreFile |
Restore from trash |
drive.emptyTrash |
Empty trash |
</details>
<details> <summary><b>Docs Tools</b></summary>
| Tool | Description |
|---|---|
docs.create |
Create a new document |
docs.getText |
Get document content |
docs.insertText |
Insert text at beginning |
docs.appendText |
Append text at end |
docs.replaceText |
Find and replace text |
docs.move |
Move document to folder |
docs.find |
Search documents by title |
docs.extractIdFromUrl |
Extract ID from URL |
</details>
<details> <summary><b>Sheets Tools</b></summary>
| Tool | Description |
|---|---|
sheets.getText |
Get sheet content (text/csv/json) |
sheets.getRange |
Get values from range |
sheets.getMetadata |
Get spreadsheet metadata |
sheets.find |
Search spreadsheets by title |
sheets.create |
Create a new spreadsheet |
sheets.updateRange |
Update values in range |
sheets.appendRows |
Append rows to sheet |
sheets.clearRange |
Clear values in range |
sheets.createSheet |
Create new sheet tab |
sheets.deleteSheet |
Delete sheet tab |
</details>
<details> <summary><b>Slides Tools</b></summary>
| Tool | Description |
|---|---|
slides.getText |
Get presentation text |
slides.getMetadata |
Get presentation metadata |
slides.find |
Search presentations by title |
slides.create |
Create new presentation |
slides.addSlide |
Add a new slide |
slides.deleteSlide |
Delete a slide |
slides.addTextBox |
Add text box to slide |
slides.addImage |
Add image to slide |
slides.updateText |
Update text in shape |
</details>
<details> <summary><b>Chat Tools</b></summary>
| Tool | Description |
|---|---|
chat.listSpaces |
List all spaces |
chat.findSpaceByName |
Find space by name |
chat.findDmByEmail |
Find DM by email |
chat.getMessages |
Get messages from space |
chat.listThreads |
List threads in space |
chat.sendMessage |
Send message to space |
chat.sendDm |
Send direct message |
chat.setUpSpace |
Create a new space |
</details>
<details> <summary><b>People Tools</b></summary>
| Tool | Description |
|---|---|
people.getMe |
Get authenticated user profile |
people.getUserProfile |
Get user profile by email |
people.getUserRelations |
Get user relations |
</details>
<details> <summary><b>Time Tools</b></summary>
| Tool | Description |
|---|---|
time.getCurrentTime |
Get current time |
time.getCurrentDate |
Get current date |
time.getTimeZone |
Get timezone info |
</details>
Security
This server grants AI assistants access to read, modify, and delete your Google Workspace data. Use with caution:
- Review actions taken by AI assistants
- Don't process untrusted content (emails, documents from unknown sources)
- Credentials are stored securely using system keychain
License
Apache License 2.0
日本語
概要
Google Workspace MCP は、AIアシスタント(Claude Code、Claude Desktop など)を Google Workspace API に接続する Model Context Protocol (MCP) サーバーです。
機能
- Google カレンダー - イベントの作成・更新・削除、空き時間の検索
- Gmail - メールの検索・閲覧・送信、ラベル管理
- Google ドライブ - ファイル検索、フォルダ作成、ファイルダウンロード
- Google ドキュメント - ドキュメントの作成・閲覧・編集(Markdown対応)
- Google スプレッドシート - データの読み取り(テキスト/CSV/JSON形式)
- Google スライド - プレゼンテーション内容の読み取り
- Google Chat - メッセージ送信、スペース管理
- People API - ユーザープロフィール・組織情報の取得
インストール
バイナリをダウンロード
Releases から最新のバイナリをダウンロード:
| プラットフォーム | アーキテクチャ | ファイル名 |
|---|---|---|
| macOS | Apple Silicon (M1/M2/M3) | workspace-server-darwin-arm64 |
| macOS | Intel | workspace-server-darwin-amd64 |
| Linux | x86_64 | workspace-server-linux-amd64 |
| Linux | ARM64 | workspace-server-linux-arm64 |
| Windows | x86_64 | workspace-server-windows-amd64.exe |
# 例: macOS Apple Silicon
curl -L -o workspace-server https://github.com/tomohiro-owada/google-workspace-mcp/releases/latest/download/workspace-server-darwin-arm64
chmod +x workspace-server
sudo mv workspace-server /usr/local/bin/
ソースからビルド
git clone https://github.com/tomohiro-owada/google-workspace-mcp.git
cd google-workspace-mcp
go build -o workspace-server ./cmd/workspace-server/
設定
Claude Code
~/.claude.json に追加:
{
"mcpServers": {
"google-workspace": {
"command": "/usr/local/bin/workspace-server"
}
}
}
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) に追加:
{
"mcpServers": {
"google-workspace": {
"command": "/usr/local/bin/workspace-server"
}
}
}
認証
OAuth 2.0 を使用して Google 認証を行います。初回使用時は認証が必要です:
# 認証状態を確認
auth.status
# ログイン(ブラウザが開きます)
auth.login
# 認証情報をクリア
auth.clear
アクセスモード
このサーバーは2つのアクセスモードをサポートしています:
| モード | 権限 | セットアップ |
|---|---|---|
| Basic | 読み取り専用 | 不要(デフォルト) |
| Full Access | 読み取り + 書き込み + 削除 | カスタムOAuth認証情報が必要 |
Basic モード(デフォルト)
追加設定なしで読み取り専用の権限で動作します。
Full Access モード
書き込み操作(メール送信、ドキュメント作成など)を有効にするには、独自のOAuth認証情報を設定する必要があります。
<details> <summary><b>セットアップ手順</b></summary>
1. Google Cloud プロジェクトを作成
- Google Cloud Console にアクセス
- 新しいプロジェクトを作成(例:
workspace-mcp) - 以下のAPIを有効化:
- Google Calendar API
- Gmail API
- Google Drive API
- Google Docs API
- Google Sheets API
- Google Slides API
- Google Chat API
- People API
2. OAuth 同意画面を設定
- APIとサービス > OAuth 同意画面 に移動
- ユーザータイプを選択:
- 内部: Google Workspace 組織向け(組織内の全メンバーが利用可能)
- 外部: 個人の Gmail アカウント向け(テストユーザーの追加またはGoogle審査が必要)
- 必須項目を入力(アプリ名、ユーザーサポートメール、デベロッパー連絡先)
- スコープを追加(またはスキップ - 実行時に要求されます)
- 外部の場合: テストユーザーを追加(あなたのGmailアドレス)
3. OAuth 認証情報を作成
- APIとサービス > 認証情報 に移動
- 認証情報を作成 > OAuth クライアント ID をクリック
- デスクトップアプリ を選択
- クライアントID と クライアントシークレット をコピー
4. MCP サーバーを設定
MCP設定に環境変数を追加:
Claude Code (~/.claude.json):
{
"mcpServers": {
"google-workspace": {
"command": "/usr/local/bin/workspace-server",
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"google-workspace": {
"command": "/usr/local/bin/workspace-server",
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}
5. 再認証
設定後、MCPサーバーを再起動し、auth.login を再実行してください。
</details>
セキュリティ
このサーバーは AI アシスタントに Google Workspace データの読み取り・変更・削除の権限を付与します。以下の点に注意してください:
- AI アシスタントが行うアクションを確認する
- 信頼できないコンテンツ(不明な送信元からのメール、ドキュメントなど)を処理しない
- 認証情報はシステムキーチェーンに安全に保存されます
ライセンス
Apache License 2.0
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。