Google Docs + Gmail MCP Server
Allows creating email drafts in Gmail.
Allows appending structured content to Google Docs.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π 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 Docs + Gmail 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) when running locally. Designed for local development, but easily deployable to Railway.
π Deployment
This server is pre-configured to be deployed on Railway. For complete step-by-step deployment instructions, see DEPLOYMENT.md.
β οΈ 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
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
Related MCP Connectors
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for generating rough-draft project plans from natural-language prompts.
Remote MCP server to control your Android phone from AI assistants with per-app permissions.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP-style server integrating Google Docs and Gmail, enabling AI to append structured content to documents and create email drafts with human-in-the-loop approval.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables appending content to Google Docs and creating Gmail drafts via a lightweight MCP-style server with OAuth authentication and human-in-the-loop approval.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceA lightweight MCP server for managing Google Workspace services (Gmail, Calendar, Drive, Docs, Sheets, Slides) through natural language with AI assistants like Claude and Cursor.11 npm1MIT
- AlicenseBqualityDmaintenanceA generic MCP server that exposes Gmail and Google Docs capabilities as tools for AI agents. Enables sending emails and appending content to Google Docs.2ISC