google-nice-mcp
A read-only MCP server for Gmail and Drive with only 5 tools, designed to be friendly to small local LLMs by minimizing context usage and simplifying inputs.
README
google-nice-mcp
The Google Workspace MCP server that's actually nice to small local LLMs.
Why this exists
Most Google Workspace MCP servers expose 30+ tools across a dozen services (Gmail, Calendar, Docs, Sheets, Slides, Tasks, Chat, Formsβ¦). That floods a small model's context window and wrecks tool selection β a 7B local model staring at 30 tools will pick the wrong one.
This server does the opposite. It's a focused, read-only context-gatherer: just Gmail and Drive, just 5 tools, with plain typed parameters (no Gmail/Drive query DSL to memorize) and compact plain-text output instead of raw API JSON. The point is to let your local LLM learn about your project from your mail and files β not to manage your account.
Features
- π― Just 5 tools β small enough that a local model reliably picks the right one.
- π§° Gmail + Drive read β search and read email; search Drive by name or file content; read Docs, Sheets, Slides, PDF, Word, Excel and PowerPoint as text.
- ποΈ Shared drives included β searches My Drive and shared/team drives together.
- ποΈ Forgiving inputs β filter by
sender/subject/keyword/file_typeinstead of query syntax, and write dates asdd.mm.yyyy. - π Token-cheap output β compact plain text, truncation, self-explaining errors.
- π Read-only by scope β
gmail.readonly+drive.readonly. It physically cannot send, delete, or modify anything.
Tools
| Tool | Purpose |
|---|---|
gmail_search |
Find emails by keyword, sender, subject, date range, or unread. |
gmail_read_email |
Read one full email β headers, plain-text body, attachment names. |
drive_search |
Find files by name, full-text content, and type, across My Drive and shared drives. |
drive_read_file |
Read a file's text: Google Docs/Sheets/Slides, PDF, Word (.docx), Excel (.xlsx), PowerPoint (.pptx). |
drive_list_shared_drives |
Discover which shared drives you can access. |
Friendly inputs everywhere
- Dates (
gmail_search) usedd.mm.yyyyβ e.g.31.12.2026. Normalized internally to what the Gmail API requires;YYYY-MM-DDis also accepted. - File types (
drive_search) are simple aliases:doc,sheet,slides,pdf,folder. - Bad input gets a self-explaining error, not an empty result.
1. Set up Google Cloud OAuth (one time)
- Open the Google Cloud Console and create a project (or pick one).
- Enable the APIs: APIs & Services β Library β enable Gmail API and Google Drive API.
- Configure the consent screen: APIs & Services β OAuth consent screen.
- User type External is fine for a personal account.
- Add your Google account under Test users (so you don't need app verification).
- Create credentials: APIs & Services β Credentials β Create Credentials β OAuth client ID.
- Application type: Desktop app.
- Download the JSON.
- Save that JSON as
~/.config/google-nice-mcp/credentials.json(or setGOOGLE_NICE_CREDENTIALSto point at it).
2. Install & authenticate
git clone https://github.com/Schneckenhausmann/google-nice-mcp.git
cd google-nice-mcp
uv sync # installs into .venv
uv run google-nice-mcp-login # opens a browser; approve read-only access
The token is cached at ~/.config/google-nice-mcp/token.json and refreshed
automatically. Re-run the login only if you revoke access or change scopes.
3. Configure
Environment variables (all optional):
| Variable | Default | Purpose |
|---|---|---|
GOOGLE_NICE_CONFIG_DIR |
~/.config/google-nice-mcp |
Where credentials/token live. |
GOOGLE_NICE_CREDENTIALS |
<config>/credentials.json |
OAuth client file path. |
GOOGLE_NICE_TOKEN |
<config>/token.json |
Cached token path. |
Claude Desktop / Claude Code
{
"mcpServers": {
"google-nice": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/google-nice-mcp",
"run",
"google-nice-mcp"
]
}
}
}
Local LLM clients (Ollama, LM Studio, β¦)
Use the same command / args in whatever MCP config your client supports. The
server speaks MCP over stdio, so anything that can launch a stdio MCP server works.
Example prompts
- "Find emails from anna@acme.com about the Q3 budget since 01.01.2026 and summarize them."
- "Search my Drive for files containing 'onboarding checklist' and read the most recent one."
- "What shared drives do I have access to, and which contain a file named 'roadmap'?"
- "Read the PDF spec in Drive (file id β¦) and list its requirements."
Develop
uv sync # install deps
uv run google-nice-mcp # run the server over stdio
Source layout: tools in server.py; Gmail/Drive
API helpers in gmail.py /
drive.py; file-text extraction in
extract.py; OAuth in
auth.py.
Notes
- Read-only. Nothing can be sent, deleted, or modified.
- Long files are truncated by
drive_read_file'smax_chars(default 20k); raise it to read more. - Scanned/image-only PDFs have no extractable text and will say so (no OCR).
Acknowledgments
Built fresh, but inspired by excellent prior work in the Google Workspace MCP ecosystem β thank you to their authors:
- taylorwilsdon/google_workspace_mcp by Taylor Wilsdon β the most feature-complete Workspace MCP server; we drew on its Drive export-MIME mappings and native-vs-binary file handling.
- aaronsb/google-workspace-mcp by Aaron Bushnell β clean read-focused Gmail/Drive tool surface.
Full third-party license notices are in CREDITS.md.
License
MIT Β© 2026 Nikias Herzhauser
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
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
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.