Skip to content

Add MCP support for google native connector#69

Open
aubrypaul wants to merge 2 commits into
mainfrom
google-mcp-guide
Open

Add MCP support for google native connector#69
aubrypaul wants to merge 2 commits into
mainfrom
google-mcp-guide

Conversation

@aubrypaul
Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Replaced old MCP connector guidance with a new Google Workspace Native MCP requirements warning and a native connector example.
    • Clarified connector configuration into explicit bullets covering Google native endpoints vs custom MCP servers and approval workflow options.
    • Added a note on authorization format (native connectors do not require a "Bearer " prefix).
    • Updated example usage to demonstrate the native connector and increased max_tokens to 10000; removed the prior Gmail connector example.

Walkthrough

Updated 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 max_tokens: 10000.

Changes

MCP Connector Documentation Update

Layer / File(s) Summary
MCP Connector Guidance and Configuration
README.md
Replaced the "Add an MCP Connector (Optional)" section with Google Workspace native MCP prerequisites, added a "Note on Authorization Format" clarifying native OAuth token usage (no "Bearer " prefix), and rewrote "Connector Configuration" into bullets distinguishing Google native endpoints vs custom MCP servers, approval workflow options, and MCP availability (OpenAI Responses API models only).
Example 6: MCP Connector Usage
README.md
Reworked Example 6 to configure a Google Native Gmail MCP endpoint using .setServerUrl(...), .setAuthorization(ScriptApp.getOAuthToken()), and .setRequireApproval('never'); removed the .setConnectorId('gmail') example; updated chat.run to include max_tokens: 10000; added a note about enabling linked GCP/MCP APIs.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess whether the description relates to the changeset. Add a pull request description explaining the MCP support changes, including what was updated and why these changes are necessary.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating README.md documentation to add MCP support for the Google native connector, which is the primary focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch google-mcp-guide
  • 🛠️ JSDoc Checks

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3598bae and 38b4e5d.

📒 Files selected for processing (1)
  • README.md
📜 Review details
🔇 Additional comments (1)
README.md (1)

394-408: LGTM!

Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 1 file(s) based on 2 unresolved review comments.

Files modified:

  • README.md

Commit: 1727ac60ad02703feae00d86f408d4f00d4f647b

The changes have been pushed to the google-mcp-guide branch.

Time taken: 1m 23s

Fixed 1 file(s) based on 2 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
README.md (1)

230-233: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify .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

📥 Commits

Reviewing files that changed from the base of the PR and between 38b4e5d and 1727ac6.

📒 Files selected for processing (1)
  • README.md
📜 Review details
🔇 Additional comments (1)
README.md (1)

200-201: LGTM!

Also applies to: 227-229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant