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 "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., "@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: Gmail & Google Docs MCP 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 deployed
Maintenance
Related MCP Connectors
Email infrastructure for AI agents ā send, receive, search, and reply to email over MCP.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Multiple Gmail accounts, editable Google Sheets & Docs for AI agents. Deny-by-default access rules.
Your agent needs a mailbox of its own ā to receive, thread, draft and send, with attachments, without borrowing your personal inbox or your company's SMTP. **What you can ask for** ⢠"Create an inbox for this agent and tell me its address." ⢠"Read the new messages in this thread and draft a reply." ⢠"Send this message with the attachment and wait for the response." ⢠"Search this inbox for everything from that domain." ⢠"Show delivery metrics and the events on this inbox." **How to use it** Point any MCP client at https://mcp.aisa.one/mail/mcp and sign in with OAuth ā there is no key to create or paste. 49 tools: create and delete inboxes, list and read messages, raw message bodies, attachments, threads, drafts and draft attachments, send and reply, message search, inbox events, metrics, and list entries ā reads and writes. **Why this rather than the source** A real inbox an agent owns, rather than an SMTP credential it borrows from a human. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the contact elsewhere in the catalogue, then write to them from here ā without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/sales/mcp finds the person to write to.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to send emails, create drafts in Gmail, and append content to Google Docs via standardized MCP tools.70 npmISC
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to send Gmail emails, create drafts, and append content to Google Docs through MCP tools. Provides secure OAuth-based integration with Google Workspace.205 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI agents to create Gmail drafts, send emails, and append content to Google Docs with OAuth-secured authentication.18 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to draft and send Gmail emails and append content to Google Docs through MCP tools.70 npmISC