https://github.com/orvice/google-workspace-mcp
mcp server for google workspace
https://github.com/orvice/google-workspace-mcp
Last synced: 7 months ago
JSON representation
mcp server for google workspace
- Host: GitHub
- URL: https://github.com/orvice/google-workspace-mcp
- Owner: orvice
- Created: 2025-03-26T15:52:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-29T04:22:26.000Z (over 1 year ago)
- Last Synced: 2025-09-07T22:39:05.601Z (11 months ago)
- Language: Go
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mcp-servers - **google-workspace-mcp** - mcp server for google workspace `go` `mcp` `server` `go install orvice/google-workspace-mcp@latest` (⚙️ DevOps)
- awesome-mcp-servers - MCP Google Workspace - MCP server for Google Workspace, enabling AI assistants to interact with Gmail, Drive, Calendar, and other Google Workspace services through natural language. ([Read more](/details/mcp-google-workspace.md)) `Google Workspace` `Gmail` `Calendar` (Business & Productivity)
README
# Google Workspace MCP
A Model Context Protocol (MCP) server for Google Workspace that provides tools for managing Google Workspace resources through the Admin SDK.
## Prerequisites
1. A Google Cloud Platform project with the Admin SDK API enabled
2. A service account with appropriate permissions
3. A Google Workspace admin user to impersonate
## Setup
### Service Account Configuration
1. Create a service account in the Google Cloud Console
2. Grant the service account appropriate permissions for Google Workspace Admin SDK
3. Create and download a JSON key file for the service account
4. Enable domain-wide delegation for the service account
5. Grant the necessary OAuth scopes to the service account in your Google Workspace Admin Console
## Environment Variables
The application requires the following environment variables to be set:
| Variable | Description |
|----------|-------------|
| `GOOGLE_SERVICE_ACCOUNT` | The path to the service account JSON key file |
| `GOOGLE_ADMIN_EMAIL` | The email address of the Google Workspace admin user to impersonate |
## Usage
### Build
```bash
make build
```
### config
```json
{
"mcpServers": {
"googleworkspace-mcp": {
"command": "/go/bin/google-workspace-mcp",
"args": [],
"env": {
"GOOGLE_SERVICE_ACCOUNT": "test.json",
"GOOGLE_ADMIN_EMAIL": "admin@yourdomain.com"
},
"disabled": false,
"autoApprove": []
}
}
}
```
> **Note:** Make sure your service account has the necessary API access enabled in Google Cloud Console (Admin SDK API, Gmail API, and Calendar API).
## Available Tools
- `directory_users` - List all users in your Google Workspace directory
- `create_user` - Create a new user in Google Workspace
- `list_gmail` - List recent Gmail messages (requires Gmail API access)
- `list_calendar_events` - List upcoming calendar events for a user (requires Calendar API access)
- `create_calendar_event` - Create a new calendar event (requires Calendar API access)
## Required OAuth Scopes
When setting up domain-wide delegation for your service account, ensure you grant the following OAuth scopes:
- `https://www.googleapis.com/auth/admin.directory.user` - For accessing and managing directory user information
- `https://www.googleapis.com/auth/gmail.readonly` - For reading Gmail messages
- `https://www.googleapis.com/auth/calendar` - For reading and writing calendar events