AY

artoxem/yet-another-google-mcp

Developer tools
10 stars 3 forks Quality 73 Trend 18MIT

Model Context Protocol server exposing Google Drive, Sheets, Docs, Gmail, Calendar, and Apps Script as MCP tools. Python, OAuth 2.

Overview

Give your AI assistant real-time access to Drive, Gmail, Calendar, Sheets, Docs, and Apps Script. This server exposes all three MCP primitive types: Called by the AI on demand. Every tool is annotated with readOnlyHint / destructiveHint so clients can warn before risky actions. Attach live Google data directly to the AI context window without calling a tool. Supports static URIs and templates. Select a prompt in your MCP client to fetch live data and start a structured conversation in one click. Create an OAuth 2.0 Client ID in Google Cloud Console, download the JSON, and note its path. docs/AUTH_SETUP.md · docs/ru/AUTH_SETUP.md MCP_AUTH_TOKEN is a secret string you choose. You can think of it as a , not as a network security layer or authentication mechanism.

README


✨ What it can do

Service Capabilities
📁 Google Drive Search, copy, move, share, manage permissions
📊 Google Sheets Read/write ranges, named ranges, filter views, find & replace, CSV export
📄 Google Docs Read, create, append text, fill templates, export to PDF
📧 Gmail Draft, send, search, archive, label, delete with confirmation
📅 Google Calendar List events, find free slots, create meetings with attendees
⚙️ Apps Script Read, staged updates, auto-backup, rollback
🔗 Resources Attach live Drive / Gmail / Calendar / Sheets / Docs snapshots to AI context
💬 Prompts Ready-made AI templates: summarize inbox, analyze spreadsheet, plan week, search files

🧩 MCP Primitives

This server exposes all three MCP primitive types:


🚀 Quick Start

1 — Install dependencies

pip install -r requirements.txt

2 — Set up Google OAuth

Create an OAuth 2.0 Client ID in Google Cloud Console, download the JSON, and note its path.

Full step-by-step guide: docs/AUTH_SETUP.md · docs/ru/AUTH_SETUP.md

3 — Configure the server

cp config.example.yaml config.yaml
# then edit config.yaml — set paths and choose MCP_AUTH_TOKEN

4 — Connect your IDE

Replace `` with the absolute path to this repository and your_token_here with your token.

5 — Smoke check

After connecting, call get_gmail_profile() in your AI client.
It should return the authenticated Gmail address if OAuth is configured correctly.


📖 Usage Examples


🛡 Safety Features

Feature Tools affected
confirm=true required delete_email, gmail_archive, calendar_create_meeting, drive_revoke_public, doc_fill_template
dry_run=true by default batch_delete_emails, sheet_find_replace
Auto dry-run for large ranges clear_range (prompts confirmation above threshold)
Draft mode by default send_email (never sends unless draft_mode=false)
Public sharing blocked share_file blocks type=anyone unless allow_public=true
Tool annotations Every tool carries readOnlyHint / destructiveHint for client-side warnings

⚠️ Your AI agent has access to all data you authorize via OAuth. Use read-only scopes for sensitive accounts. See docs/SECURITY.md.


⚙️ Configuration Reference

config.yaml keys

Key Env override Default Description
client_secrets_file GOOGLE_CLIENT_SECRETS_FILE — Path to OAuth JSON downloaded from Google Cloud
token_file GOOGLE_TOKEN_FILE ~/.google/token.json Where the OAuth token is saved after first login
mcp_auth_token MCP_AUTH_TOKEN — Required. Token to activate the server
log_file GOOGLE_LOG_FILE stderr only Path to a log file (optional)
log_level GOOGLE_LOG_LEVEL INFO Log verbosity: DEBUG / INFO / WARNING / ERROR
backup_dir GOOGLE_BACKUP_DIR — Directory for Apps Script auto-backups
scopes — full access List of OAuth scopes (see security docs)

MCP_CONFIG_FILE — points to your config.yaml. Set this in the IDE env block.
Environment variables always override config file values.


📦 Full Tool List


📚 Documentation

🇬🇧 English

Document Description
AUTH_SETUP.md Step-by-step Google OAuth setup guide
TOOLS_REFERENCE.md Full tools, resources, and prompts reference
SECURITY.md OAuth scopes, safety features, best practices
IDE_SETUP.md Cursor, Windsurf, VS Code, and other IDE setup
LEARN.md How this MCP server was built (step-by-step tutorial)

🇷🇺 На русском

Документ Описание
AUTH_SETUP.md Пошаговая настройка Google OAuth
TOOLS_REFERENCE.md Полный справочник инструментов, ресурсов и промптов
SECURITY.md OAuth scopes, защиты, рекомендации
IDE_SETUP.md Настройка Cursor, Windsurf, VS Code и других IDE

⚠️ Responsibility notice

You are responsible for understanding the risks and consequences of operations performed by this server.
Use it at your own discretion and follow your organization’s security policies.


View the full README on GitHub

Install

This server does not publish a one-line install command.

Open the repository installation guide New to MCP? Start with the mcpskill.org guide →

Configuration

{ "mcpServers": { "google-tools": { "command": "python", "args": ["<PROJECT_PATH>\\server.py"], "env": { "MCP_AUTH_TOKEN": "your_token_here", "MCP_CONFIG_FILE": "<PROJECT_PATH>\\config.yaml" } } } }