Google Docs + Gmail MCP Server
Allows creating email drafts in Gmail.
Allows appending structured content to a Google Doc.
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 Docs + Gmail MCP Serverappend 'Today's tasks' 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 Docs + Gmail MCP Server
A lightweight MCP-style server that integrates with Google Docs and Gmail.
This project demonstrates how to build structured AI tool interfaces with approval gating, inspired by the Model Context Protocol (MCP).
β¨ Features
π Append structured content to Google Docs
π§ Create Gmail drafts
π OAuth-based Google authentication
π§ MCP-style tool interface
β Human-in-the-loop approval before execution
π§© Modular and extensible design
Related MCP server: Google MCP Server
How to Use in Your Project
Run the MCP server: uvicorn server:app --reload
Call tools via API: POST /append_to_doc POST /create_email_draft
Integrate with your AI workflow:
Generate content using LLM
Send output to these endpoints
π Project Structure
google-mcp-server/
βββ server.py
βββ auth.py
βββ docs_tool.py
βββ gmail_tool.py
βββ requirements.txt
βββ credentials.json (not committed)
βββ token.json (not committed)
βββ README.mdβοΈ Setup
1. Clone the repository
git clone <your-repo-url>
cd google-mcp-server2. Create virtual environment
python3 -m venv venv
source venv/bin/activate3. Install dependencies
pip install -r requirements.txt4. π Google API Setup
Go to Google Cloud Console
Create a new project
Enable:
Google Docs API
Gmail API
Configure OAuth Consent Screen
Create OAuth Credentials (Desktop App)
Download
credentials.jsonPlace it in project root
5. π Run OAuth
python3 auth.pyOpens browser for login
Generates token.json
6. βΆοΈ Run Server
uvicorn server:app --reloadOpen:
http://127.0.0.1:8000/docsπ§ͺ How to Test
Append to Google Doc
Endpoint: POST /append_to_doc
Example:
{
"doc_id": "YOUR_DOC_ID",
"content": "Hello from MCP π"
}Create Email Draft
Endpoint: POST /create_email_draft
Example:
{
"to": "test@example.com",
"subject": "Test Draft",
"body": "This is a test email"
}π Workflow
Request β Approval β Tool Execution β ResponseEvery action requires manual approval
Ensures safe and controlled execution
β οΈ Important Notes
Do NOT commit:
credentials.json
token.json
Approval is CLI-based (terminal input) Designed for local development
β οΈ Approval Flow
Every action requires manual approval in terminal:
ACTION: append_to_doc
PAYLOAD: {...}
Approve? (y/n):Type:
yπ§ MCP Design
This project demonstrates:
Structured tool calls
Separation of generation and execution
Human approval before tool execution
β Notes
No emails are sent automatically (draft only)
Google Doc must have edit access
Token is stored locally
π License
Apache License
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-qualityBmaintenanceIntegrates with Google Docs and Gmail to append text to documents and create email drafts, with a terminal approval step before any action executes.Last updated
- Flicense-qualityCmaintenanceIntegrates with Google Docs and Gmail to append content to documents and create email drafts, featuring a manual approval system.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
- 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
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflowβ¦
Give your agent its own email address with graduated human oversight, from approval to autonomy.
Google NotebookLM via natural language: create notebooks, add sources (PDF, URL, YouTube) and ask gr
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/tejas2904-RM/MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server