Google Workspace MCP Server
Allows sending emails (plain-text or HTML) with support for multiple recipients, CC, and BCC.
Allows appending text to existing Google Documents.
Click on "Deploy 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 Serversend an email to alice@example.com with subject 'Meeting reminder' and body 'Don't forget the 3pm meeting.'"
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 is a Model Context Protocol (MCP) server that provides AI agents with tools to interact with Google Workspace services (Gmail and Google Docs).
Available Tools
send_email: Send an email via Gmail (supports multiple recipients, CC, BCC, plain-text and HTML).append_google_doc: Append text to an existing Google Document.
Related MCP server: Google Workspace MCP Server
Setup Instructions
1. Configure Environment Variables
Rename .env.example to .env and fill in your Google Cloud credentials.
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_REDIRECT_URI=http://localhost:3000/oauth2callback
PORT=3000
TOKEN_PATH=tokens.json2. Generate Authentication Tokens
Before starting the MCP server, you must grant it access to your Google account. Run the authentication script:
npm run authClick the link printed in your terminal.
Sign in with your Google account.
Grant the required permissions for Gmail and Google Docs.
The script will automatically generate
tokens.jsonin your workspace.
3. Build the Server
Compile the TypeScript code:
npm run build4. Connect to an MCP Client (e.g., Claude Desktop)
To use this server with Claude Desktop or another MCP client, configure the client to run the compiled index.js file. Add the following to your MCP client configuration file (e.g. claude_desktop_config.json):
{
"mcpServers": {
"google-workspace": {
"command": "node",
"args": ["/absolute/path/to/mcp-server/build/index.js"],
"env": {
"GOOGLE_CLIENT_ID": "your_client_id",
"GOOGLE_CLIENT_SECRET": "your_client_secret",
"GOOGLE_REDIRECT_URI": "http://localhost:3000/oauth2callback",
"TOKEN_PATH": "/absolute/path/to/mcp-server/tokens.json"
}
}
}
}Note: Ensure the TOKEN_PATH environment variable in the client config points to the absolute path of your generated tokens.json file.
This server cannot be deployed
Maintenance
Related MCP Connectors
Multiple Gmail accounts, editable Google Sheets & Docs for AI agents. Deny-by-default access rules.
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
1Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Permissioned access to Gmail, Drive and Calendar via the user's own Google account
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables Gmail, Google Calendar, and Google Drive access through the Model Context Protocol, supporting email management, event scheduling, and file operations.8528 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to compose and send Gmail emails and append text to Google Docs using the Model Context Protocol.1,091 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables sending and drafting emails via Gmail and appending content to Google Docs through the Model Context Protocol.18 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to send emails via Gmail and append content to Google Docs.205 npmMIT