MCP Google Workspace Server
MCP Google Workspace 服务器
模型上下文协议 (MCP) 服务器使 AI 代理能够与 Google Workspace(Drive、Docs 和 Sheets)服务进行交互。
🌟 功能
Google Drive:搜索文件、创建文件夹
Google Docs:创建、阅读、更新文档
Google 表格:创建电子表格、读取/写入单元格值
多种传输模式:stdio(默认)、SSE、WebSocket
MCP 兼容客户端支持(Cursor 等)
Related MCP server: MCP Google Suite
📋 安装
使用 uv(推荐)
uvx mcp-google-suite使用 pip
pip install mcp-google-suite开发设置
# Clone and install
git clone git@github.com:adexltd/mcp-google-suite.git && cd mcp-google-suite
uv venv && source .venv/bin/activate # or .venv\Scripts\activate on Windows
uv pip install -e .🔧 配置
为 MCP 客户端配置
添加到您的客户端设置(例如 Cursor、Claude):
使用 uvx(推荐):
{
"mcpServers": {
"mcp-google-suite": {
"command": "uvx",
"args": ["mcp-google-suite"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "~/.google/server-creds.json",
"GOOGLE_OAUTH_CREDENTIALS": "~/.google/oauth.keys.json"
}
}
}
}使用pip安装:
{
"mcpServers": {
"mcp-google-suite": {
"command": "python",
"args": ["-m", "mcp_google_suite"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "~/.google/server-creds.json",
"GOOGLE_OAUTH_CREDENTIALS": "~/.google/oauth.keys.json"
}
}
}
}Google OAuth 设置
启用 Drive、Docs 和 Sheets API
创建 OAuth 2.0 凭据
保存为
~/.google/oauth.keys.json运行
mcp-google auth进行身份验证
可用工具
驱动操作
drive_search_files:在 Google Drive 中搜索文件query(字符串,必需):搜索查询page_size(整数,可选):要返回的结果数
drive_create_folder:创建新文件夹name(字符串,必需):文件夹名称parent_id(字符串,可选):父文件夹 ID
文档操作
docs_create:创建新文档title(字符串,必需):文档标题content(字符串,可选):初始内容
docs_get_content:获取文档内容document_id(字符串,必需):文档 ID
docs_update_content:更新文档内容document_id(字符串,必需):文档 IDcontent(字符串,必需):新内容
工作表操作
sheets_create:创建一个新的电子表格title(字符串,必需):电子表格标题sheets(数组,可选):工作表名称
sheets_get_values:获取单元格值spreadsheet_id(字符串,必需):电子表格 IDrange(字符串,必需):A1 符号范围
sheets_update_values:更新单元格值spreadsheet_id(字符串,必需):电子表格 IDrange(字符串,必需):A1 符号范围values(数组,必需):值的二维数组
🛠️ 开发
# Install dev dependencies
uv pip install -e ".[dev]"
# Setup pre-commit hooks
pre-commit install
# Run tests
pytest
# Format code
black . && ruff check --fix .🔍 调试
使用 MCP Inspector 进行交互式测试:
# Using uvx
npx @modelcontextprotocol/inspector uvx mcp-google
# For development
cd path/to/mcp-google-suite
npx @modelcontextprotocol/inspector uv run mcp-google📚 资源
🤝 贡献
请阅读CONTRIBUTING.md了解我们的行为准则和提交拉取请求的流程的详细信息。
🔒 安全
请参阅SECURITY.md以了解报告漏洞和最佳实践。
📄 许可证
MIT 许可证 - 有关详细信息,请参阅LICENSE文件。
Available Tools
8 toolsdocs_createC
Create a new Google Doc
Inputs: title (required), content.
docs_get_contentC
Get the contents of a Google Doc
Inputs: document_id (required).
docs_update_contentC
Update the content of a Google Doc
Inputs: content (required), document_id (required).
drive_create_folderC
Create a new folder in Google Drive
Inputs: name (required), parent_id.
drive_search_filesC
Search for files in Google Drive
Inputs: query (required), page_size.
sheets_createC
Create a new Google Sheet
Inputs: title (required), sheets.
sheets_get_valuesC
Get values from a Google Sheet range
Inputs: range (required), spreadsheet_id (required).
sheets_update_valuesC
Update values in a Google Sheet range
Inputs: range (required), spreadsheet_id (required), values (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Every tool has a clearly distinct purpose with no ambiguity, as each is scoped to a specific Google Workspace service (Docs, Drive, Sheets) and action (create, get/read, update, search). The naming prefixes (docs_, drive_, sheets_) immediately differentiate the domains, preventing misselection.
All tools follow a consistent verb_noun pattern with service prefixes, using snake_case uniformly (e.g., docs_create, sheets_update_values). This predictable naming scheme makes it easy for an agent to understand and navigate the toolset without confusion.
With 8 tools, the count is well-scoped for covering core operations across three Google Workspace services. Each tool earns its place by providing essential CRUD-like functionality (create, get, update) and search capabilities, avoiding bloat while ensuring practical coverage.
The toolset offers strong coverage for Docs, Drive, and Sheets with create, read, update, and search operations, but minor gaps exist, such as missing delete operations for Docs and Sheets, and no update for Drive folders. Agents can work around these gaps, but the surface isn't fully complete for full lifecycle management.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
The Google GKE MCP server is a managed Model Context Protocol server that provides AI applications with tools to manage Google Kubernetes Engine (GKE) clusters and Kubernetes resources. It exposes a structured, discoverable interface that allows AI agents to interact with GKE and Kubernetes APIs, enabling them to inspect cluster configurations, retrieve Kubernetes resource YAMLs, monitor operations like cluster upgrades, diagnose issues, and optimize costs—all without needing to parse text output or use complex kubectl commands.
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that integrates with Google Drive and Google Sheets, enabling users to create, read, update, and manage spreadsheets through natural language commands.16,929 PyPI1,021MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides seamless integration with Google Workspace, allowing operations with Google Drive, Docs, and Sheets through secure OAuth2 authentication.838 PyPI3MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that connects AI agents to Google Workspace (Gmail, Calendar, Drive, Docs, Sheets, and Slides).302MIT
- AlicenseNot gradedqualityBmaintenanceA full-featured Model Context Protocol server that gives AI assistants real-time access to Google Workspace services including Drive, Gmail, Calendar, Sheets, Docs, and Apps Script.2,201 PyPI12MIT