Generic Gmail & Google Docs MCP Server
Allows creating email drafts and sending emails through Gmail.
Allows appending text to existing Google Docs 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., "@Generic Gmail & Google Docs MCP ServerDraft an email to Sarah inviting her to the project kickoff 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.
Generic Gmail & Google Docs MCP Server
A Model Context Protocol (MCP) server that exposes Gmail and Google Docs capabilities to any MCP-compatible AI agent or client.
Features
Agent-Agnostic: Works with Cursor, Claude Desktop, and other MCP clients.
Gmail: Create drafts (
gmail_draft) and send emails (gmail_send).Google Docs: Append text to existing documents (
google_docs_append).Secure: Uses OAuth 2.0. Secrets and tokens are never exposed.
Informative Errors: Actionable error messages for AI agents.
Related MCP server: MCP Google Workspace Server
Setup Instructions
1. Google Cloud Project Setup
Go to the Google Cloud Console.
Create a new project.
Enable the following APIs:
Gmail API
Google Docs API
Go to OAuth consent screen and configure it (External or Internal).
Add the following scopes:
https://www.googleapis.com/auth/gmail.composehttps://www.googleapis.com/auth/documents
Go to Credentials > Create Credentials > OAuth client ID.
Choose Desktop app (or Web application if you prefer, but ensure the redirect URI matches).
Copy the Client ID and Client Secret.
2. Local Setup
Clone the repository and run
npm install.Create a
.envfile based on.env.example:GOOGLE_CLIENT_ID=your_client_id GOOGLE_CLIENT_SECRET=your_client_secret GOOGLE_REDIRECT_URI=http://localhost:3000/oauth/callback GOOGLE_TOKEN_PATH=./data/google-token.json
3. Authentication
Run the authentication script to get your OAuth token:
npm run authVisit the URL, authorize the app, and paste the code back into the terminal. The token will be saved to ./data/google-token.json.
4. Build
npm run buildMCP Client Configuration
Cursor
Add the following to your Cursor MCP configuration:
{
"mcpServers": {
"google-workspace": {
"command": "node",
"args": ["/absolute/path/to/mcp-google-server/dist/index.js"]
}
}
}Claude Desktop
Add the following to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"google-workspace": {
"command": "node",
"args": ["/absolute/path/to/mcp-google-server/dist/index.js"]
}
}
}Development
npm run dev: Run with tsx (STDIO)npm run test: Run tests with Vitestnpm run lint: Run ESLint
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 gradedqualityBmaintenanceEnables MCP-compatible AI agents to create Gmail drafts, send emails, and append content to Google Docs with OAuth-secured authentication.27 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to draft and send Gmail emails and append content to Google Docs through MCP tools.15 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.-
- AlicenseAqualityCmaintenanceEnables AI agents to create and send Gmail messages and append content to Google Docs through the MCP protocol.315 npmISC