google-tools-mcp-server
Provides tools for sending emails and creating email drafts through the authenticated Gmail account.
Provides tools for appending content to existing Google Documents and retrieving document metadata such as title, character count, and revision ID.
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-tools-mcp-server Send an email to alex@example.com with subject 'Project Update' and body 'All tasks are done'."
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 Tools MCP Server (google-tools-mcp-server)
A Model Context Protocol (MCP) server that connects AI agent environments (such as Cursor, AntiGravity, Windsurf, and Claude Desktop) to Google Workspace services—specifically Gmail and Google Docs.
Features & Tools
The server registers 4 tools over standard MCP JSON-RPC:
Tool | Description | Input Parameters |
| Sends an email directly via the authenticated Gmail account. |
|
| Creates a draft in Gmail for user review before sending. |
|
| Appends formatted or plain text to an existing Google Document. |
|
| Retrieves document title, character count, and revision ID. |
|
Related MCP server: Google Workspace MCP Server
1. Setup Google Cloud Credentials
To allow the MCP server to communicate with Gmail and Google Docs:
Go to the Google Cloud Console.
Create or select a Google Cloud Project.
Enable the following APIs in APIs & Services > Library:
Gmail API
Google Docs API
Google Drive API
Configure your OAuth Consent Screen (APIs & Services > OAuth consent screen):
Choose User Type: External (or Internal for Google Workspace domain).
Add the scopes:
https://www.googleapis.com/auth/gmail.sendhttps://www.googleapis.com/auth/gmail.composehttps://www.googleapis.com/auth/documentshttps://www.googleapis.com/auth/drive.readonly
Add your own email as a Test User.
Create OAuth Credentials (APIs & Services > Credentials):
Click Create Credentials > OAuth client ID.
Application Type: Web application.
Name:
google-tools-mcp-server.Authorized redirect URIs: Add
http://localhost:3000/oauth2callback.Click Create and copy your Client ID and Client Secret.
2. Installation & Token Generation
Step A: Clone & Install Dependencies
npm installStep B: Configure Environment Variables
Copy .env.example to .env:
cp .env.example .envFill in your credentials:
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secretStep C: Generate Refresh Token
Run the interactive helper script:
npm run auth:tokenOpen the URL shown in your browser.
Sign in and grant the requested permissions.
Copy the output
GOOGLE_REFRESH_TOKENinto your.envfile.
Step D: Build the Server
npm run build3. Host Integration
AntiGravity / Cursor Integration
Add the server definition to your mcp_config.json or .cursor/mcp.json:
{
"mcpServers": {
"google-tools": {
"command": "node",
"args": ["/absolute/path/to/google-tools-mcp-server/build/index.js"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret",
"GOOGLE_REFRESH_TOKEN": "your-refresh-token"
}
}
}
}Claude Desktop Integration
Add the following to your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"google-tools": {
"command": "node",
"args": ["/absolute/path/to/google-tools-mcp-server/build/index.js"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret",
"GOOGLE_REFRESH_TOKEN": "your-refresh-token"
}
}
}
}4. Testing with MCP Inspector
You can test and inspect tool calls locally using the official @modelcontextprotocol/inspector:
npx @modelcontextprotocol/inspector node build/index.js5. Security & Architectural Invariants
Stdio Isolation: All logging, debug outputs, and errors are written exclusively to
process.stderr.process.stdoutis strictly reserved for JSON-RPC 2.0 protocol packets.Automatic Token Refresh: The server automatically refreshes OAuth access tokens in the background when they expire without terminating the connection.
Safe Error Recovery: All tool invocations are wrapped in defensive boundaries; malformed requests or API errors return structured MCP error responses (
isError: true) instead of crashing the server process.
Available Tools
4 toolsgdocs_append_contentB
Appends formatted or plain text content to the end of a specified Google Document.
Inputs: document_id (required), text_content (required), formatting, insert_line_break.
gdocs_get_document_infoA
Retrieves document title, character count, and revision metadata to confirm access before modifying.
Inputs: document_id (required).
gmail_create_draftA
Creates an email draft in the user's Gmail account without sending it immediately. Allows human review before dispatch.
Inputs: cc, to, bcc, subject, +2 more.
gmail_send_emailA
Sends an email directly to specified recipients via the user's Gmail account.
Inputs: to (required), subject (required), cc, bcc, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct resource (Gmail vs Google Docs) and action (send, draft, append, get info). There is minor potential confusion between sending and drafting an email, but their descriptions clearly differentiate immediate dispatch from human review.
Tool names follow a consistent pattern of <service>_<verb>_<object>, such as gmail_send_email and gdocs_append_content. Minor inconsistency: gdocs_get_document_info uses 'get_document_info' instead of a clearer 'get_info', but overall the pattern is predictable.
With only 4 tools, the count feels slightly thin for a server covering two major Google services (Gmail and Docs). However, the tools are focused on essential workflows and each serves a distinct purpose, justifying its inclusion.
The server covers basic email creation (send and draft) and document interaction (append and get info). Notably missing are operations like reading emails, searching documents, or creating documents, which are common in such workflows and may cause agents to hit dead ends.
Maintenance
Related MCP Connectors
Multiple Gmail accounts, editable Google Sheets & Docs for AI agents. Deny-by-default access rules.
Use your apps from your AI: Gmail, Slack, Google Sheets, HubSpot and 2,300+ more on your accounts.
Gmail, Outlook, Drive, OneDrive and calendars for AI agents. Many accounts, one endpoint, audit log.
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to send emails via Gmail and append text to Google Docs or local files.-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to send emails and append content to Google Docs using Gmail and Google Docs APIs.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to securely interact with Google Workspace services, including sending emails via Gmail and appending content to Google Docs.547 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to send emails via Gmail and append content to Google Docs.547 npmMIT