Google Workspace MCP Server
Allows drafting emails in the authenticated user's Gmail outbox.
Allows creating Google Docs and inserting content into them.
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 ServerCreate a Google Doc with the meeting agenda for tomorrow"
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 Server
This repository contains a Model Context Protocol (MCP) server that integrates with Google Workspace to automatically create Google Docs and draft emails in Gmail.
The server is built using Python, Starlette, and Server-Sent Events (SSE) to allow AI agents (such as custom Orchestrators or Claude Desktop) to connect remotely and execute tools securely.
Prerequisites
Python 3.10+
A Google Cloud Platform (GCP) project with the following APIs enabled:
Google Docs API
Google Drive API
Gmail API
An OAuth 2.0 Client ID (Desktop App) from the GCP Console, saved as
credentials.json.
Related MCP server: Google Workspace MCP Server
Quick Start (Local Setup)
Clone this repository.
Create a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate # Or .\venv\Scripts\activate on Windows pip install -r requirements.txtCopy
.env.exampleto.envand configure your settings.Place your downloaded
credentials.jsonin the root folder.Generate the
token.jsonlocally by running:python generate_token.pyFollow the link provided in the console to log in to Google and authorize the application.
Run the server locally:
python src/main.pyThe server will start on
http://0.0.0.0:8000. Your SSE endpoint will be available athttp://localhost:8000/sse.
Deploying to Railway
This server is configured to run effortlessly on Railway.
Because Railway containers are ephemeral (their file systems reset on every deployment), you must securely provide your token.json so the server remains authenticated with Google.
Deployment Steps:
Push to GitHub: Push this repository to your GitHub account.
Create Railway Project: Log into Railway, click "New Project", and deploy from your GitHub repo.
Environment Variables: Add the variables from your
.envfile into the Railway dashboard.Persistent Volume (Important):
Go to your Railway service settings.
Attach a new Volume to the service.
Mount the volume at a path like
/data.Update your Railway environment variable
TOKEN_PATHto/data/token.json.
Upload the Token:
Railway doesn't easily allow direct file uploads to volumes. Instead, you can encode your
token.jsonas a base64 string, store it in an environment variable, and update your startup command in Railway to decode it into the volume before starting the server.Alternatively, you can use a database for token storage in the future.
Tools Provided
create_doc(title: string, content: string): Creates a Google Doc and inserts the given markdown/text.draft_email(to: string[], subject: string, body: string): Drafts an email securely in the authenticated user's outbox.
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
- AlicenseAqualityFmaintenanceEnables Gmail, Google Calendar, and Google Drive access through the Model Context Protocol, supporting email management, event scheduling, and file operations.8528MIT
- Alicense-qualityBmaintenanceEnables AI agents to compose and send Gmail emails and append text to Google Docs using the Model Context Protocol.1,624MIT
- Alicense-qualityCmaintenanceEnables AI agents to send emails via Gmail and append text to Google Docs through the Model Context Protocol.269MIT
- Alicense-qualityCmaintenanceEnables AI agents to securely interact with Google Workspace services, including sending emails via Gmail and appending content to Google Docs.269MIT
Related MCP Connectors
Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.
Google NotebookLM via natural language: create notebooks, add sources (PDF, URL, YouTube) and ask gr
Securely search and manage workspace context files for AI agents and teams.
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/ManuSNair788/MCPServer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server