A Model Context Protocol (MCP) server that connects AI assistants to Google Workspace APIs.
- 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
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/git clone https://github.com/tomohiro-owada/google-workspace-mcp.git
cd google-workspace-mcp
go build -o workspace-server ./cmd/workspace-server/Add to ~/.claude.json:
{
"mcpServers": {
"google-workspace": {
"command": "/usr/local/bin/workspace-server"
}
}
}Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"google-workspace": {
"command": "/usr/local/bin/workspace-server"
}
}
}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
This server supports two access modes:
| Mode | Permissions | Setup Required |
|---|---|---|
| Basic | Read-only | None (default) |
| Full Access | Read + Write + Delete | Custom OAuth credentials |
Works out of the box with read-only permissions. No additional setup required.
To enable write operations (send emails, create documents, etc.), you need to set up your own OAuth credentials.
Setup Instructions
- 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
- 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)
- Go to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Select Desktop app
- Download or copy the Client ID and Client Secret
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"
}
}
}
}After configuration, restart the MCP server and run auth.login again.
Auth Tools
| Tool | Description |
|---|---|
auth.login |
Initiate Google OAuth login |
auth.status |
Check authentication status |
auth.clear |
Clear stored credentials |
auth.refreshToken |
Manually refresh token |
Calendar Tools
| 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 |
Gmail Tools
| 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 |
Drive Tools
| 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 |
Docs Tools
| 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 |
Sheets Tools
| 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 |
Slides Tools
| 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 |
Chat Tools
| 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 |
People Tools
| Tool | Description |
|---|---|
people.getMe |
Get authenticated user profile |
people.getUserProfile |
Get user profile by email |
people.getUserRelations |
Get user relations |
Time Tools
| Tool | Description |
|---|---|
time.getCurrentTime |
Get current time |
time.getCurrentDate |
Get current date |
time.getTimeZone |
Get timezone info |
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
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.json に追加:
{
"mcpServers": {
"google-workspace": {
"command": "/usr/local/bin/workspace-server"
}
}
}~/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認証情報が必要 |
追加設定なしで読み取り専用の権限で動作します。
書き込み操作(メール送信、ドキュメント作成など)を有効にするには、独自のOAuth認証情報を設定する必要があります。
セットアップ手順
- 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
- APIとサービス > OAuth 同意画面 に移動
- ユーザータイプを選択:
- 内部: Google Workspace 組織向け(組織内の全メンバーが利用可能)
- 外部: 個人の Gmail アカウント向け(テストユーザーの追加またはGoogle審査が必要)
- 必須項目を入力(アプリ名、ユーザーサポートメール、デベロッパー連絡先)
- スコープを追加(またはスキップ - 実行時に要求されます)
- 外部の場合: テストユーザーを追加(あなたのGmailアドレス)
- APIとサービス > 認証情報 に移動
- 認証情報を作成 > OAuth クライアント ID をクリック
- デスクトップアプリ を選択
- クライアントID と クライアントシークレット をコピー
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"
}
}
}
}設定後、MCPサーバーを再起動し、auth.login を再実行してください。
このサーバーは AI アシスタントに Google Workspace データの読み取り・変更・削除の権限を付与します。以下の点に注意してください:
- AI アシスタントが行うアクションを確認する
- 信頼できないコンテンツ(不明な送信元からのメール、ドキュメントなど)を処理しない
- 認証情報はシステムキーチェーンに安全に保存されます
Apache License 2.0