Skip to content

Commit 47b7e5f

Browse files
committed
Merge branch 'main' of github.com:taylorwilsdon/google_workspace_mcp into feature/forms-batch-update
2 parents b7a2f08 + 051c9d7 commit 47b7e5f

17 files changed

Lines changed: 783 additions & 298 deletions

.github/pull_request_template.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Description
2+
Brief description of the changes in this PR.
3+
4+
## Type of Change
5+
- [ ] Bug fix (non-breaking change which fixes an issue)
6+
- [ ] New feature (non-breaking change which adds functionality)
7+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
8+
- [ ] Documentation update
9+
10+
## Testing
11+
- [ ] I have added tests that prove my fix is effective or that my feature works
12+
- [ ] New and existing unit tests pass locally with my changes
13+
- [ ] I have tested this change manually
14+
15+
## Checklist
16+
- [ ] My code follows the style guidelines of this project
17+
- [ ] I have performed a self-review of my own code
18+
- [ ] I have commented my code, particularly in hard-to-understand areas
19+
- [ ] My changes generate no new warnings
20+
- [ ] **I have enabled "Allow edits from maintainers" for this pull request**
21+
22+
## Additional Notes
23+
Add any other context about the pull request here.
24+
25+
---
26+
27+
**⚠️ IMPORTANT:** This repository requires that you enable "Allow edits from maintainers" when creating your pull request. This allows maintainers to make small fixes and improvements directly to your branch, speeding up the review process.
28+
29+
To enable this setting:
30+
1. When creating the PR, check the "Allow edits from maintainers" checkbox
31+
2. If you've already created the PR, you can enable this in the PR sidebar under "Allow edits from maintainers"
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Check Maintainer Edits Enabled
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
6+
7+
jobs:
8+
check-maintainer-edits:
9+
runs-on: ubuntu-latest
10+
if: github.event.pull_request.head.repo.fork == true || github.event.pull_request.head.repo.full_name != github.repository
11+
12+
steps:
13+
- name: Check if maintainer edits are enabled
14+
uses: actions/github-script@v7
15+
with:
16+
script: |
17+
const { data: pr } = await github.rest.pulls.get({
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
pull_number: context.issue.number
21+
});
22+
23+
if (!pr.maintainer_can_modify) {
24+
await github.rest.issues.createComment({
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
issue_number: context.issue.number,
28+
body: `⚠️ **Maintainer edits not enabled**
29+
30+
This repository requires that you enable "Allow edits from maintainers" for your pull request. This allows maintainers to make small fixes and improvements directly to your branch, which speeds up the review process.
31+
32+
**To enable this setting:**
33+
1. Go to your pull request page
34+
2. In the right sidebar, look for "Allow edits from maintainers"
35+
3. Check the checkbox to enable it
36+
37+
Once you've enabled this setting, this check will automatically pass. Thank you! 🙏`
38+
});
39+
40+
core.setFailed('Maintainer edits must be enabled for this pull request');
41+
} else {
42+
console.log('✅ Maintainer edits are enabled');
43+
}
44+
45+
check-maintainer-edits-internal:
46+
runs-on: ubuntu-latest
47+
if: github.event.pull_request.head.repo.fork == false && github.event.pull_request.head.repo.full_name == github.repository
48+
49+
steps:
50+
- name: Skip check for internal PRs
51+
run: |
52+
echo "✅ Skipping maintainer edits check for internal pull request"
53+
echo "This check only applies to external contributors and forks"

README.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -481,28 +481,30 @@ export GOOGLE_PSE_ENGINE_ID=\
481481

482482
### Start the Server
483483

484+
> **📌 Transport Mode Guidance**: Use **streamable HTTP mode** (`--transport streamable-http`) for all modern MCP clients including Claude Code, VS Code MCP, and MCP Inspector. Stdio mode is only for clients with incomplete MCP specification support.
485+
484486
<details open>
485487
<summary>▶ <b>Launch Commands</b> <sub><sup>← Choose your startup mode</sup></sub></summary>
486488

487489
<table>
488490
<tr>
489491
<td width="33%" align="center">
490492

491-
**Quick Start**
493+
**Legacy Mode**
492494
```bash
493495
uv run main.py
494496
```
495-
<sub>Default stdio mode</sub>
497+
<sub>⚠️ Stdio mode (incomplete MCP clients only)</sub>
496498

497499
</td>
498500
<td width="33%" align="center">
499501

500-
**◆ HTTP Mode**
502+
**◆ HTTP Mode (Recommended)**
501503
```bash
502504
uv run main.py \
503505
--transport streamable-http
504506
```
505-
<sub>Web interfaces & debugging</sub>
507+
<sub>✅ Full MCP spec compliance & OAuth 2.1</sub>
506508

507509
</td>
508510
<td width="34%" align="center">
@@ -513,6 +515,7 @@ uv run main.py \
513515
--single-user
514516
```
515517
<sub>Simplified authentication</sub>
518+
<sub>⚠️ Cannot be used with OAuth 2.1 mode</sub>
516519

517520
</td>
518521
</tr>
@@ -713,6 +716,7 @@ cp .env.oauth21 .env
713716
| `share_drive_file` | **Core** | Share file with users/groups/domains/anyone |
714717
| `get_drive_shareable_link` | **Core** | Get shareable links for a file |
715718
| `list_drive_items` | Extended | List folder contents |
719+
| `copy_drive_file` | Extended | Copy existing files (templates) with optional renaming |
716720
| `update_drive_file` | Extended | Update file metadata, move between folders |
717721
| `batch_share_drive_file` | Extended | Share file with multiple recipients |
718722
| `update_drive_permission` | Extended | Modify permission role |
@@ -743,7 +747,7 @@ cp .env.oauth21 .env
743747
| `draft_gmail_message` | Extended | Create drafts |
744748
| `get_gmail_threads_content_batch` | Complete | Batch retrieve thread content |
745749
| `batch_modify_gmail_message_labels` | Complete | Batch modify labels |
746-
| `start_google_auth` | Complete | Initialize authentication |
750+
| `start_google_auth` | Complete | Legacy OAuth 2.0 auth (disabled when OAuth 2.1 is enabled) |
747751

748752
</td>
749753
<td width="50%" valign="top">
@@ -894,7 +898,9 @@ cp .env.oauth21 .env
894898

895899
The server supports two transport modes:
896900

897-
#### Stdio Mode (Default - Recommended for Claude Desktop)
901+
#### Stdio Mode (Legacy - For Clients with Incomplete MCP Support)
902+
903+
> **⚠️ Important**: Stdio mode is a **legacy fallback** for clients that don't properly implement the MCP specification with OAuth 2.1 and streamable HTTP support. **Claude Code and other modern MCP clients should use streamable HTTP mode** (`--transport streamable-http`) for proper OAuth flow and multi-user support.
898904
899905
In general, you should use the one-click DXT installer package for Claude Desktop.
900906
If you are unable to for some reason, you can configure it manually via `claude_desktop_config.json`
@@ -999,6 +1005,14 @@ The server includes OAuth 2.1 support for bearer token authentication, enabling
9991005
- Production environments requiring secure session management
10001006
- Browser-based clients requiring CORS support
10011007

1008+
**⚠️ Important: OAuth 2.1 and Single-User Mode are mutually exclusive**
1009+
1010+
OAuth 2.1 mode (`MCP_ENABLE_OAUTH21=true`) cannot be used together with the `--single-user` flag:
1011+
- **Single-user mode**: For legacy clients that pass user emails in tool calls
1012+
- **OAuth 2.1 mode**: For modern multi-user scenarios with bearer token authentication
1013+
1014+
Choose one authentication method - using both will result in a startup error.
1015+
10021016
**Enabling OAuth 2.1:**
10031017
To enable OAuth 2.1, set the `MCP_ENABLE_OAUTH21` environment variable to `true`.
10041018

@@ -1148,6 +1162,8 @@ uv run main.py --transport streamable-http
11481162

11491163
### VS Code MCP Client Support
11501164

1165+
> **✅ Recommended**: VS Code MCP extension properly supports the full MCP specification. **Always use HTTP transport mode** for proper OAuth 2.1 authentication.
1166+
11511167
<details>
11521168
<summary>🆚 <b>VS Code Configuration</b> <sub><sup>← Setup for VS Code MCP extension</sup></sub></summary>
11531169

@@ -1161,14 +1177,22 @@ uv run main.py --transport streamable-http
11611177
}
11621178
}
11631179
```
1180+
1181+
*Note: Make sure to start the server with `--transport streamable-http` when using VS Code MCP.*
11641182
</details>
11651183

11661184
### Claude Code MCP Client Support
11671185

1186+
> **✅ Recommended**: Claude Code is a modern MCP client that properly supports the full MCP specification. **Always use HTTP transport mode** with Claude Code for proper OAuth 2.1 authentication and multi-user support.
1187+
11681188
<details>
11691189
<summary>🆚 <b>Claude Code Configuration</b> <sub><sup>← Setup for Claude Code MCP support</sup></sub></summary>
11701190

1171-
```json
1191+
```bash
1192+
# Start the server in HTTP mode first
1193+
uv run main.py --transport streamable-http
1194+
1195+
# Then add to Claude Code
11721196
claude mcp add --transport http workspace-mcp http://localhost:8000/mcp
11731197
```
11741198
</details>

0 commit comments

Comments
 (0)