Allows for searching and reading Gmail messages and threads to manage email communication programmatically.
Provides tools for managing Google Workspace services, including file operations in Google Drive, spreadsheet manipulation in Google Sheets, event management in Google Calendar, and document editing in Google Docs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Workspace MCP ServerSearch my Gmail for recent messages about the project status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gws-mcp-server
MCP server that exposes Google Workspace CLI ( 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
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 buildConfiguration
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 |
| Comma-separated list of services to expose | All services |
| Path to the |
|
Available services & tools
drive (7 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_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: 23 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 APIsThe 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.
License
MIT