google-workspace-mcp-server
Allows creating email drafts in Gmail, with interactive human approval before execution.
Allows appending formatted text to Google Docs, with interactive human approval before execution.
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-serverAppend the meeting notes to my Google Doc."
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-Style Server (Python)
This project provides an HTTP-based Model Context Protocol (MCP) style server built in Python using FastAPI. It exposes tools to safely append reports to Google Docs and create drafts in Gmail, requiring interactive human-in-the-loop terminal confirmation before any modifications are executed.
š ļø Project Structure
google-mcp-server/
āāā server.py ā FastAPI app exposing endpoints with approval prompts
āāā auth.py ā Google API OAuth2 login & client token manager
āāā docs_tool.py ā Google Docs append operation logic
āāā gmail_tool.py ā Gmail draft creation logic
āāā requirements.txt ā Python package dependencies
āāā README.md ā Setup and execution instructions
āāā credentials.json ā (Not Committed) Downloaded OAuth credentials
āāā token.json ā (Not Committed) Authorized credentials tokenRelated MCP server: Google Docs + Gmail MCP Server
āļø Prerequisites & Setup
1. Python Environment
Ensure Python 3.9+ is installed. Create and activate a virtual environment:
# Create venv
python3 -m venv venv
# Activate venv (macOS/Linux)
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt2. Configure Google Cloud Credentials
To authorize access to Google Docs and Gmail APIs:
Go to the Google Cloud Console.
Create a project (or select an existing one).
Enable the Google Docs API and Gmail API under APIs & Services.
Go to APIs & Services > Credentials.
Click Create Credentials > OAuth client ID.
Set the Application Type to Desktop app.
Download the credentials JSON, rename it to
credentials.json, and place it in the root of thegoogle-mcp-serverdirectory.
š Running the Server
Start the FastAPI server:
python server.pyFirst Run: A web page will automatically open in your browser prompting you to log into your Google Account and authorize access for Google Docs (modify) and Gmail (compose drafts) scopes. Once authenticated, a
token.jsonfile is written, and future runs execute silently.
The server runs locally at: http://localhost:8000
š API Endpoints (Tools)
1. Append to Google Doc
Appends a formatted text block to the end of a Doc.
Endpoint:
POST /append_to_docContent-Type:
application/jsonRequest Body:
{ "doc_id": "your_google_doc_id_here", "content": "Verbatim text to append to the document body." }
2. Create Gmail Draft
Prepares a draft email in your mailbox.
Endpoint:
POST /create_email_draftContent-Type:
application/jsonRequest Body:
{ "to": "stakeholders@example.com", "subject": "Weekly review pulse teaser", "body": " Teaser summary and deep link to the Google Doc." }
š Security & Interactive Approvals
For safety, the server implements an interactive human-in-the-loop gatekeeper.
When a POST request is sent to /append_to_doc or /create_email_draft, the FastAPI server will:
Print the pending action name and full payload details to the terminal console.
Wait/block for keyboard confirmation:
Approve action? (y/n):If
y: Executes the Google Workspace operation and returns a200 OKJSON response.If
nor invalid: Aborts the operation and returns a403 Forbiddenerror response.
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 Servers
- Flicense-qualityCmaintenanceEnables appending text to Google Docs and creating Gmail drafts, with interactive terminal approval before each action.Last updated
- Alicense-qualityCmaintenanceEnables AI tools to append content to Google Docs and create Gmail drafts with human-in-the-loop approval.Last updatedApache 2.0
- Alicense-qualityCmaintenanceEnables appending structured content to Google Docs and creating Gmail drafts through an MCP-style interface with human approval.Last updatedApache 2.0
- Flicense-qualityCmaintenanceEnables interaction with Google Docs and Gmail, allowing users to append text to documents and create email drafts with explicit approval prompts.Last updated
Related MCP Connectors
Runtime permission, approval, and audit layer for AI agent tool execution.
Give your agent its own email address with graduated human oversight, from approval to autonomy.
Permission boundary receipts for ChatGPT agents.
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/work-samirk/mcp-server-google-workplace'
If you have feedback or need assistance with the MCP directory API, please join our Discord server