Google Workspace MCP Server over SSE
Project description
onit-workspace
Google Workspace MCP Server over SSE. Provides 25 tools for Google Drive, Docs, Sheets, Slides, and Gmail.
Vendored from onit.
Installation
pip install onit-workspace
Usage
Start the server (runs in background):
onit-workspace
# or
onit-workspace start
Start in foreground (for debugging):
onit-workspace start --foreground
Custom host/port:
onit-workspace start --host 127.0.0.1 --port 9000
With OAuth 2.0 (recommended):
onit-workspace start --oauth-client-file /path/to/client_secret.json
With service account credentials:
onit-workspace start --credentials-file ~/.config/gcloud/credentials.json
With domain-wide delegation (service account + Gmail):
onit-workspace start --delegated-user user@yourcompany.com
Check status:
onit-workspace status
Stop the server:
onit-workspace stop
Using with onit
onit can connect to onit-workspace as an MCP SSE server. Start onit-workspace first, then launch onit with the --mcp-sse flag:
onit-workspace start
onit --mcp-sse http://localhost:18204/sse --web
This gives onit access to all 25 Google Workspace tools through its web interface.
Example prompts
Once connected, you can ask onit things like:
"List files in my Google Drive"
"Create a new spreadsheet called Q1 Report with columns Date, Revenue, Expenses"
"Read the contents of document <doc_id>"
"Send an email to team@company.com with subject 'Meeting Notes'"
"Download the presentation as PDF"
"Share the document with user@company.com as editor"
MCP Client Configuration
Once running, connect any MCP client to the SSE endpoint:
http://localhost:18204/sse
Example MCP client config:
{
"mcpServers": {
"onit-workspace": {
"url": "http://localhost:18204/sse"
}
}
}
Authentication
Two authentication methods are supported. Choose the one that fits your environment.
Option 1: OAuth 2.0 (recommended)
User-based authentication via browser login. Works without domain-wide delegation — ideal when delegation is disabled for security reasons.
- Go to Google Cloud Console > APIs & Services > Credentials
- Enable APIs: Docs, Sheets, Slides, Drive, Gmail
- Create an OAuth 2.0 Client ID (type: Desktop application)
- Download the client secrets JSON
- Start the server:
onit-workspace start --oauth-client-file /path/to/client_secret.json
Or set the environment variable:
export GOOGLE_OAUTH_CLIENT_FILE=/path/to/client_secret.json
onit-workspace start
On first API call, a browser opens for Google login. The token is saved to ~/.config/gcloud/token.pickle for subsequent runs.
Option 2: Service account
Server-to-server authentication using a service account key.
- Create a service account at Google Cloud Console > IAM & Admin > Service Accounts
- Enable APIs: Docs, Sheets, Slides, Drive, Gmail
- Download JSON key and configure via one of:
- CLI flag:
--credentials-file /path/to/service-account.json - Environment variable:
GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json - Default path:
~/.config/gcloud/credentials.json
- CLI flag:
- Share existing files with the service account email
Gmail with service account requires domain-wide delegation:
- Enable delegation on the service account in Google Cloud Console
- Authorize scopes in Google Admin Console > Security > API Controls > Domain-wide delegation
- Pass
--delegated-user user@yourcompany.comor use theuser_emailparameter per tool call
See docs/GOOGLE_WORKSPACE_AND_OAUTH.md for the full setup guide.
Tools (25)
| Category | Tools | Description |
|---|---|---|
| Auth | google_auth |
Check authentication status |
| Drive | drive_list, drive_create_folder, drive_move, drive_delete, drive_share, drive_download, drive_upload |
Search, organize, share, upload, and download files |
| Docs | doc_create, doc_read, doc_write, doc_update |
Full CRUD for Google Docs |
| Sheets | sheet_create, sheet_read, sheet_write, sheet_info |
Full CRUD for Google Sheets |
| Slides | slides_create, slides_read, slides_edit, slides_update |
Full CRUD for Google Slides |
| Gmail | gmail_list, gmail_read, gmail_modify, gmail_send, gmail_attachment, gmail_create_label |
Read, send, label, and manage email |
Drive (7 tools):
drive_list- Search and list files with filtering by type, folder, and querydrive_create_folder- Create folders with optional auto-sharingdrive_move- Move or rename files and foldersdrive_delete- Trash or permanently delete filesdrive_share- Share with users, groups, domains, or make publicdrive_download- Download/export files (PDF, DOCX, XLSX, PPTX, etc.)drive_upload- Upload local files to Drive with optional sharing
Docs (4 tools):
doc_create- Create a new Google Doc with optional initial contentdoc_read- Read document content as plain text or JSON structuredoc_write- Append, insert, or replace content (text, headings, bullets, numbered lists, tables)doc_update- Modify or delete existing paragraphs by index, change paragraph styles
Sheets (4 tools):
sheet_create- Create a new spreadsheet with optional headers and datasheet_read- Read data from a cell rangesheet_write- Update or append rows of datasheet_info- Get spreadsheet metadata (sheet names, dimensions, frozen rows/columns)
Slides (4 tools):
slides_create- Create a new presentation with title and subtitleslides_read- Read full slide content including shapes, tables, and speaker notesslides_edit- Add new slides (multiple layouts) or tablesslides_update- Modify existing shape text or delete slides
Gmail (6 tools):
gmail_list- List and search emails with query filtersgmail_read- Read full email with headers, body, and attachment infogmail_modify- Modify labels, read/unread status, and stargmail_send- Compose and send email with optional attachments and HTMLgmail_attachment- List or download email attachmentsgmail_create_label- Create labels or apply labels to messages
Docker
See docs/DOCKER.md for Docker build and run instructions.
Documentation
- Docker — build, run, and Docker Compose setup
- Google Workspace & OAuth Setup — full setup guide
- OAuth Quick Start — 5-minute OAuth setup checklist
- OAuth Redirect Flow — detailed OAuth2 implementation
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onit_workspace-0.1.0.tar.gz.
File metadata
- Download URL: onit_workspace-0.1.0.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3347d61898854c996242fd77ac7bd980f4b10e93222a13befba5295cb8ceb6b8
|
|
| MD5 |
f02a84ca402b1bc983fcf04b136249ca
|
|
| BLAKE2b-256 |
5180999d16df5f445e5961f0a43c2dab4fbb147ed68c2414a3c3f121bb1a4a23
|
Provenance
The following attestation bundles were made for onit_workspace-0.1.0.tar.gz:
Publisher:
publish.yml on sibyl-oracles/onit-workspace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onit_workspace-0.1.0.tar.gz -
Subject digest:
3347d61898854c996242fd77ac7bd980f4b10e93222a13befba5295cb8ceb6b8 - Sigstore transparency entry: 1022640318
- Sigstore integration time:
-
Permalink:
sibyl-oracles/onit-workspace@6829ffbe3ca85b12a3f952a5d76e69be10e620a4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/sibyl-oracles
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6829ffbe3ca85b12a3f952a5d76e69be10e620a4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file onit_workspace-0.1.0-py3-none-any.whl.
File metadata
- Download URL: onit_workspace-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b424cd60b7fbb5420b3c1baf9aa2588760bfc72f78645b9307dcfb9fa91987e
|
|
| MD5 |
c36c864502b6ce14f2888336c5d376b2
|
|
| BLAKE2b-256 |
05a5d866528433de8f28f8fa41319a568434d95dabf961470403be6af7c8234c
|
Provenance
The following attestation bundles were made for onit_workspace-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on sibyl-oracles/onit-workspace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onit_workspace-0.1.0-py3-none-any.whl -
Subject digest:
5b424cd60b7fbb5420b3c1baf9aa2588760bfc72f78645b9307dcfb9fa91987e - Sigstore transparency entry: 1022640384
- Sigstore integration time:
-
Permalink:
sibyl-oracles/onit-workspace@6829ffbe3ca85b12a3f952a5d76e69be10e620a4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/sibyl-oracles
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6829ffbe3ca85b12a3f952a5d76e69be10e620a4 -
Trigger Event:
release
-
Statement type: