Google Services MCP Server
Allows sending and drafting emails through Gmail, with support for recipients, subject, HTML body, and optional CC/BCC.
Allows appending content to Google Docs with optional formatting such as heading level, bold, and italic.
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., "@Google Services MCP ServerSend an email to my boss about the project 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.
Google Services MCP Server
A Model Context Protocol (MCP) server that exposes Google services — specifically Gmail and Google Docs — as standardized tools for AI agents.
This allows MCP-compatible agents (like Claude Desktop, Cursor, or custom agents) to seamlessly send/draft emails and append content to Google Docs on your behalf.
Capabilities (Tools)
Tool | Description |
| Send an email to one or more recipients with subject, body (text/html), and optional CC/BCC. |
| Create a draft email in your Gmail account without sending it. |
| Append text content to the end of an existing Google Doc, with optional formatting (heading level, bold, italic). |
Related MCP server: MCP Google Workspace Server
Prerequisites
Node.js: Version 20 or higher.
Google Cloud Project: You need to set up a project and obtain OAuth 2.0 credentials.
🛠️ Google Cloud Setup Guide
Go to the Google Cloud Console.
Create a new project (e.g., "MCP Server").
Go to APIs & Services > Library.
Search for and enable the Gmail API.
Search for and enable the Google Docs API.
Go to APIs & Services > OAuth consent screen.
Choose External (or Internal if you have a Workspace).
Fill out the App Name, User support email, and Developer contact information.
Click Save and Continue.
Under Scopes, add:
https://www.googleapis.com/auth/gmail.sendhttps://www.googleapis.com/auth/gmail.composehttps://www.googleapis.com/auth/documents
Finish the consent screen setup.
Go to APIs & Services > Credentials.
Click Create Credentials > OAuth client ID.
Application type: Web application.
Name: "MCP Server Local".
Under Authorized redirect URIs, add exactly:
http://localhost:3000/oauth2callbackClick Create.
Note down your Client ID and Client Secret.
🚀 Installation & Authentication
Clone or copy this repository.
Install dependencies:
npm installCopy the environment template:
cp .env.example .envOpen
.envand fill in yourGOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET.Run the authentication script to obtain your refresh token:
npm run authenticateFollow the prompt in your browser to authorize the app. Once completed, the terminal will output a
GOOGLE_REFRESH_TOKEN.Add the
GOOGLE_REFRESH_TOKENto your.envfile.Build the server:
npm run build
🔌 Connecting to an MCP Client
Claude Desktop
Add the following to your claude_desktop_config.json (usually found at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"google-services": {
"command": "node",
"args": [
"/absolute/path/to/google-mcp-server/build/index.js"
],
"env": {
"GOOGLE_CLIENT_ID": "your_client_id",
"GOOGLE_CLIENT_SECRET": "your_client_secret",
"GOOGLE_REFRESH_TOKEN": "your_refresh_token",
"GOOGLE_REDIRECT_URL": "http://localhost:3000/oauth2callback"
}
}
}
}Note: Replace /absolute/path/to/ with the actual path to this folder.
🔧 Architecture
This server is built using the MCP SDK v2. It uses the stdio transport to communicate with the host agent.
The architecture is designed to be highly modular. Adding a new Google service requires:
Creating a new folder in
src/tools/.Defining Zod schemas for inputs.
Implementing the Google API logic.
Calling the registration function in
src/tools/index.ts.
It includes built-in exponential backoff for rate limiting and structured error handling for a robust agent experience.
⚠️ Troubleshooting
Authentication Error / Missing Token: Make sure you ran
npm run authenticateand copied the refresh token into your.envfile or Claude config.Permission Denied (403): Ensure you added all 3 required scopes during the Google Cloud OAuth consent screen setup, and that the account you authenticated with has access to the target Google Doc.
Resource Not Found (404): Double check the
document_id. It should be the string between/d/and/editin the Google Docs URL.
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-qualityBmaintenanceEnables AI agents to create Gmail drafts and append content to Google Docs, supporting automated review analysis and notification workflows.1,611MIT
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Hosted email MCP for AI agents with inboxes, send/receive, memory, recovery, and credits.
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/SPSahoo007/google-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server