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.
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., "@Gmail & Google Docs MCP ServerSend an email to my professor about the assignment deadline."
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 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: 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 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 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
- Flicense-qualityCmaintenanceEnables AI agents to send emails and append content to Google Docs using Gmail and Google Docs APIs.
- AlicenseBqualityCmaintenanceExposes Gmail (send/draft) and Google Docs (append) capabilities as tools for any MCP-compliant agent.325ISC
- Alicense-qualityBmaintenanceEnables AI agents to send emails, create drafts in Gmail, and append content to Google Docs via standardized MCP tools.25ISC
- Alicense-qualityCmaintenanceEnables AI agents to securely interact with Google Workspace services, including sending emails via Gmail and appending content to Google Docs.270MIT
Related MCP Connectors
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…
Phone, SMS & email for AI agents — one remote MCP endpoint, OAuth login, zero install.
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/PranavKuntewar04/MCP-SERVER'
If you have feedback or need assistance with the MCP directory API, please join our Discord server