feat: add MCP server for Google Workspace#365
Open
howardpen9 wants to merge 1 commit intogoogleworkspace:mainfrom
Open
feat: add MCP server for Google Workspace#365howardpen9 wants to merge 1 commit intogoogleworkspace:mainfrom
howardpen9 wants to merge 1 commit intogoogleworkspace:mainfrom
Conversation
Adds a TypeScript MCP (Model Context Protocol) server that wraps the gws CLI, enabling any MCP client (Claude Desktop, Cursor, Zed, etc.) to interact with Google Workspace APIs as tools. Features: - Per-service tools (gws_drive, gws_gmail, gws_calendar, etc.) - Schema introspection tool for API discovery - Generic gws_run tool for advanced commands - Auth status check tool - Services resource listing The server delegates to the gws binary via exec, so all existing features (auth, pagination, dry-run, Model Armor) work out of the box.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
🦋 Changeset detectedLatest commit: a70cc3f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a TypeScript MCP (Model Context Protocol) server that wraps the
gwsCLI, enabling any MCP-compatible client (Claude Desktop, Cursor, Zed, Windsurf, etc.) to interact with Google Workspace APIs as tools.Motivation
The
gwsCLI already has structured JSON output and 100+ commands — a perfect fit for MCP tools. Currently there's no good Google Workspace MCP server in the ecosystem. This bridges that gap by wrappinggwsrather than reimplementing API calls, so all existing features (auth, pagination, dry-run, Model Armor) work automatically.What's included
Tools (17 total)
Per-service tools — one for each Workspace service:
gws_drive,gws_gmail,gws_calendar,gws_sheets,gws_docs,gws_slides,gws_tasks,gws_people,gws_chat,gws_classroom,gws_forms,gws_keep,gws_meet,gws_admin_reportsUtility tools:
gws_run— run any arbitrarygwscommand (escape hatch)gws_schema— introspect API method schemas for discoverygws_auth_status— check authentication stateResources
gws://services— list all available servicesArchitecture
The server shells out to
gwsrather than calling Google APIs directly. Benefits:gws(no extra credential management)gwsfeatures work: pagination, dry-run, Model Armor sanitizationgwsadds APIs,gws_runcovers them immediatelyUsage
{ "mcpServers": { "google-workspace": { "command": "npx", "args": ["-y", "@googleworkspace/mcp-server"] } } }Checklist
@modelcontextprotocol/sdk