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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。