Merge branch 'main' of github.com:taylorwilsdon/google_workspace_mcp into feature/create-drive-folder
This commit is contained in:
40
README.md
40
README.md
@@ -1,3 +1,5 @@
|
||||
<!-- mcp-name: io.github.taylorwilsdon/workspace-mcp -->
|
||||
|
||||
<div align="center">
|
||||
|
||||
# <span style="color:#cad8d9">Google Workspace MCP Server</span> <img src="https://github.com/user-attachments/assets/b89524e4-6e6e-49e6-ba77-00d6df0c6e5c" width="80" align="right" />
|
||||
@@ -54,6 +56,8 @@ A production-ready MCP server that integrates all major Google Workspace service
|
||||
|
||||
**Simplified Setup**: Now uses Google Desktop OAuth clients - no redirect URIs or port configuration needed!
|
||||
|
||||
**Maintainer Docs**: Automated release and registry publishing guide at [`docs/mcp_registry_publishing_guide.md`](docs/mcp_registry_publishing_guide.md).
|
||||
|
||||
## <span style="color:#adbcbc">Features</span>
|
||||
|
||||
<table align="center" style="width: 100%; max-width: 100%;">
|
||||
@@ -396,6 +400,7 @@ export USER_GOOGLE_EMAIL=\
|
||||
| `WORKSPACE_MCP_PORT` | Server listening port | `8000` |
|
||||
| `WORKSPACE_MCP_HOST` | Server bind host | `0.0.0.0` |
|
||||
| `WORKSPACE_EXTERNAL_URL` | External URL for reverse proxy setups | None |
|
||||
| `WORKSPACE_ATTACHMENT_DIR` | Directory for downloaded attachments | `~/.workspace-mcp/attachments/` |
|
||||
| `GOOGLE_OAUTH_REDIRECT_URI` | Override OAuth callback URL | Auto-constructed |
|
||||
| `USER_GOOGLE_EMAIL` | Default auth email | None |
|
||||
|
||||
@@ -834,7 +839,7 @@ cp .env.oauth21 .env
|
||||
|------|------|-------------|
|
||||
| `search_drive_files` | **Core** | Search files with query syntax |
|
||||
| `get_drive_file_content` | **Core** | Read file content (Office formats) |
|
||||
| `get_drive_file_download_url` | **Core** | Get download URL for Drive files |
|
||||
| `get_drive_file_download_url` | **Core** | Download Drive files to local disk |
|
||||
| `create_drive_file` | **Core** | Create files or fetch from URLs |
|
||||
| `create_drive_folder` | **Core** | Create empty folders in Drive or shared drives |
|
||||
| `import_to_google_doc` | **Core** | Import files (MD, DOCX, HTML, etc.) as Google Docs |
|
||||
@@ -847,6 +852,7 @@ cp .env.oauth21 .env
|
||||
| `update_drive_permission` | Extended | Modify permission role |
|
||||
| `remove_drive_permission` | Extended | Revoke file access |
|
||||
| `transfer_drive_ownership` | Extended | Transfer file ownership to another user |
|
||||
| `set_drive_file_permissions` | Extended | Set link sharing and file-level sharing settings |
|
||||
| `get_drive_file_permissions` | Complete | Get detailed file permissions |
|
||||
| `check_drive_file_public_access` | Complete | Check public sharing status |
|
||||
|
||||
@@ -898,6 +904,24 @@ attachments=[{
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>📥 Downloaded Attachment Storage</b> <sub><sup>← Where downloaded files are saved</sup></sub></summary>
|
||||
|
||||
When downloading Gmail attachments (`get_gmail_attachment_content`) or Drive files (`get_drive_file_download_url`), files are saved to a persistent local directory rather than a temporary folder in the working directory.
|
||||
|
||||
**Default location:** `~/.workspace-mcp/attachments/`
|
||||
|
||||
Files are saved with their original filename plus a short UUID suffix for uniqueness (e.g., `invoice_a1b2c3d4.pdf`). In **stdio mode**, the tool returns the absolute file path for direct filesystem access. In **HTTP mode**, it returns a download URL via the `/attachments/{file_id}` endpoint.
|
||||
|
||||
To customize the storage directory:
|
||||
```bash
|
||||
export WORKSPACE_ATTACHMENT_DIR="/path/to/custom/dir"
|
||||
```
|
||||
|
||||
Saved files expire after 1 hour and are cleaned up automatically.
|
||||
|
||||
</details>
|
||||
|
||||
</td>
|
||||
<td width="50%" valign="top">
|
||||
|
||||
@@ -907,12 +931,13 @@ attachments=[{
|
||||
|------|------|-------------|
|
||||
| `get_doc_content` | **Core** | Extract document text |
|
||||
| `create_doc` | **Core** | Create new documents |
|
||||
| `modify_doc_text` | **Core** | Modify document text |
|
||||
| `modify_doc_text` | **Core** | Modify document text (formatting + links) |
|
||||
| `search_docs` | Extended | Find documents by name |
|
||||
| `find_and_replace_doc` | Extended | Find and replace text |
|
||||
| `list_docs_in_folder` | Extended | List docs in folder |
|
||||
| `insert_doc_elements` | Extended | Add tables, lists, page breaks |
|
||||
| `update_paragraph_style` | Extended | Apply heading styles (H1-H6) and paragraph formatting |
|
||||
| `update_paragraph_style` | Extended | Apply heading styles, lists (bulleted/numbered with nesting), and paragraph formatting |
|
||||
| `get_doc_as_markdown` | Extended | Export document as formatted Markdown with optional comments |
|
||||
| `insert_doc_image` | Complete | Insert images from Drive/URLs |
|
||||
| `update_doc_headers_footers` | Complete | Modify headers and footers |
|
||||
| `batch_update_doc` | Complete | Execute multiple operations |
|
||||
@@ -937,6 +962,7 @@ attachments=[{
|
||||
| `create_spreadsheet` | **Core** | Create new spreadsheets |
|
||||
| `list_spreadsheets` | Extended | List accessible spreadsheets |
|
||||
| `get_spreadsheet_info` | Extended | Get spreadsheet metadata |
|
||||
| `format_sheet_range` | Extended | Apply colors, number formats, text wrapping, alignment, bold/italic, font size |
|
||||
| `create_sheet` | Complete | Add sheets to existing files |
|
||||
| `*_sheet_comment` | Complete | Read/create/reply/resolve comments |
|
||||
|
||||
@@ -1020,6 +1046,8 @@ attachments=[{
|
||||
| `get_messages` | **Core** | Retrieve space messages |
|
||||
| `send_message` | **Core** | Send messages to spaces |
|
||||
| `search_messages` | **Core** | Search across chat history |
|
||||
| `create_reaction` | **Core** | Add emoji reaction to a message |
|
||||
| `download_chat_attachment` | Extended | Download attachment from a chat message |
|
||||
|
||||
</td>
|
||||
<td width="50%" valign="top">
|
||||
@@ -1571,6 +1599,12 @@ The credential store automatically handles credential serialization, expiry pars
|
||||
- **Transport-Aware Callbacks**: Stdio mode starts a minimal HTTP server only for OAuth, ensuring callbacks work in all modes
|
||||
- **Production**: Use HTTPS & OAuth 2.1 and configure accordingly
|
||||
- **Scope Minimization**: Tools request only necessary permissions
|
||||
- **Local File Access Control**: Tools that read local files (e.g., attachments, `file://` uploads) are restricted to the user's home directory by default. Override this with the `ALLOWED_FILE_DIRS` environment variable:
|
||||
```bash
|
||||
# Colon-separated list of directories (semicolon on Windows) from which local file reads are permitted
|
||||
export ALLOWED_FILE_DIRS="/home/user/documents:/data/shared"
|
||||
```
|
||||
Regardless of the allowlist, access to sensitive paths (`.env`, `.ssh/`, `.aws/`, `/etc/shadow`, credential files, etc.) is always blocked.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user