
Gws Connector
io.github.orieg由 GitHub 账号 orieg 发布v0.4.3更新于 Oct 24, 2026
Multi-account Google Workspace MCP — Gmail, Calendar, Drive, Sheets, Docs with smart routing.
概览
让助手通过标签、邮箱或域名路由,读取和操作多个 Gmail、日历、Drive、表格、文档、联系人、任务和幻灯片账户。
- 可以做什么
- GWS Connector 是一个本地 MCP 服务器,提供 49 个 Google Workspace 工具:Gmail 搜索、读取、草稿和标签;日历事件与空闲/忙碌查询;Drive 搜索与文件读取;表格读写与追加;文档读取与编辑;联系人搜索;任务;以及幻灯片。每个工具都接受可选的 account 参数,可按标签、邮箱地址或域名将请求路由到指定账户,否则使用默认账户。账户管理工具可添加、重新授权、列出、移除账户并设置默认账户。
- 适用场景
- 适合同时使用多个 Google 账户(例如个人加工作、或多个客户组织)并希望在一个助手会话中统一查询和更新的场景。如果只使用一个 Google 账户,则意义不大。
- 运行要求
- 以 stdio 方式在本地运行;提供预编译 Go 二进制、Claude Code 插件、Gemini 扩展、.mcpb 包或 Docker 镜像。需要一个启用了相关 API 的 Google Cloud 项目、配置了所列范围的 OAuth 同意屏幕、添加测试用户,以及桌面应用类型的 OAuth 客户端凭据。可选环境变量:GWS_GOOGLE_CLIENT_ID、GWS_GOOGLE_CLIENT_SECRET、GWS_STATE_DIR。交互式 OAuth 会打开浏览器,需要主机访问权限。
安装
在 SourceWeft 中
- 打开 控制台中的 Gws Connector,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
GWS Connector
[CI] [Release] [Go] [License: MIT]
Multi-account Google Workspace MCP server — connect multiple Gmail, Google Calendar, and Google Drive accounts with smart routing.
Works with Claude Code, Gemini CLI, GitHub Copilot, Cursor, OpenAI Codex, and any MCP-compatible client.
Why
Most AI coding assistants support a single Google account. If you use multiple Google accounts (personal + work, multiple clients, different orgs), you need to switch between them manually. This MCP server lets you connect them all at once and route requests by label, email, or domain.
Features
- Multi-account — connect unlimited Gmail and Google Workspace accounts
- Smart routing — target accounts by label (
work), email, or domain - Per-account OAuth — different orgs can use their own GCP credentials
- Secure storage — client secrets and tokens stored in OS keychain (file fallback on Linux without GNOME Keyring)
- 49 tools — Mail (11), Calendar (7), Drive (3), Sheets (8), Docs (4), Contacts (2), Tasks (5), Slides (3), account management (6)
- Account management — add, remove, set default, list accounts
- Cross-platform — standard MCP server works with any compatible client
How it compares
There are several good Google Workspace MCP servers. GWS Connector is the one to pick when multiple accounts and operational simplicity matter:
If you only ever use a single Google account and want the widest possible tool surface (Forms, Chat, Vault, …), a single-account server like taylorwilsdon/google_workspace_mcp may fit better. GWS Connector focuses on doing multi-account Gmail / Calendar / Drive / Sheets / Docs / Contacts / Tasks / Slides cleanly and securely.
Upgrading (Google Tasks)
The Google Tasks tools (gws.tasks.*) are added behind one new OAuth scope
(tasks). Existing users must re-authorize each connected account so new
tokens are minted with this scope:
Before approving the browser consent screen, review what the new scope grants — full read and write access to the account's Google Tasks lists and tasks. See the scope rationale table below for details.
You must also add the tasks scope and enable the Tasks API in your GCP
project's OAuth consent screen configuration before re-auth, or the consent
screen will reject the request. Until an account is re-authorized, the
gws.tasks.* tools return an insufficient-scope error naming the reauth tool
to run.
Upgrading — Contacts / People API
The Contacts tools (gws.contacts.search, gws.contacts.directory_search)
add two new read-only OAuth scopes (contacts.readonly, directory.readonly).
Existing users must re-authorize each connected account so new tokens are
minted with these scopes:
Before approving the browser consent screen, review what the new scopes grant — read-only access to your Google Contacts and (for Workspace accounts) the organization directory. See the scope rationale table below for details.
You must also enable the People API and add the two new scopes in your GCP
project's OAuth consent screen configuration before re-auth, or the consent
screen will reject the request. gws.contacts.directory_search requires a
Google Workspace account — personal Gmail accounts have no organization
directory and receive a clear explanatory message instead of results.
Upgrading (Google Slides tools)
The Slides tools (gws.slides.*) add one new OAuth scope,
https://www.googleapis.com/auth/presentations. Existing users must
re-authorize each connected account so new tokens are minted with the
Slides scope:
You must also enable the Slides API and add the presentations scope in
your GCP project's OAuth consent screen configuration before re-auth, or the
consent screen will reject the request (see Google Cloud
Setup). Until you re-authorize, gws.slides.* calls
return a scope error telling the agent to run gws.accounts.reauth; all other
tools keep working.
Upgrading from v0.2.x
v0.3.0 adds native Google Sheets and Google Docs tools behind two new OAuth
scopes (spreadsheets, documents). Existing users must re-authorize
each connected account so new tokens are minted with these scopes:
Before approving the browser consent screen, review what the new scopes grant — full read and write access to every spreadsheet and document in that account's Google Drive, including files shared with the account. See the scope rationale table below for details.
You must also add the two new scopes (and enable the Sheets and Docs APIs) in your GCP project's OAuth consent screen configuration before re-auth, or the consent screen will reject the request.
Quick Start (Claude Code)
1. Install the plugin — run these two commands inside Claude Code:
2. Set up Google Cloud credentials — the interactive wizard walks you through everything:
This creates a GCP project, enables APIs, and connects your first account. See Google Cloud Setup if you prefer manual steps.
3. Connect additional accounts:
Each account can use different OAuth credentials from different GCP projects.
Gemini CLI
The binary is downloaded automatically on first use. Then connect accounts inside Gemini:
Other clients
GitHub Copilot / Cursor / Codex / Any MCP client
Download a prebuilt binary or build from source:
Then configure your client:
Connect accounts via MCP tool call:
Environment variables (all optional): GWS_GOOGLE_CLIENT_ID, GWS_GOOGLE_CLIENT_SECRET, GWS_STATE_DIR
The --use-dot-names flag uses gws.mail.search naming; without it, tools use gws_mail_search.
Local development / testing
Use /reload-plugins inside the session after making changes. Run claude --debug --plugin-dir ./ to troubleshoot plugin loading.
Claude Desktop / MCPB bundle
Each release attaches a
one-click gws-mcp.mcpb bundle. Download it and open it with Claude Desktop
(Settings → Extensions → install from file), or drag it in. The bundle contains
the binaries for macOS and Linux and picks the right one for your machine
automatically. You still complete the Google Cloud setup
and connect accounts on first use.
The server is also published to the
official MCP Registry as
io.github.orieg/gws-connector, so MCP clients that browse the registry can find
and install it directly.
Docker
A multi-arch image is published to GHCR on each release:
The server speaks MCP over stdio. Interactive OAuth (accounts.add / reauth)
opens a browser and stores secrets in the OS keychain, so it needs host access —
day-to-day use is best via the native binary, the Claude Code plugin, or the
Gemini extension. The image is well suited to headless stdio integrations and to
registry/introspection checks. Persist the account registry across runs by
mounting a volume and pointing GWS_STATE_DIR at it:
Usage
All gws.* tools accept an optional account parameter:
Available tools
Skills
Interactive workflows available in both Claude Code and Gemini CLI:
Recipes
Once accounts are connected, just ask your assistant in plain language — it picks the tools and the account. Examples:
- Morning triage across accounts — "Summarize my unread email from the last 24 hours across all accounts, grouped by account, and flag anything that needs a reply today."
- Draft a reply in a thread — "Find the thread with Acme about the Q3 invoice on my work account and draft a reply confirming the new date. Don't send it."
- Turn an email into a calendar event — "Read the latest message from the events team and create a calendar event on my personal calendar with the date and location from it."
- Cross-account digest — "What meetings do I have tomorrow across my work and personal calendars? List them in one timeline."
- Find and summarize a doc — "Search my client-acme Drive for the latest 'statement of work' and give me the key deliverables and dates."
- Log to a spreadsheet — "Append a row to the 'Expenses' sheet in my personal Drive: today's date, 'AWS', 42.50."
- Keep inbox tidy — "Label all unread messages from newsletters@ as 'Newsletters' and mark them read on my personal account."
Tips:
- Target an account explicitly with its label ("on my work account"), by email, or by domain — otherwise the default account is used.
- Write operations (drafts, events, sheet/doc edits) are previewed for your confirmation before anything is sent or changed.
Google Cloud Setup
One-time setup:
-
Go to Google Cloud Console and create a new project (e.g., "GWS Connector")
-
Enable APIs — click each link and hit "Enable":
-
Configure the OAuth consent screen:
- Choose "External" (or "Internal" for Google Workspace orgs)
- Fill in the app name (e.g., "Claude GWS") and your email for support contact
- Click "Save"
-
Add scopes — go to Data Access:
- Click "Add or Remove Scopes"
- Add these 11 scopes (paste into the "Manually add scopes" box):
https://www.googleapis.com/auth/gmail.modifyhttps://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/spreadsheetshttps://www.googleapis.com/auth/documentshttps://www.googleapis.com/auth/contacts.readonlyhttps://www.googleapis.com/auth/directory.readonlyhttps://www.googleapis.com/auth/taskshttps://www.googleapis.com/auth/presentationshttps://www.googleapis.com/auth/userinfo.emailhttps://www.googleapis.com/auth/userinfo.profile
- Click "Update", then "Save"
Why each scope is requested:
-
Add test users — go to Audience:
- Add each Google email address you plan to connect
- ⚠️ This is required — without this you'll get "Access blocked: has not completed the Google verification process" (error 403) during OAuth
-
Create OAuth credentials — go to Clients:
- Click "+ Create Client" → "OAuth client ID"
- Application type: Desktop app
- Click "Create"
- Download the JSON file (click the download icon) — this contains your Client ID and Client Secret
Multiple organizations
If you connect accounts from different Google Workspace orgs, each org needs its own GCP project. Create OAuth credentials in each project and provide them when connecting:
Client secrets are stored in the OS keychain. Client IDs are stored in the account registry.
Architecture
- Token storage: OS keychain (macOS Keychain, GNOME Keyring, Windows Credential Manager) with automatic file fallback
- Client secrets: OS keychain per account (not stored in config files)
- Account registry: JSON file at
~/.claude/channels/gws/accounts.json(contains client IDs and metadata, no secrets) - Credential resolution: per-account credentials (keychain) → global env var fallback
- Protocol: MCP (Model Context Protocol) over stdio — compatible with any MCP client
Development
License
MIT — see LICENSE.
来源:README.md,提交 0b6364b
工具
0版本历史
4- v0.4.3最新Sep 25, 2026
- v0.4.2Sep 25, 2026
- v0.4.1Sep 25, 2026
- v0.3.5Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
