MCP Google Workspace Server
Allows AI agents to draft and send emails through the authenticated user's Gmail account.
Allows AI agents to append text content to existing Google Docs.
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., "@MCP Google Workspace ServerDraft an email to sarah@company.com about the Q3 report and include the summary."
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.
MCP Google Workspace Server
A generic Model Context Protocol (MCP) server that enables AI agents to interact with Gmail and Google Docs through well-defined MCP tools.
The primary goal of this project is to provide a reusable integration layer so that any MCP-compatible AI agent can perform email and Google Docs operations without implementing Gmail or Google Docs APIs themselves.
Features
The server currently supports the following capabilities exposed as MCP tools:
Gmail
gmail_draft_email: Draft an email in the authenticated user's Gmail account.gmail_send_email: Send an email directly using the authenticated user's Gmail account.
Google Docs
google_docs_append: Append text content to the end of an existing Google Doc.
Related MCP server: Google Services MCP Server
Prerequisites
Node.js (v18 or higher recommended)
Google Cloud Platform account
Gmail API and Google Docs API enabled in your GCP project
OAuth 2.0 Client credentials (Desktop application type)
Installation
Clone the repository:
git clone https://github.com/n21jindal-maker/MCP-Server.git cd MCP-ServerInstall dependencies:
npm installBuild the project:
npm run build
Configuration & Authentication
The server uses Google OAuth 2.0 for authentication. You need to set up your credentials before running the server.
Obtain your OAuth 2.0 Client ID and Secret from the Google Cloud Console.
Save your credentials as
Credentials.jsonin the root directory, or configure the environment variables as shown in.env.example.Generate the OAuth token:
npx tsx generate-token.tsFollow the prompts to authorize the application. This will generate a
token.jsonfile.
Running the Server
Start the server using:
npm startOr for development (with automatic TypeScript compilation):
npm run devUsing with an MCP Client
Configure your MCP client to start this server. The server communicates over stdio.
Example configuration for Claude Desktop or similar MCP clients:
{
"mcpServers": {
"google-workspace": {
"command": "node",
"args": ["/absolute/path/to/MCP-Server/dist/index.js"]
}
}
}Available Tools
gmail_draft_email
Drafts an email but does not send it.
Parameters:
to(string[]): One or more recipient email addresses.subject(string): Email subject.body(string): Email body.
gmail_send_email
Sends an email immediately.
Parameters:
to(string[]): One or more recipient email addresses.subject(string): Email subject.body(string): Email body.
google_docs_append
Appends content to a Google Doc.
Parameters:
documentId(string): The ID of the Google Doc (found in the URL).content(string): Text content to append.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Multiple Gmail accounts, editable Google Sheets & Docs for AI agents. Deny-by-default access rules.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to send emails, create drafts in Gmail, and append content to Google Docs via standardized MCP tools.44 npmISC
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to send and draft Gmail emails and append content to Google Docs through standardized MCP tools.10 npmMIT
- 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.-
- AlicenseAqualityCmaintenanceEnables AI agents to create and send Gmail messages and append content to Google Docs through the MCP protocol.344 npmISC