Gmail & Google Docs MCP Server
Provides tools to send emails immediately and create email drafts on behalf of the user.
Provides a tool to append text to an existing Google Doc.
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.
Generic MCP Server for Gmail & Google Docs Integration
A standalone Model Context Protocol (MCP) server that exposes Gmail and Google Docs actions as reusable tools. This allows any MCP-compatible AI agent (Claude, LangGraph, etc.) to securely interact with your Google Workspace.
Features
gmail_send_email: Send an email immediately on behalf of the user.gmail_create_draft: Create an email draft without sending it.gdocs_append_content: Append text to an existing Google Doc.
Related MCP server: Google Services MCP 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 APIs & Services > OAuth consent screen and configure it for "Desktop app" or "Web application".
You can leave it in "Testing" mode and add your own email as a Test User.
Go to Credentials > Create Credentials > OAuth client ID.
Download the
credentials.jsonor copy theClient IDandClient Secret.
2. Environment Variables
Create a .env file in the root directory (you can copy .env.example):
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_REDIRECT_URI=http://localhost:3000/oauth2callback
GOOGLE_REFRESH_TOKEN=your_refresh_token3. Acquiring a Refresh Token
To use this server, you must provide a GOOGLE_REFRESH_TOKEN. You can obtain one by running the OAuth consent flow locally. You can build a small script using generateAuthUrl from src/auth/googleAuth.ts and visiting the generated URL to get the token, or you can use Google OAuth Playground.
4. Build and Run
Install dependencies:
npm installBuild the project:
npm run buildRun the server (Stdio mode):
npm start
Connecting to an MCP Client
Cursor / Claude Desktop
Add the following to your MCP client configuration (e.g., in Claude Desktop's mcp.json or Cursor's settings):
{
"mcpServers": {
"gmail-docs-mcp": {
"command": "node",
"args": ["/absolute/path/to/mcp-server/build/index.js"],
"env": {
"GOOGLE_CLIENT_ID": "...",
"GOOGLE_CLIENT_SECRET": "...",
"GOOGLE_REDIRECT_URI": "http://localhost:3000/oauth2callback",
"GOOGLE_REFRESH_TOKEN": "..."
}
}
}
}This server cannot be deployed
Maintenance
Related MCP Connectors
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.
Multiple Gmail accounts, editable Google Sheets & Docs for AI agents. Deny-by-default access rules.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to send emails, create drafts in Gmail, and append content to Google Docs via standardized MCP tools.34 npmISC
- 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