gws-mcp
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., "@gws-mcplist my recent Google Drive files"
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.
Google Workspace MCP Server (gws-mcp)
A lightweight, robust Model Context Protocol (MCP) server wrapping the Google Workspace CLI (gws). It gives LLMs and AI agents (Claude Desktop, Cursor, Pi, VS Code, Goose) dynamic access to all Google Workspace APIs (Drive, Gmail, Docs, Sheets, Calendar, Admin, and more).
Features
⚡ Zero Context Bloat: Dynamic API discovery via Discovery Documents avoids registering dozens of static tools in LLM context.
🔒 Security & Isolation: Strict argument validation prevents flag/command injection.
⏱️ Process Safety: Built-in process execution timeouts, signal escalation (
SIGTERM/SIGKILL), multi-byte UTF-8 stream decoding, and memory buffer bounds.🛡️ Safety & Dry-Runs: Full support for
--dry-run, Google Cloud Model Armor--sanitize, and rate-limit--page-delay-ms.🔑 Preflight Auth Inspection: Built-in
gws_auth_statustool to check active OAuth tokens, identity, and granted scopes.
Related MCP server: Google Workspace MCP Server
Prerequisites
Node.js: v18.0.0 or higher.
gwsCLI: The official Google Workspace CLI installed and authenticated.Install
gws: https://github.com/googleworkspace/cliAuthenticate:
gws auth loginor configure service account credentials.
Quickstart (npx)
Run without cloning:
npx -y @ervinpopescu/gws-mcpOr install globally:
npm install -g @ervinpopescu/gws-mcp
gws-mcpClient Configuration
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": ["-y", "@ervinpopescu/gws-mcp"],
"env": {
"PATH": "/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin"
}
}
}
}Cursor (.cursor/mcp.json)
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": ["-y", "@ervinpopescu/gws-mcp"]
}
}
}Pi Coding Agent (~/.pi/config.json)
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": ["-y", "@ervinpopescu/gws-mcp"]
}
}
}VS Code (Cline / Roo Code)
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": ["-y", "@ervinpopescu/gws-mcp"]
}
}
}Goose (~/.config/goose/config.yaml)
extensions:
google-workspace:
name: Google Workspace
cmd: npx
args:
- -y
- "@ervinpopescu/gws-mcp"
enabled: trueAvailable Tools
1. gws_command
Executes an arbitrary command against Google Workspace APIs.
Parameter | Type | Description |
|
| Google Workspace service (e.g. |
|
| Target resource (e.g. |
|
| API method (e.g. |
|
| Optional sub-resource (e.g. |
|
| Query parameters object or JSON string. |
|
| Request body object or JSON string (for POST/PATCH/PUT). |
|
| Set to |
|
| Maximum number of pages to fetch with |
|
| Delay in milliseconds between page fetches. |
|
| API version override (e.g. |
|
| Preview the HTTP request without executing mutating changes. |
|
| Scan inputs with Google Cloud Model Armor. |
|
| Local file path to upload. |
|
| Local destination path to download file content. |
2. gws_schema
Queries the API schema for a specific endpoint to inspect parameter specifications and response structures.
Parameter | Type | Description |
|
| Endpoint name (e.g. |
|
| Inline |
3. gws_auth_status
Inspects active authentication status, user email, token validity, and granted OAuth scopes.
Environment Variables
Variable | Default | Description |
|
| Child process timeout before sending |
|
| Maximum stdout/stderr buffer allocation before truncation. |
Troubleshooting
gws CLI executable was not found in PATH
GUI applications on macOS (Claude Desktop, Cursor) do not inherit shell profile $PATH definitions (.zshrc/.bashrc). Pass the explicit PATH containing gws in your env configuration:
"env": {
"PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"
}Development & Testing
# Clone the repository
git clone https://github.com/ervinpopescu/gws-mcp.git
cd gws-mcp
# Install dependencies
npm install
# Run automated tests
npm testLicense
GNU General Public License v3.0 © 2026 Ervin Popescu
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Governed app access for AI agents: 1,000+ apps & 12,000+ tools via Code Mode MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Google Workspace services (Gmail, Calendar, Drive, Docs, Sheets, Chat, Slides, People) through natural language using Claude Desktop, Claude Code CLI, and other MCP clients.4543MIT
- AlicenseNot gradedqualityCmaintenanceExposes standardized tools for AI agents to interact with Google Workspace (Gmail and Google Docs) via the MCP protocol.47ISC
- FlicenseNot gradedqualityCmaintenanceEnables LLM agents to list Google Drive files, read/write Google Sheets, and query external REST APIs through MCP tools.
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to send Gmail emails, create drafts, and append content to Google Docs through MCP tools. Provides secure OAuth-based integration with Google Workspace.225MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ervinpopescu/gws-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server