Google Workspace MCP Server
Allows sending emails and drafting emails in Gmail.
Allows appending content to Google Documents with support for headings, lists, bold, and italic formatting.
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 Serverdraft an email to jane.doe@company.com about the quarterly review"
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.
title: Google Workspace MCP Server emoji: 📧 colorFrom: blue colorTo: green sdk: docker app_file: app.py pinned: false
Google Workspace Model Context Protocol (MCP) Server
A reusable, production-ready Model Context Protocol (MCP) Server that bridges AI agents with Google Workspace services (Gmail & Google Docs). By exposing standardized productivity tools, this server allows any MCP-compatible AI agent (such as Claude Desktop, IDE assistants, or autonomous workflows) to securely compose emails and edit documents without requiring hardcoded Google API logic.
Related MCP server: Gmail MCP Server
Features & Capabilities
📧 Gmail Integration
send_email: Send emails immediately with validation forto,cc, andbcclists. Supports both plain text and HTML alternative body rendering.draft_email: Create drafts in your Gmail mailbox for subsequent manual review before sending.
📄 Google Docs Integration
append_content: Append plain text or formatted notes to the end of any Google Document. Supports Heading styles (HEADING_1,HEADING_2,HEADING_3), bulleted lists, numbered lists, bold text, and italic text.
🔐 Secure & Transparent Authentication
Implements Google OAuth 2.0 with PKCE for enhanced desktop security.
Automatically checks token expiration and performs silent background refreshes using stored refresh tokens without interrupting AI agent execution.
AI agents are strictly isolated from raw tokens or client secrets.
Quickstart Guide
1. Requirements & Setup
Ensure you have Python 3.10+ installed. Create a virtual environment and install dependencies:
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e .2. Configure OAuth Client Secrets
Follow the step-by-step instructions in docs/GCP_SETUP.md to enable Gmail and Docs APIs in Google Cloud Console.
Download your Desktop App OAuth client secrets JSON file.
Save the downloaded file to your project root or configure its path in your
.envfile:GOOGLE_CLIENT_SECRETS_FILE=client_secret_YOUR_ID.json TOKEN_STORAGE_PATH=token.json LOG_LEVEL=INFO
3. Authorize Your Google Account
Before running the MCP server, perform a one-time interactive login to generate your token.json:
workspace-auth(This opens a browser window. Sign in with your Google account and grant permissions).
Connecting to AI Agents
Option A: Claude Desktop Configuration
To connect this MCP server to Claude Desktop, add the following entry to your claude_desktop_config.json (located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"google-workspace": {
"command": "/Users/vkg/Desktop/MCP Server/.venv/bin/workspace-mcp",
"args": ["--transport", "stdio"],
"cwd": "/Users/vkg/Desktop/MCP Server",
"env": {
"GOOGLE_CLIENT_SECRETS_FILE": "/Users/vkg/Desktop/MCP Server/client_secret_YOUR_ID.json",
"TOKEN_STORAGE_PATH": "/Users/vkg/Desktop/MCP Server/token.json"
}
}
}
}Option B: Run via Server-Sent Events (SSE)
For network-based AI agents, launch the server in SSE mode:
workspace-mcp --transport sse --port 8000Then connect your client to http://localhost:8000/sse.
Documentation Suite
Hugging Face Deployment Guide: Complete step-by-step tutorial for cloud container hosting on Hugging Face Spaces.
GCP Setup Guide: Detailed step-by-step tutorial on creating GCP projects and credentials.
Configuration Guide: Advanced environment variables, scopes, and multi-account readiness.
Troubleshooting Guide: Solutions for common OAuth errors, token expiration, and permission denials.
Problem Statement & Architecture: Architectural specifications and tool schemas.
Available Tools
3 toolsappend_contentB
Append text or notes to the end of an existing Google Document.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| formatting | No | ||
| document_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Conveys basic behavior (append to end) but no annotations provided. Missing details on permissions, limitations, or formatting handling. Adequate for a simple operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no waste. Could be improved by front-loading the resource and action more explicitly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and simple operation, description is adequate but missing usage context and parameter guidance. Output schema exists but doesn't compensate for missing explanation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%; description only hints at 'content' parameter ('text or notes'). Does not explain 'document_id' or 'formatting' beyond their names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states verb 'Append' and resource 'Google Document', specifying 'text or notes' and 'to the end'. Distinct from sibling tools (draft_email, send_email) which are email-related.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use or when not to use. Lacks alternatives or context for selection. Only describes the action itself.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
draft_emailB
Create a new draft email in the user's Gmail account without sending it. Useful for preparing messages for user review.
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | Yes | ||
| bcc | No | ||
| body | Yes | ||
| html | No | ||
| subject | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only states it creates a draft, but doesn't specify idempotency, authentication requirements, or potential side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise at two sentences and front-loaded with the core action. However, it could benefit from a brief structure indicating parameter usage.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 6 parameters and an output schema, the description is too sparse. It doesn't explain the output (draft id etc.) or how to use the html parameter, leaving the agent with significant gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description adds no parameter details whatsoever, leaving all 6 parameters (including required ones) unexplained beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool creates a draft email without sending, distinguishing it from send_email. It also specifies it's for preparing messages for review, providing a clear purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions 'without sending it' implying not to use for sending, but it does not explicitly contrast with sibling tools like send_email or append_content. It lacks when-not-to-use or alternative guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_emailC
Send an email immediately using the user's Gmail account. Requires at least one valid recipient address in the 'to' array.
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | Yes | ||
| bcc | No | ||
| body | Yes | ||
| html | No | ||
| subject | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description must disclose behavioral traits. It mentions 'immediately' and a requirement for valid recipients, but omits side effects (e.g., irreversibility), authentication needs, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no wasted words. The requirement is stated upfront.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 6 parameters and an output schema, the description is too sparse. Lacks details on input constraints, response format, and potential errors.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description should explain parameter meanings. Only 'to' is mentioned as requiring valid addresses; cc, bcc, body, html, subject are not described.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (send an email) and the resource (user's Gmail account). It distinguishes from sibling tools like draft_email by implying immediate sending. However, it could be more explicit about the resource being an email message.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like draft_email or append_content. It only describes the basic function without context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v0.1.0- First observed
append_content - First observed
draft_email - First observed
send_email
TDQS
Each tool has a clearly distinct purpose: append_content modifies Google Docs, draft_email creates drafts without sending, and send_email sends immediately. No overlap.
All tool names follow a consistent verb_noun pattern in snake_case (append_content, draft_email, send_email), making the set predictable.
With only 3 tools, the server is too sparse for the broad scope implied by 'Google Workspace,' missing major services like Calendar, Sheets, and Drive.
The tool surface is severely incomplete for Google Workspace, lacking CRUD operations even on the included services (only append for Docs, no read, update, delete; email lacks search, read, trash).
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.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that exposes 17 Google Workspace APIs (e.g., Gmail, Drive, Calendar) as auto-generated tools for AI assistants, enabling natural language control of Google services.-
- FlicenseNot gradedqualityCmaintenanceProduction-ready MCP server for Gmail, enabling AI agents to search, read, send, draft, and manage emails, labels, and attachments via the Google Gmail API.-
- FlicenseBqualityCmaintenanceA generic MCP server that exposes Gmail and Google Docs capabilities as tools for AI agents. Enables sending emails and appending content to Google Docs.2-
- AlicenseAqualityBmaintenanceAn MCP-compliant server that exposes Gmail and Google Docs as tools, enabling AI agents to draft, send, and manage emails, as well as create, read, and append to documents through natural language.9MIT
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/VGdotcom/google-workspace-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server