Claude Code Google Workspace
Multi-account Google Workspace (Gmail, Drive, Calendar, Sheets, Docs) + Slack MCP servers for Claude Code. Setup guide with CLAUDE.md for AI-guided installation.
What is Claude Code Google Workspace?
Claude Code Google Workspace is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to multi-account google workspace (gmail, drive, calendar, sheets, docs) + slack mcp servers for claude code. setup guide with claude.md for ai-guided installation.
Multi-account Google Workspace (Gmail, Drive, Calendar, Sheets, Docs) + Slack MCP servers for Claude Code. Setup guide with CLAUDE.md for AI-guided installation.
This server falls under the Business Applications category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Multi-account Google Workspace (Gmail, Drive, Calendar, Shee
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx claude-code-google-workspaceConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Claude Code Google Workspace
This repository provides a battle-tested multi-account Google Workspace and Slack MCP setup for Claude Code, covering Gmail, Google Drive, Google Calendar, Google Sheets, Google Docs, and Slack. It solves the difficult problem of routing multiple Google accounts through a single Claude Code session by using per-account OAuth credential files and a token wrapper script that mints fresh access tokens at runtime. Engineering teams and power users who need AI-assisted access to several Google accounts simultaneously use it to search email, read Drive files, check calendars, and query Slack — all from a single Claude Code session.
Prerequisites
- Claude Code installed (npm install -g @anthropic-ai/claude-code)
- A Google Cloud project with the Gmail, Drive, Calendar, Sheets, and Docs APIs enabled
- Separate OAuth 2.0 Desktop App client credentials for each Google account you want to connect
- Each Google account added as a test user on the OAuth consent screen
- Slack API token (SLACK_MCP_XOXP_TOKEN) if Slack integration is desired
Clone the repository
Clone the setup repository which contains the CLAUDE.md guide, the token wrapper script, and example configuration files.
git clone https://github.com/evolsb/claude-code-google-workspace.git
cd claude-code-google-workspaceCreate Google Cloud OAuth credentials
For each Google account you want to connect, create a separate OAuth 2.0 Desktop App client in Google Cloud Console. Using the same OAuth client for two accounts will invalidate the first account's refresh token when the second is authenticated.
# In Google Cloud Console:
# APIs & Services > Credentials > Create Credentials > OAuth client ID
# Application type: Desktop app
# (Create one per account)Complete OAuth flow and export credentials
Authenticate each account through the OAuth flow and export a credential file containing the client_id, client_secret, and refresh_token. Store each file in ~/.config/gws/.
mkdir -p ~/.config/gws
# Store credential files as:
# ~/.config/gws/personal.json
# ~/.config/gws/work.jsonGrant IAM permissions
Grant the serviceUsageConsumer IAM role to each Google account on the Cloud project so they can call the enabled APIs.
# In Google Cloud Console:
# IAM & Admin > IAM > Grant Access
# Role: Service Usage ConsumerConfigure .mcp.json at the project root
Add the MCP server entries to .mcp.json in your project root. Claude Code only reliably reads MCP config from this location. The token wrapper script uses the credential files to mint fresh access tokens.
Claude Code Google Workspace Examples
Client configuration
Example .mcp.json at the project root, configuring two Google accounts and a Slack workspace using the token wrapper script.
{
"mcpServers": {
"gws-personal": {
"command": "./gws-token-wrapper.sh",
"args": ["personal.json"]
},
"gws-work": {
"command": "./gws-token-wrapper.sh",
"args": ["work.json"]
},
"slack": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-slack"],
"env": {
"SLACK_MCP_XOXP_TOKEN": "xoxp-your-slack-token"
}
}
}
}Prompts to try
Use these prompts in Claude Code once your Google Workspace and Slack servers are connected.
- "Search my personal Gmail for emails from the legal team about the contract renewal."
- "List the files shared with me in my work Google Drive from the last week."
- "What meetings do I have on my work calendar tomorrow?"
- "Read the contents of the Q3 roadmap Google Doc in my Drive."
- "Search Slack for any messages in #engineering mentioning the deployment issue."Troubleshooting Claude Code Google Workspace
MCP servers are not loaded by Claude Code even after adding to settings.local.json
Claude Code only reliably reads MCP server configuration from .mcp.json at the project root. Move your mcpServers block to .mcp.json in the root of the directory where you run claude, not to settings.local.json.
OAuth refresh token is invalidated after authenticating a second Google account
This happens when you use the same OAuth client ID for multiple accounts. Create a separate OAuth 2.0 Desktop App client in Google Cloud Console for each account and use each account's unique client credentials for its own credential file.
Token wrapper script fails with permission denied
Make the wrapper script executable with: chmod +x gws-token-wrapper.sh. Also verify that the credential files in ~/.config/gws/ have the correct JSON structure with client_id, client_secret, and refresh_token fields.
Frequently Asked Questions about Claude Code Google Workspace
What is Claude Code Google Workspace?
Claude Code Google Workspace is a Model Context Protocol (MCP) server that multi-account google workspace (gmail, drive, calendar, sheets, docs) + slack mcp servers for claude code. setup guide with claude.md for ai-guided installation. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Claude Code Google Workspace?
Follow the installation instructions on the Claude Code Google Workspace GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Claude Code Google Workspace?
Claude Code Google Workspace works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Claude Code Google Workspace free to use?
Yes, Claude Code Google Workspace is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Claude Code Google Workspace Alternatives — Similar Business Applications Servers
Looking for alternatives to Claude Code Google Workspace? Here are other popular business applications servers you can use with Claude, Cursor, and VS Code.
n8n
★ 189.1kA comprehensive MCP server that provides full control over n8n automation workflows through natural language. It offers 43 tools for managing workflows, executions, credentials, and data tables, with safety features like write-mode protection and dou
LobeHub
★ 77.5k🤯 LobeHub is your Chief Agent Operator, organizing your agents into 7×24 operations by hiring, scheduling, and reporting on your entire AI team.
Jeecgboot
★ 46.4kAI 低代码平台,「低代码 + 零代码」双模式驱动:低代码一键生成前后端代码,零代码 5 分钟搭建系统,AI Skills 一句话画流程、设计表单、生成整套系统。内置 AI聊天、知识库、流程编排、MCP插件等,兼容主流大模型。引领「AI 生成 → 在线配置 → 代码生成 → 手工合并->AI修改」开发模式,消除 Java 项目 80% 的重复工作,提效而不失灵活。
CowAgent
★ 44.7kCowAgent (chatgpt-on-wechat) 是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、通过长期记忆和知识库不断成长,比OpenClaw更轻量和便捷。同时支持微信、飞书、钉钉、企微、QQ、公众号、网页等接入,可选择DeepSeek/OpenAI/Claude/Gemini/ MiniMax/Qwen/GLM/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助理和企业数字员工。
Minds Platform
★ 39.2kPlatform dedicated to building an open foundation for applied Artificial Intelligence, designed for people seeking production-ready AI systems they can truly control, extend and deploy anywhere.
Astrbot
★ 32.8kAI Agent Assistant & development framework that integrates lots of IM platforms, LLMs, plugins and AI feature, and can be your openclaw alternative. ✨
Browse More Business Applications MCP Servers
Explore all business applications servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Claude Code Google Workspace in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Claude Code Google Workspace?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.