Google Workspace MCP Server
Provides tools to manage Gmail, including listing, reading, sending, and searching emails.
Provides tools to manage Google Calendar events, including listing, creating, and deleting events.
Provides tools to interact with Google Chat, including listing spaces, sending messages, and listing messages.
Provides tools to manage Google Docs, including creating documents, reading content, inserting and appending text.
Provides tools to manage Google Drive, including listing files, creating folders, deleting files, and sharing files.
Provides tools to manage Google Forms, including creating forms, adding questions, and getting responses.
Provides tools to manage Google Sheets, including creating spreadsheets, reading and updating cell values, and appending rows.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Workspace MCP Serversend an email to alice@example.com saying meeting at 3pm"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Workspace MCP Server
Comprehensive Model Context Protocol (MCP) server providing unified access to all major Google Workspace APIs through a single interface.
Features
Supported Google Services
Gmail: Read, send, search emails, manage labels
Google Drive: List, create, delete, share files and folders
Google Sheets: Create, read, update spreadsheets
Google Calendar: Manage events and calendars
Google Docs: Create and edit documents
Google Forms: Create forms, add questions, read responses
Google Chat: Send messages and manage spaces
Key Capabilities
Unified Authentication: Single OAuth 2.0 flow for all services
Comprehensive API Coverage: 25+ tools across 7 Google services
Docker-Based: Easy deployment with credential persistence
Production-Ready: Secure credential handling and error management
Related MCP server: google-connections-mcp
Quick Start
Prerequisites
Google Cloud Project with enabled APIs:
Gmail API
Google Drive API
Google Sheets API
Google Calendar API
Google Docs API
Google Forms API
Google Chat API
OAuth 2.0 Credentials:
Go to Google Cloud Console
Create OAuth 2.0 Client ID (Desktop application)
Download the JSON file
Installation via Docker
# Pull the image
docker pull pauljeyasinghph/google-workspace-mcp:latest
# Run the container
docker run -i --rm \
-v $(pwd)/credentials:/data/credentials \
-v $(pwd)/client_secret.json:/data/credentials/client_secret.json:ro \
pauljeyasinghph/google-workspace-mcp:latestConfiguration in Claude Desktop
Add to ~/.config/claude/config.json:
{
"mcpServers": {
"google-workspace": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/path/to/credentials:/data/credentials",
"-v",
"/path/to/client_secret.json:/data/credentials/client_secret.json:ro",
"pauljeyasinghph/google-workspace-mcp:latest"
]
}
}
}Available Tools
Gmail Tools
gmail_list_messages- List emails with filtersgmail_get_message- Get specific emailgmail_send_message- Send emailgmail_search_messages- Search emails
Google Chat Tools
chat_list_spaces- List Chat spaceschat_send_message- Send message to spacechat_list_messages- List messages in space
Google Sheets Tools
sheets_create_spreadsheet- Create new spreadsheetsheets_get_values- Read cell valuessheets_update_values- Update cellssheets_append_values- Append rows
Google Drive Tools
drive_list_files- List files/foldersdrive_create_folder- Create folderdrive_delete_file- Delete filedrive_share_file- Share with users
Google Forms Tools
forms_create_form- Create new formforms_add_question- Add questionforms_get_responses- Get form responses
Google Calendar Tools
calendar_list_events- List eventscalendar_create_event- Create eventcalendar_delete_event- Delete event
Google Docs Tools
docs_create_document- Create documentdocs_get_document- Get document contentdocs_insert_text- Insert textdocs_append_text- Append text
Authentication Flow
First Run: Opens browser for OAuth consent
Token Storage: Saves tokens to mounted volume
Auto-Refresh: Automatically refreshes expired tokens
Persistent: Tokens survive container restarts
Security Best Practices
Never commit credentials to version control
Use read-only mounts for client_secret.json
Restrict OAuth scopes to minimum required
Rotate credentials periodically
Monitor API usage in Google Cloud Console
Building from Source
# Clone the repository
git clone https://github.com/PaulJeyasinghph/google-workspace-mcp.git
cd google-workspace-mcp
# Build the Docker image
docker build -t google-workspace-mcp .
# Run locally
docker run -i --rm \
-v $(pwd)/credentials:/data/credentials \
-v $(pwd)/client_secret.json:/data/credentials/client_secret.json:ro \
google-workspace-mcpUsage Examples
Send an Email
{
"tool": "gmail_send_message",
"arguments": {
"to": "example@gmail.com",
"subject": "Test Email",
"body": "This is a test email sent via MCP."
}
}Create a Spreadsheet
{
"tool": "sheets_create_spreadsheet",
"arguments": {
"title": "Q1 Budget",
"sheet_names": ["Revenue", "Expenses"]
}
}Schedule a Meeting
{
"tool": "calendar_create_event",
"arguments": {
"summary": "Team Sync",
"start_time": "2024-03-20T10:00:00Z",
"end_time": "2024-03-20T11:00:00Z",
"attendees": ["team@example.com"]
}
}Troubleshooting
Authentication Errors
Verify all required APIs are enabled
Check OAuth consent screen configuration
Ensure credentials file is properly mounted
Permission Denied
Confirm OAuth scopes in credentials
Check Google Workspace admin settings
Verify user has necessary permissions
Container Issues
Check volume mount paths
Verify credentials directory permissions
Review Docker logs for errors
Development
Project Structure
google-workspace-mcp/
├── src/
│ ├── server.py # Main MCP server
│ ├── auth.py # OAuth handler
│ ├── gmail.py # Gmail tools
│ ├── chat.py # Chat tools
│ ├── sheets.py # Sheets tools
│ ├── drive.py # Drive tools
│ ├── forms.py # Forms tools
│ ├── calendar.py # Calendar tools
│ └── docs.py # Docs tools
├── Dockerfile # Multi-stage build
├── requirements.txt # Python dependencies
├── server.yaml # Docker registry config
├── tools.json # Tool definitions
└── README.md # This fileRunning Tests
# Install dev dependencies
pip install -r requirements.txt pytest
# Run tests
pytest tests/Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Make your changes
Add tests
Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
Issues: GitHub Issues
Discussions: GitHub Discussions
Documentation: Google Workspace APIs
Acknowledgments
Built with Model Context Protocol
Powered by Google Workspace APIs
Inspired by the MCP community
Roadmap
Add Google Meet integration
Support service account authentication
Add batch operation support
Implement webhook listeners
Add Google Admin SDK tools
Support Google Workspace for Education
Made with ❤️ for the MCP community
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PaulJeyasinghph/google-workspace-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server