Google Workspace MCP Server
Provides tools for composing and sending emails immediately, as well as saving email drafts for later review in Gmail.
Provides a tool for appending text to existing Google Documents.
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 Workspace MCP Server
An agent-agnostic Model Context Protocol (MCP) server that exposes Gmail and Google Docs as tools for any MCP-compliant AI agent (Claude, Gemini, GPT, or custom agents).
Tools Exposed
Tool | Description |
| Compose and immediately send an email |
| Save an email as a Gmail draft for human review |
| Append text to an existing Google Document |
Related MCP server: Generic Google Workspace MCP Server
Quick Start
1. Install dependencies
pip install -r requirements.txt2. Configure credentials
Copy .env.example to .env and fill in your Google OAuth 2.0 credentials:
cp .env.example .envGOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_REFRESH_TOKEN=your-long-lived-refresh-tokenHow to get credentials: Go to Google Cloud Console → APIs & Services → Credentials → Create OAuth 2.0 Client ID. Enable the Gmail API and Google Docs API. Then run the interactive login flow once to generate a refresh token (see §Auth below).
3. Run the server
stdio mode (default — for local agent integrations):
python -m src.serverSSE mode (for remote/HTTP agents):
MCP_TRANSPORT=sse python -m src.server
# Server starts on http://localhost:3000Authentication
The server loads Google OAuth 2.0 credentials in this priority order:
Environment variables —
GOOGLE_CLIENT_ID+GOOGLE_CLIENT_SECRET+GOOGLE_REFRESH_TOKEN(recommended for production)token.json— Cached token from a prior interactive login (auto-generated)credentials.json— Standard Google OAuth client secrets file → triggers interactive browser consent flow on first run
Getting a Refresh Token
If you don't have a refresh token yet, place your credentials.json in the project root and run:
python -m src.serverThe server will open a browser for the Google consent screen, then cache the token in token.json for future runs.
Project Structure
mcp-google-workspace/
├── src/
│ ├── server.py # Entry point
│ ├── config/config.py # Configuration manager
│ ├── auth/auth_manager.py # OAuth 2.0 credential management
│ ├── tools/
│ │ ├── registry.py # Tool registry
│ │ ├── gmail/
│ │ │ ├── send_email.py
│ │ │ └── draft_email.py
│ │ └── docs/
│ │ └── append_to_doc.py
│ ├── adapters/
│ │ ├── gmail_adapter.py
│ │ └── docs_adapter.py
│ └── errors/error_handler.py
├── .env.example
├── .gitignore
├── requirements.txt
└── pyproject.tomlConnecting to Claude Desktop
Add this to your Claude Desktop claude_desktop_config.json:
{
"mcpServers": {
"google-workspace": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "/path/to/MCPserver"
}
}
}OAuth 2.0 Scopes Required
https://www.googleapis.com/auth/gmail.sendhttps://www.googleapis.com/auth/gmail.composehttps://www.googleapis.com/auth/documents
Security
Credentials are never logged or hardcoded
.env,credentials.json, andtoken.jsonare gitignoredMinimum required OAuth scopes only
This server cannot be deployed
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Gmail, Outlook, Drive, OneDrive and calendars for AI agents. Many accounts, one endpoint, audit log.
Your agent needs a mailbox of its own — to receive, thread, draft and send, with attachments, without borrowing your personal inbox or your company's SMTP. **What you can ask for** • "Create an inbox for this agent and tell me its address." • "Read the new messages in this thread and draft a reply." • "Send this message with the attachment and wait for the response." • "Search this inbox for everything from that domain." • "Show delivery metrics and the events on this inbox." **How to use it** Point any MCP client at https://mcp.aisa.one/mail/mcp and sign in with OAuth — there is no key to create or paste. 49 tools: create and delete inboxes, list and read messages, raw message bodies, attachments, threads, drafts and draft attachments, send and reply, message search, inbox events, metrics, and list entries — reads and writes. **Why this rather than the source** A real inbox an agent owns, rather than an SMTP credential it borrows from a human. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the contact elsewhere in the catalogue, then write to them from here — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/sales/mcp finds the person to write to.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to send and draft Gmail emails and append content to Google Docs through standardized MCP tools.8 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI agents to create Gmail drafts, send emails, and append content to Google Docs with OAuth-secured authentication.53 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to draft and send Gmail emails and append content to Google Docs through MCP tools.34 npmISC
- FlicenseNot gradedqualityCmaintenanceEnables MCP-compatible AI agents to draft and send Gmail emails and append content to Google Docs without needing to understand Google's APIs.-