google-mcp-server
An MCP server that enables AI assistants to read, search, and act on Google Workspace services including Gmail, Drive, Docs, YouTube, and Calendar.
README
Google MCP Server — AI agent for Gmail, Drive, Docs, YouTube & Calendar
This is an MCP (Model Context Protocol) server that lets an AI assistant read, search, and act on your Google Workspace account. It works with any MCP-compatible client (Claude, VS Code, Cursor, custom apps, etc.).
What it can do
Gmail
- Show your email address
- Read unread messages from your inbox
- Search emails by keyword, sender, date, etc.
- Get the full content of any email by ID
- List all your Gmail labels
- Send emails
- Bulk-modify messages matching a Gmail query (archive, mark read/unread, star, label, or trash)
Google Drive
- List files you have access to
- Search files by name
- Read text content of documents, spreadsheets, or files
- See file metadata (size, owner, dates)
- Browse recently modified files
- List what's inside a folder
Google Docs
- Read the full content of a document
- List your recent documents
- Get a summary (title, ID, revision, paragraph count)
- Search for specific text inside a document
YouTube
- Search for videos
- Get video details (views, likes, duration, description)
- List your subscriptions
- Get info on any channel
- Show your own channel stats
- List your playlists
- Download videos to local storage (mp4, webm, audio-only)
- List all videos from any channel (by URL, @username, or channel ID)
- Download entire channels (all videos from a channel to local disk)
Google Calendar
- List upcoming events
- Search events by keyword
- Show today's schedule
- Show this week's schedule
- List all your calendars
- Get event details by ID
Quick Start (one-time setup)
# 1. Run the setup script (installs everything automatically):
bash setup.sh
# 2. Activate the virtual environment:
source .venv/bin/activate
# 3. Run the interactive OAuth setup (opens a browser tab):
python -m vertex auth
What happens: A browser opens, you sign into Google, grant permissions, and credentials get saved to .env automatically.
Alternative: Manual credential setup
If you already have Google Cloud credentials:
- Create an OAuth 2.0 Desktop Client ID at https://console.cloud.google.com/apis/credentials
- Download the JSON and save it as
client_secrets.jsonin the project root - Run
python -m vertex auth - Or manually add to
.env(see.env.example)
How to use it
Check your credentials work
python -m vertex verify
This tests connectivity to all 5 Google APIs. You'll see checkmarks or errors for each one.
Start the server
# Option A — using the module directly:
python -m vertex
# Option B — using the installed command:
google-mcp-server
The server starts and listens for MCP connections from your AI client.
Run the OAuth flow again
python -m vertex auth
Available CLI commands
| Command | What it does |
|---|---|
python -m vertex |
Start the MCP server (default) |
python -m vertex auth |
Run the OAuth consent flow to get/renew a refresh token |
python -m vertex verify |
Check your credentials work with all Google APIs |
YouTube Video & Live Stream Downloads
Simple downloader - just paste a YouTube link!
./download_youtube.py
Supports:
- ✅ Single video downloads (any quality)
- ✅ Live streams (current/ongoing)
- ✅ Past live streams
- ✅ Audio extraction (MP3)
See YOUTUBE_QUICK_START.md for usage guide.
Email Cleanup Helper
Clean up newsletters, promotions, and mass emails safely:
# See what can be cleaned up
python cleanup_emails.py stats
# Stage emails for review (adds _Review label)
python cleanup_emails.py stage
# Review what was labeled
python cleanup_emails.py review
# Delete confirmed emails
python cleanup_emails.py delete
See EMAIL_CLEANUP_GUIDE.md for detailed instructions.
Running tests
# Unit tests (no internet needed, ~15s):
python -m pytest tests/unit/ -q
# Integration tests (requires real Google credentials):
python -m pytest tests/integration/test_real_connection.py -v
# All tests:
python -m pytest tests/ -q
# Shell-based CLI tests:
bash tests/scripts/test_cli.sh
How it works
The server is built on the Model Context Protocol — a standard that lets AI tools communicate with external services. When an AI assistant calls a tool (like gmail_list_unread), the server:
- Gets the right OAuth credentials for that service
- Makes the Google API call
- Returns the result as readable text
- The AI reads it and can use it in its response or chain more calls
The server handles authentication automatically using saved refresh tokens — no need to re-authorize each time.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.