Add MCP support for google native connector#69
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughUpdated README.md documentation across three sections: expanded "Add an MCP Connector (Optional)" with explicit Google Workspace Native MCP requirements and a note on authorization format; rewrote "Connector Configuration" as focused bullets; and refactored "Example 6" to use the Google Native MCP connector pattern with ChangesMCP Connector Documentation Update
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 211: The README shows inconsistent authorization examples:
.setAuthorization(ScriptApp.getOAuthToken()) vs 'Bearer ' +
SALESFORCE_MCP_TOKEN; update the documentation by adding a short clarifying note
next to the ScriptApp.getOAuthToken() example and the 'Bearer ' +
SALESFORCE_MCP_TOKEN example stating that Google native connectors (using
ScriptApp.getOAuthToken()) do not require the "Bearer " prefix, whereas custom
MCP servers typically expect the full "Bearer <TOKEN>" format — mention both
symbols ScriptApp.getOAuthToken() and 'Bearer ' + SALESFORCE_MCP_TOKEN so
readers know which example requires the prefix.
- Around line 227-233: Add a short clarifying note to the "Connector
Configuration" section explaining the difference between .setConnectorId(...)
and .setServerUrl(): state that .setConnectorId('gmail'|'calendar'|'drive') is a
simplified, shorthand configuration for supported Google Workspace connectors
(if still supported), whereas .setServerUrl(...) is the explicit option required
for custom MCP servers and gives full control over endpoint and auth; if
.setConnectorId is deprecated instead, update the reference that lists
.setConnectorId and add a brief migration note instructing users to switch to
.setServerUrl and how to pass the OAuth token via
.setAuthorization(ScriptApp.getOAuthToken()).
- Around line 199-201: The README currently tells users to enable "Google Drive
API" and "Google Drive MCP API" but should use the exact GCP service
identifiers; update the sentence that says "In your GCP console, you must enable
both the standard API (e.g., *Google Drive API*) **AND** the specific MCP API
(e.g., *Google Drive MCP API*)" to reference the actual service names seen in
GCP: use drive.googleapis.com for the standard Drive API and
drivemcp.googleapis.com for the Drive MCP (and similarly use
calendar.googleapis.com and calendarmcp.googleapis.com for Calendar), keeping
the endpoint examples (`https://drivemcp.googleapis.com/mcp/v1`,
`https://calendarmcp.googleapis.com/mcp/v1`) unchanged.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 07b3f575-7b58-47ad-ad44-3aa4701d8040
📒 Files selected for processing (1)
README.md
📜 Review details
🔇 Additional comments (1)
README.md (1)
394-408: LGTM!
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 1 file(s) based on 2 unresolved review comments. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 1 file(s) based on 2 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
There was a problem hiding this comment.
♻️ Duplicate comments (1)
README.md (1)
230-233:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winClarify
.setConnectorId(...)vs.setServerUrl(...)in the configuration section.The guide now emphasizes
.setServerUrl(...), but the reference still documents.setConnectorId('gmail'|'calendar'|'drive')as supported. Add one short note in “Connector Configuration” explaining when to use each path, to avoid mixed guidance.Also applies to: 546-546
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` around lines 230 - 233, Add a brief clarifying note in the "Connector Configuration" section explaining that use setConnectorId('gmail'|'calendar'|'drive') when you want to select one of the built-in Google Native connectors, whereas use setServerUrl("https://...") (optionally with setAuthorization(...)) when pointing to a custom MCP server or non-native endpoint; mention that for custom connectors you can also add metadata like setLabel(...) and setDescription(...) and that server-based connectors may require passing the script OAuth token via setAuthorization(ScriptApp.getOAuthToken()).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@README.md`:
- Around line 230-233: Add a brief clarifying note in the "Connector
Configuration" section explaining that use
setConnectorId('gmail'|'calendar'|'drive') when you want to select one of the
built-in Google Native connectors, whereas use setServerUrl("https://...")
(optionally with setAuthorization(...)) when pointing to a custom MCP server or
non-native endpoint; mention that for custom connectors you can also add
metadata like setLabel(...) and setDescription(...) and that server-based
connectors may require passing the script OAuth token via
setAuthorization(ScriptApp.getOAuthToken()).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a510f48a-8db9-425e-93bb-e02efe2efeef
📒 Files selected for processing (1)
README.md
📜 Review details
🔇 Additional comments (1)
README.md (1)
200-201: LGTM!Also applies to: 227-229
No description provided.