gws-mcp
Provides tools for reading from and appending to Google Sheets, including finding a spreadsheet by name, reading a range in A1 notation, and appending rows with optional dedup and dry-run preview.
Click on "Deploy 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., "@gws-mcpappend these leads to the Q3 lead tracker sheet"
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 (Google Workspace MCP Server)
A Model Context Protocol (MCP) server providing safe, auditable, and comprehensive control over Google Drive, Google Sheets, Google Docs, and Google Slides.
Built for AI agents and scheduled pipelines to create, read, edit, format, and organize Google Workspace resources with safety-first guardrails (dry_run previews and append-only audit logs).
๐ Key Features
Safe-by-Default Execution: Every mutating tool implements a two-phase
plan()$\to$execute()pipeline with dry-run support. Passingdry_run: truecomputes the exact diff without modifying resources.Append-Only Audit Logging: All mutations record intent and outcome entries to a local JSONL audit trail without logging customer data or PII.
Dual Authentication Modes:
Service Account (
AUTH_MODE=service_account): Ideal for backend automations, CRMs, and scheduled workers operating on shared files.User OAuth 2.0 (
AUTH_MODE=oauth): For interactive user sessions with support for creating new files in personal Google Drives.
Rich Formatting Engine: Pixel-level styling, typography, RGB colors, alignments, wrap rules, bullet lists, dimension management, tables, and images.
Related MCP server: mcp-gsheet
๐งฐ Complete Tool Catalog (24 Tools)
๐ Google Sheets (9 Tools)
sheets_read_rangeโ Read cell values using standard A1 notation (e.g."Leads!A1:F50").sheets_append_rowsโ Append rows with deduplication keys (dedupKey) and formula injection defense.sheets_update_rangeโ Overwrite cell values or write to new columns with before/after diffs in dry-run mode.sheets_formatโ Format cells: bold, italic, strikethrough, underline, font size, font family, text RGB, background RGB, number formats, horizontal/vertical alignment (TOP/MIDDLE/BOTTOM), text wrapping (WRAP/CLIP/OVERFLOW), column widths, row heights, and freeze panes.sheets_manage_dimensionsโ Structural operations: insert blank rows/columns anywhere, delete row/column ranges, or append dimensions to expand sheet boundaries.sheets_clearโ ClearVALUES,FORMAT, orALLacross a range without deleting grid rows.sheets_add_tabโ Create new tabs with optional header row initialization.sheets_duplicate_tabโ Clone an existing tab (preserving formulas, styles, and data) into a new tab.sheets_delete_tabโ Delete a tab by name (with safeguards against deleting the last remaining tab).
๐ Google Docs (8 Tools)
docs_readโ Read complete plain text content from documents, tables, and outlines.docs_styleโ Format text and paragraphs: headings (HEADING_1toHEADING_6,TITLE,SUBTITLE), bold, italic, underline, strikethrough, font size, font family, foreground RGB, background highlight RGB, hyperlinks (link), paragraph alignment, line spacing, and paragraph margins (spaceAbove,spaceBelow).docs_insert_textโ Insert text at specific character indices or append to body/headers/footers.docs_replace_textโ Search and replace template placeholders (e.g.{{client_name}}) case-sensitively or insensitively.docs_insert_tableโ Insert $R \times C$ tables at any character position or append to the end.docs_insert_imageโ Insert inline or floating/positioned images with custom dimensions, offsets, and text wrap modes (WRAP_TEXT,IN_FRONT_OF_TEXT,BEHIND_TEXT, etc.).docs_insert_bulletsโ Convert paragraphs into bulleted lists (BULLET_DISC_CIRCLE_SQUARE,BULLET_CHECKBOX,NUMBERED_DECIMAL_ALPHA_ROMAN, etc.) or remove bullets.docs_delete_contentโ Remove character ranges or sections from document body, headers, or footers.
๐ฝ๏ธ Google Slides (6 Tools)
slides_readโ Read presentation structure, slide IDs, elements, and extracted text.slides_createโ Create a new blank presentation or copy from a template deck.slides_add_slideโ Insert a new slide with predefined layouts (TITLE_AND_BODY,SECTION_HEADER,MAIN_POINT,BLANK, etc.).slides_duplicate_slideโ Duplicate a designed slide layout to populate repeated items (e.g. case studies, portfolios).slides_replace_textโ Find and replace{{placeholders}}across the entire deck.slides_insert_imageโ Insert images onto slides at specific $(X, Y)$ positions and sizes.
๐ Google Drive (5 Tools)
drive_findโ Search files and folders by name and MIME type with pagination and truncation awareness.drive_createโ Create a new Google Doc, Google Sheet, Google Slides presentation, or Drive folder.drive_copyโ Duplicate an existing file or template.drive_shareโ Share files or folders with user emails (reader,commenter,writer/editor).drive_moveโ Move files between folders or rename files.
๐ Setup & Installation
1. Prerequisites
Node.js 20+
A Google Cloud Project with the following APIs enabled:
Google Drive API
Google Sheets API
Google Docs API
Google Slides API
2. Configure Environment
Copy .env.example to .env:
cp .env.example .envOption A: Service Account (Recommended for Automations)
In Google Cloud Console, create a Service Account and download its JSON key file.
Share the target Google Drive folders/files with the service account email.
In
.env:AUTH_MODE=service_account GOOGLE_SA_KEY_PATH=./sa-key.json
Option B: User OAuth 2.0 (For Personal User Drives)
In Google Cloud Console, create an OAuth 2.0 Client ID (Desktop or Web application).
In
.env:AUTH_MODE=oauth GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com GOOGLE_CLIENT_SECRET=your-client-secret GOOGLE_REFRESH_TOKEN=your-refresh-token
๐ Connecting to Claude Desktop / MCP Clients
Add the server to your claude_desktop_config.json or MCP settings:
{
"mcpServers": {
"gws": {
"command": "node",
"args": ["/absolute/path/to/gws-mcp/dist/server/stdio.js"],
"env": {
"AUTH_MODE": "service_account",
"GOOGLE_SA_KEY_PATH": "/absolute/path/to/sa-key.json",
"AUDIT_LOG_PATH": "/absolute/path/to/gws-mcp/audit.jsonl"
}
}
}
}๐งช Development & Testing
# Run unit and contract test suites (100% offline via nock mocks)
npm test
# Check TypeScript types
npm run typecheck
# Build for production
npm run build
# Run integration tests against live Google Cloud APIs (optional)
GWS_INTEGRATION=1 npm run test:integrationThis server cannot be deployed
Maintenance
Related MCP Connectors
A MCP server that works with Google Calendar to manage event listing, reading, and updates.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Google Ads MCP server: 16 tools for reporting, campaigns, keywords, assets. Writes preview first.
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with Google Sheets through natural language, allowing users to create, read, update, and manage spreadsheet data via the Google Sheets API v4.-
- AlicenseAqualityDmaintenanceMCP server for interacting with Google Sheets, providing tools to list sheets, read data from cell ranges, and write data to cell ranges.33MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for Google Sheets operations, enabling spreadsheet management including reading, writing, appending, creating, and searching sheets via natural language.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server to read, write, create, and format Google Sheets via OAuth2 authentication, providing tools for spreadsheet management.296 npmMIT