Gws MCP Server
MCP server that exposes Google Workspace CLI (gws) as Model Context Protocol tools
Ask AI about Gws MCP Server
Powered by Claude Β· Grounded in docs
I know everything about Gws MCP Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
gws-mcp-server
MCP server that exposes Google Workspace CLI (gws) operations as Model Context Protocol tools.
Why?
The gws CLI had a built-in MCP server that was removed in v0.8.0 because it exposed 200-400 tools β causing context window bloat in MCP clients. This server takes a curated approach: you choose which Google services to expose, and only a focused set of high-value, narrowly scoped operations are registered as tools.
Prerequisites
- Node.js 18+
gwsCLI installed and authenticated (npm install -g @googleworkspace/cli && gws auth login)
Quick start
# Install
npm install -g gws-mcp-server
# Or run from source
git clone https://github.com/conorbronsdon/gws-mcp-server.git
cd gws-mcp-server
npm install && npm run build
Configuration
Claude Code (.mcp.json)
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": [
"gws-mcp-server",
"--services", "drive,sheets,calendar,docs,gmail"
]
}
}
}
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": [
"gws-mcp-server",
"--services", "drive,sheets,calendar"
]
}
}
}
Options
| Flag | Description | Default |
|---|---|---|
--services, -s | Comma-separated list of services to expose | All services |
--gws-path | Path to the gws binary | gws |
Available services & tools
drive (8 tools)
drive_files_listβ Search and list filesdrive_files_getβ Get file metadatadrive_files_createβ Create files (with optional upload)drive_files_copyβ Copy files (useful for format conversion)drive_files_updateβ Update file metadata/contentdrive_files_deleteβ Delete filesdrive_files_exportβ Export Google Workspace files (Doc, Sheet, Slide) to other formatsdrive_permissions_createβ Share files
sheets (4 tools)
sheets_getβ Get spreadsheet metadatasheets_values_getβ Read cell valuessheets_values_updateβ Write cell valuessheets_values_appendβ Append rows
calendar (5 tools)
calendar_events_listβ List eventscalendar_events_getβ Get event detailscalendar_events_insertβ Create eventscalendar_events_updateβ Update eventscalendar_events_deleteβ Delete events
docs (3 tools)
docs_getβ Get document contentdocs_createβ Create documentsdocs_batchUpdateβ Apply document updates
gmail (4 tools)
gmail_messages_listβ Search messagesgmail_messages_getβ Read a messagegmail_threads_listβ Search threadsgmail_threads_getβ Read a full thread
Total: 24 tools (vs 200-400 in the old implementation)
Adding new tools
Edit src/services.ts to add tool definitions. Each tool maps directly to a gws CLI command:
{
name: "drive_files_list", // MCP tool name
description: "List files in Drive", // Shown to AI
command: ["drive", "files", "list"],// gws CLI args
params: [ // Maps to --params JSON
{ name: "q", description: "Search query", type: "string", required: false },
],
bodyParams: [ // Maps to --json body
{ name: "name", description: "File name", type: "string", required: true },
],
}
Architecture
MCP Client (Claude) ββ stdio ββ gws-mcp-server ββ gws CLI ββ Google APIs
The server is a thin wrapper: it translates MCP tool calls into gws CLI invocations, passes --params and --json as appropriate, and returns the JSON output.
Disclaimer
All views, opinions, and statements expressed on this account are solely my own and are made in my personal capacity. They do not reflect, and should not be construed as reflecting, the views, positions, or policies of Modular. This account is not affiliated with, authorized by, or endorsed by Modular in any way.
License
MIT
