Allows managing Gmail inbox, drafting emails, sorting newsletters, setting up labels and filters, handling attachments, and tracking responses to threads
Integrates with Google Workspace, providing access to Gmail, Calendar, and Drive within a unified interface through authenticated API access
Enables calendar management including scheduling meetings, managing recurring events, finding available time slots, and handling timezone conflicts
Provides file management capabilities including organizing documents, controlling sharing permissions, searching file contents, and maintaining structured file organization
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 inbox for emails from John about the Q3 project"
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
An MCP server for Google Workspace that gives AI agents access to Gmail, Calendar, and Drive through a clean, operation-based interface with multi-account support.
Built on top of Google's official @googleworkspace/cli (gws) — all API coverage comes from Google's own tooling, dynamically discovered and always up to date.
What It Does
5 tools, 17 operations:
Tool | Operations | Description |
| list, authenticate, remove | Multi-account management |
| search, read, send, reply, triage | Gmail with search syntax |
| list, agenda, create, get, delete | Calendar management |
| search, upload, get, download | Drive file operations |
| — | Chain operations with |
Each response includes contextual next-steps guidance, helping agents discover follow-up actions naturally.
Related MCP server: MCP G Suite Integration
Install
npm install @aaronsb/google-workspace-mcpOr run directly:
npx @aaronsb/google-workspace-mcpThis installs everything — the gws Rust CLI binary comes along as a dependency.
Prerequisites
Node.js 18+
Google Cloud OAuth credentials — create at console.cloud.google.com/apis/credentials:
Create an OAuth 2.0 Client ID (Desktop application)
Enable Gmail, Calendar, and Drive APIs
Set environment variables:
export GOOGLE_CLIENT_ID="your-client-id" export GOOGLE_CLIENT_SECRET="your-client-secret"
MCP Client Configuration
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": ["@aaronsb/google-workspace-mcp"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}Claude Code
Add to .mcp.json:
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": ["@aaronsb/google-workspace-mcp"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}Usage
Start by listing accounts:
manage_accounts { "operation": "list" }Add an account (opens browser for OAuth):
manage_accounts { "operation": "authenticate" }Then use any tool with your account email:
manage_email { "operation": "triage", "email": "you@gmail.com" }
manage_calendar { "operation": "agenda", "email": "you@gmail.com" }
manage_drive { "operation": "search", "email": "you@gmail.com", "query": "quarterly report" }Queue Operations
Chain multiple operations in one call with result references:
{
"operations": [
{ "tool": "manage_email", "args": { "operation": "search", "email": "you@gmail.com", "query": "from:boss subject:review" } },
{ "tool": "manage_calendar", "args": { "operation": "agenda", "email": "you@gmail.com" } }
]
}Architecture
MCP Client → stdio → Server → Handler → gws CLI → Google APIs
↓
Account Registry (multi-account credential routing)Executor — spawns
gwsas a subprocess with per-account credential routingCredential bridge — exports from gws encrypted store to per-account files in XDG-compliant paths
Formatting — shapes raw API responses for AI context efficiency
Next-steps — contextual follow-up suggestions in every response
Data Storage
Follows XDG Base Directory Specification:
Data | Location |
Account registry |
|
Credentials |
|
Development
npm install
make build # Compile TypeScript
make typecheck # Type checking only
make test-unit # Run unit tests (60 tests)
make test # Same as test-unitLicense
MIT