fix(connections): drop MCP wording and the MCP guide link from Google Workspace setup (#22793)

<!-- Write all pull request text in Simplified Technical English
(ASD-STE100): short sentences, one instruction per sentence, simple
approved vocabulary, and the active voice. -->

## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - Agents use Google Workspace through the built-in Google Workspace
connection
> - Since #22634, Gmail, Drive, Docs, Sheets, Slides, and Calendar run
on Paperclip's own REST tools, not on Google's hosted MCP servers
> - The connect screen still showed "Secure MCP sign-in" and a "Review
requirements" link to Google's MCP servers guide
> - This text is wrong for this connection, it is internal jargon, and
Google's OAuth reviewers read this screen
> - This pull request removes the MCP wording and the MCP guide link
from Google Workspace setup and from its audit details
> - The benefit is that users and reviewers see only true, plain text
for this connection

## Linked Issues or Issue Description

Refs #22634

**What happened?**

On a Cloud workspace, the Google Workspace connect page showed the
subtitle "Secure MCP sign-in" while the sign-in opened and after it
failed to open. The setup page also showed a "Review requirements" link
to `developers.google.com/workspace/guides/configure-mcp-servers`. On a
self-hosted instance, the "How to set up a Google OAuth client" link
went to the same MCP servers guide. Audit details for a Google REST call
showed "Transport: mcp_remote" and "MCP method: tools/call".

**What did you expect to happen?**

The connect page says "Secure sign-in". The Paperclip-managed method on
Cloud has no requirements link, because the user has no requirements to
review. On a self-hosted instance, the customer-owned client method
links to Google's OAuth client guide. Audit details for a Google REST
call do not show MCP terms.

**Steps to reproduce**

1. Turn on the Google Workspace connector in **Settings →
Experimental**.
2. Open **Apps** and choose **Google Workspace**.
3. Start the sign-in, then close or block the sign-in window.
4. Before this change: the header shows "Secure MCP sign-in", and the
setup step shows "Review requirements" with a link to Google's MCP
servers guide.

## What Changed

- `ui/src/features/connections/ConnectionSetupFlow.tsx`:
`OAuthConnectStateScreen` shows "Secure sign-in" for a curated app. A
server that the user pasted as an MCP server keeps "Secure MCP sign-in".
This is generic: there is no Google-specific code.
- `packages/shared/src/app-definitions/google-workspace.json`: remove
the top-level `docsUrl` (the MCP servers guide). The Paperclip-managed
method now has no "Review requirements" link. The customer-owned
method's `consoleLinks.docs` is now Google's OAuth client guide
(`create-credentials#oauth-client-id`). The "Review requirements" link
and the self-hosted "How to set up a Google OAuth client" link both use
it. Its guidance text names the Gmail, Drive, Docs, Sheets, Slides, and
Calendar APIs instead of "the Google Workspace MCP APIs". This file is a
reviewed definition: `scripts/ingest-app-definitions.mjs` copies it
as-is, so a regeneration keeps the fix.
- `server/src/services/tool-gateway.ts`: an audit record for a Google
Workspace REST call no longer has `mcpMethod`.
- `ui/src/pages/tools/AuditTab.tsx`: audit details show the connection
type label ("Remote HTTP") as "Type" instead of the raw `mcp_remote`
value. This uses the same label as the connection's "Connection
details".
- `doc/connections/GOOGLE-WORKSPACE.md`: the self-hosted section links
Google's OAuth client guide.
- `tests/runner-e2e/source-sdk-public-inputs.json`: refreshed pinned
inputs.

## Verification

- Red first, then green:
- `packages/shared/src/google-workspace-setup-links.test.ts`: no Google
Workspace method links the MCP servers guide, the managed method has no
requirements link, the customer method links the OAuth client guide, and
method text has no "MCP". It failed 4/4 before the fix.
- `ui/src/features/connections/OAuthConnectStateScreen.google.test.tsx`:
in the preparing, opening, and "couldn't open the sign-in window"
states, the Google Workspace screen shows "Secure sign-in", no "MCP",
and no link to `configure-mcp-servers`. A pasted server keeps "Secure
MCP sign-in". It failed 3/4 before the fix.
- `server/src/__tests__/google-workspace-rest-transport.test.ts`: the
Gmail REST audit record has no `mcpMethod`. It failed without the server
change.
- `npx vitest run` for shared app definition tests (67 passed),
`ui/src/pages/tools` and `ui/src/pages/apps/app-detail` (121 passed),
and the server REST transport file (53 passed).
- `tsc --noEmit` for `server` and `ui`: no new errors.
- `pnpm verify` exits 2 because a doc under `doc/connections` is a
global CI input. Required CI supplies the broad coverage.

## Risks

- Low risk. Text and link changes only, plus one optional audit field.
- Other curated OAuth apps now show "Secure sign-in" instead of "Secure
MCP sign-in" on the sign-in state screen. The new text is true for every
curated app.
- Audit details for all connectors show "Type: Remote HTTP" instead of
"Transport: mcp_remote".
- Saved Google Workspace connections still show
`https://workspacemcp.googleapis.com/mcp/v1` as the address in
"Connection details". It is the stored connection identity. This pull
request does not change stored data.

## Model Used

- Claude Opus 5.5 (`claude-opus-5-5`), Claude Code agent with tool use
and code execution.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DottaandClaude Opus 5.5 authored and GitHub committed 2026-11-24 12:01:21 -06:00
1 parent d01d3c40ad
commit 8b616b949d
12 files changed
+139 -13

No files matched your search

+2 -1
View File
@@ -482,7 +482,8 @@ profiles.
5. Choose the services and sign in with Google.
Google's guide:
[Configure Google Workspace MCP servers](https://developers.google.com/workspace/guides/configure-mcp-servers).
[Create an OAuth client ID](https://developers.google.com/workspace/guides/create-credentials#oauth-client-id).
The setup screen links to the same guide.
An unverified Google app shows a warning screen and has a user cap; only you
can decide whether to submit your own app for Google's verification.
@@ -16,7 +16,6 @@
"urlPatterns": [
"https://workspace.google.com/*"
],
"docsUrl": "https://developers.google.com/workspace/guides/configure-mcp-servers",
"setupPrerequisite": {
"title": "Google Developer Preview access required",
"description": "Google must register the Workspace email and the Cloud project that owns the OAuth client before these services can be used.",
@@ -111,10 +110,10 @@
"prompt": "consent"
}
},
"guidanceMd": "Enable the Google Workspace MCP APIs and register Paperclip's callback URI. Choose which permissions to grant on Google's consent screen; declined permissions disable only the corresponding actions.",
"guidanceMd": "Enable the Gmail, Drive, Docs, Sheets, Slides, and Calendar APIs in your Google Cloud project and register Paperclip's callback URI. Choose which permissions to grant on Google's consent screen; declined permissions disable only the corresponding actions.",
"consoleLinks": {
"register": "https://console.cloud.google.com/auth/clients",
"docs": "https://developers.google.com/workspace/guides/configure-mcp-servers"
"docs": "https://developers.google.com/workspace/guides/create-credentials#oauth-client-id"
},
"riskTier": "S4"
}
@@ -0,0 +1,31 @@
import { describe, expect, it } from "vitest";
import { getConnectableAppDefinition } from "./app-definitions.js";
const MCP_SERVERS_GUIDE = "configure-mcp-servers";
const OAUTH_CLIENT_GUIDE = "https://developers.google.com/workspace/guides/create-credentials#oauth-client-id";
describe("Google Workspace setup links and copy", () => {
const app = getConnectableAppDefinition("google-workspace")!;
const method = (key: string) => app.methods.find((candidate) => candidate.key === key)!;
it("never sends a user to Google's MCP servers guide", () => {
expect(JSON.stringify(app)).not.toContain(MCP_SERVERS_GUIDE);
});
it("gives the Paperclip-managed sign-in no requirements link", () => {
expect(app.docsUrl).toBeUndefined();
expect(method("paperclip-workspace").consoleLinks?.docs).toBeUndefined();
});
it("links the customer-owned client method to Google's OAuth client guide", () => {
expect(method("customer-workspace-oauth").consoleLinks?.docs).toBe(OAUTH_CLIENT_GUIDE);
});
it("does not mention MCP in user-facing method text", () => {
for (const entry of app.methods) {
for (const text of [entry.label, entry.whenToUse, entry.guidanceMd, ...(entry.warnings ?? [])]) {
expect(text ?? "").not.toMatch(/\bMCP\b/);
}
}
});
});
@@ -280,6 +280,7 @@ const support = await getEmbeddedPostgresTestSupport();
const audit = await db.select().from(toolAccessAuditEvents).where(and(eq(toolAccessAuditEvents.companyId, f.company.id), eq(toolAccessAuditEvents.action, "call_completed")));
expect(audit).toHaveLength(1);
expect(JSON.stringify(audit[0])).toContain("Google Workspace REST");
expect(JSON.stringify(audit[0])).not.toContain("mcpMethod");
expect(JSON.stringify([invocation, audit])).not.toContain("workspace-access-1");
});
+2 -1
View File
@@ -641,7 +641,7 @@ type RemoteHttpExecutionAudit = {
protocol: "MCP JSON-RPC 2.0" | "Railway GraphQL" | "Railway GraphQL + SSH" | "Google Workspace REST";
httpMethod: "POST";
endpoint: string;
mcpMethod: "tools/call";
mcpMethod?: "tools/call";
requestId: string;
upstreamToolName: string;
dispatched: true;
@@ -8419,6 +8419,7 @@ export function createToolGatewayService(
};
if (workspaceTarget?.transport === "paperclip_rest") {
execution.request.protocol = "Google Workspace REST";
delete execution.request.mcpMethod;
execution.request.endpoint = googleWorkspaceRestAuditEndpoint(workspaceTarget.service);
await assertWorkspaceGrantCurrent();
const signal = taskSignals.run ? AbortSignal.any([controller.signal, taskSignals.run]) : controller.signal;
@@ -130,7 +130,7 @@
"packages/shared/src/app-definitions/google-sheets.json": "de87b58007fca0b719d242148a838e2b5c26ddca",
"packages/shared/src/app-definitions/google-slides.json": "289366009d46be6b770eee6cd0bc650eb59a240c",
"packages/shared/src/app-definitions/google-workspace-search.json": "f3ec9d00ed0116b7cb8b9b1b71353cb8d6dc8cf4",
"packages/shared/src/app-definitions/google-workspace.json": "c3b55dc3ec502f6b86008e1e5b421748bdd50e91",
"packages/shared/src/app-definitions/google-workspace.json": "7a4acb34fb2ab5106860e910de50573070cbed2b",
"packages/shared/src/app-definitions/google.json": "f0bab0467612f915c88137eddbac0b320ac1aa2a",
"packages/shared/src/app-definitions/gsc-wizard.json": "a4ba6f183d5f35a25d0a420ade18f00d3fb64534",
"packages/shared/src/app-definitions/honcho.json": "17185eaf5189fc8c443388997c90ebf833bc9327",
@@ -272,6 +272,7 @@
"packages/shared/src/google-sign-in-deployment.ts": "2e4e4cc3c24347642e20c91186581e1dce81d740",
"packages/shared/src/google-workspace-connectors.test.ts": "26316900a50e5ab384e0dcf9c45a2bb4abc0830d",
"packages/shared/src/google-workspace-connectors.ts": "88d942d1e66d7facc68cf8645f665cdc80c8c005",
"packages/shared/src/google-workspace-setup-links.test.ts": "d86428b26e74e54ab2902d1a14c0f06f562de775",
"packages/shared/src/grok-bot.ts": "9de68f00e7926c397729ff62bf8e277f5a41c525",
"packages/shared/src/heartbeat-inbox.ts": "227dc89705c20460ca02194091cb162e11503186",
"packages/shared/src/home-paths.test.ts": "81235c17c376224e1be3abd3f034a8400f079c66",
@@ -3131,7 +3131,7 @@ export function OAuthConnectStateScreen({
return (
<div className="max-w-5xl">
<StepHeader
subtitle="Secure MCP sign-in"
subtitle={entry ? "Secure sign-in" : "Secure MCP sign-in"}
step="key"
activeIndex={steps.activeIndex}
labels={steps.labels}
@@ -0,0 +1,68 @@
// @vitest-environment jsdom
import { act } from "react";
import { createRoot, type Root } from "react-dom/client";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { getConnectableAppDefinition } from "@paperclipai/shared";
import { OAuthConnectStateScreen, type OAuthConnectPhase } from "./ConnectionSetupFlow";
vi.mock("@/api/tools", () => ({ toolsApi: {} }));
vi.mock("@/pages/apps/AppLogo", () => ({ AppLogo: () => null }));
describe("Google Workspace sign-in state screen", () => {
let root: Root;
let container: HTMLDivElement;
beforeEach(() => {
container = document.createElement("div");
document.body.append(container);
root = createRoot(container);
});
afterEach(() => {
act(() => root.unmount());
container.remove();
});
async function render(phase: OAuthConnectPhase, error?: string) {
await act(async () => {
root.render(
<OAuthConnectStateScreen
entry={getConnectableAppDefinition("google-workspace")}
phase={phase}
error={error}
onRetry={() => undefined}
onBack={() => undefined}
onCancel={() => undefined}
/>,
);
});
}
const links = () => [...container.querySelectorAll("a")].map((link) => link.getAttribute("href") ?? "");
it.each<[string, OAuthConnectPhase, string | undefined]>([
["opening the sign-in", "redirecting", undefined],
["preparing the sign-in", "starting", undefined],
["failing to open the sign-in window", "error", "Paperclip couldn’t open the sign-in window."],
])("shows no MCP wording or MCP guide link while %s", async (_label, phase, error) => {
await render(phase, error);
expect(container.textContent).toContain("Connect Google Workspace");
expect(container.textContent).toContain("Secure sign-in");
expect(container.textContent).not.toMatch(/\bMCP\b/);
expect(links().some((href) => href.includes("configure-mcp-servers"))).toBe(false);
});
it("keeps the MCP label for a server the user pasted", async () => {
await act(async () => {
root.render(
<OAuthConnectStateScreen
identity={{ name: "Example", unverifiedHost: "mcp.example.com" }}
phase="redirecting"
onRetry={() => undefined}
onBack={() => undefined}
onCancel={() => undefined}
/>,
);
});
expect(container.textContent).toContain("Secure MCP sign-in");
});
});
@@ -0,0 +1,15 @@
import { describe, expect, it } from "vitest";
import { auditTransportLabel, connectionTransportLabel } from "./connection-transport-label";
describe("connection transport labels", () => {
it("names a connection type without the raw transport value", () => {
expect(connectionTransportLabel("mcp_remote")).toBe("Remote HTTP");
expect(connectionTransportLabel("local_stdio")).toBe("Local command");
});
it("labels audit details with the same names", () => {
expect(auditTransportLabel("mcp_remote")).toBe("Remote HTTP");
expect(auditTransportLabel("local_stdio")).toBe("Local command");
expect(auditTransportLabel("other")).toBe("other");
});
});
+11
View File
@@ -0,0 +1,11 @@
import type { ToolConnection } from "@paperclipai/shared";
export function connectionTransportLabel(transport: ToolConnection["transport"]): string {
if (transport === "mcp_remote") return "Remote HTTP";
if (transport === "local_stdio") return "Local command";
return "Unknown";
}
export function auditTransportLabel(transport: string): string {
return transport === "mcp_remote" || transport === "local_stdio" ? connectionTransportLabel(transport) : transport;
}
@@ -22,6 +22,7 @@ import { useToast } from "@/context/ToastContext";
import { redactUrlSecrets } from "@/lib/redact-url-secrets";
import { useAuthorizationWindow } from "@/hooks/useAuthorizationWindow";
import { cn } from "@/lib/utils";
import { connectionTransportLabel } from "@/lib/connection-transport-label";
import { Link } from "@/lib/router";
import type { AppDetailSectionProps } from "./types";
import { RevokeGrantDialog } from "./IdentitiesSection";
@@ -628,8 +629,4 @@ export function connectionAddress(connection: ToolConnection): string {
return "Not set";
}
export function connectionTransportLabel(transport: ToolConnection["transport"]): string {
if (transport === "mcp_remote") return "Remote HTTP";
if (transport === "local_stdio") return "Local command";
return "Unknown";
}
export { connectionTransportLabel };
+2 -1
View File
@@ -27,6 +27,7 @@ import { AgentSelect } from "@/components/AgentMultiSelect";
import { ToolsPageHeader, LoadingState, RelativeTime } from "./shared";
import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
import { googleAccessRetrySummary } from "../../features/connections/googleAccessRemoval";
import { auditTransportLabel } from "@/lib/connection-transport-label";
const PAGE_SIZE = 50;
const ALL = "__all";
@@ -286,7 +287,7 @@ function ActivityRow({
<DetailFact label="Reason code" value={reasonCode} mono />
<DetailFact label="Actor type" value={event.actorType ?? "—"} />
{runId ? <DetailFact label="Run ID" value={runId} mono /> : null}
{transport ? <DetailFact label="Transport" value={transport} mono /> : null}
{transport ? <DetailFact label="Type" value={auditTransportLabel(transport)} /> : null}
{requestMethod && endpoint ? <DetailFact label="HTTP request" value={`${requestMethod} ${endpoint}`} mono /> : null}
{mcpMethod ? <DetailFact label="MCP method" value={mcpMethod} mono /> : null}
{requestId ? <DetailFact label="Request ID" value={requestId} mono /> : null}