Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

feat(integrations): show Mintlify redirect-URL setup note on the connect card

merged#2511CedarCopilot

CedarCopilot wants to merge 0 commits into staging from feat/mcp-oauth-redirect-uri-note

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Aug 16, 2026, 1:17 PM
  2. Merged
    Aug 16, 2026, 1:48 PM
  3. Live on prod
    Aug 16, 2026, 1:48 PM
  4. Observed 2 days
    Aug 16, 2026, 1:48 PM
  5. Pipelines steady after this deploy
    Aug 16, 2026, 1:48 PM
  6. Unobserved

    Live on prod, no production signal yet

    Aug 19, 2026, 1:49 AM

Behaviors Libra is checking

When Mintlify is not connected, its integration card tells an administrator to allowlist Cedar’s exact OAuth callback URL in the relevant Mintlify MCP settings before connecting.Inconclusivelow confidence

OTEL fallback found no prod spans matching OAuthMcpIntegrationCard (Mintlify connect card) since deploy.

prod, checked Aug 19, 2026, 1:41 AM
Administrators can copy the displayed Mintlify OAuth redirect URL from the connect card, with visible copy confirmation or an error toast if clipboard access fails.Inconclusivelow confidence

OTEL fallback found no prod spans matching OAuthMcpIntegrationCard (Mintlify connect card) since deploy.

prod, checked Aug 19, 2026, 1:48 AM
Administrators can open the Mintlify dashboard directly from the pre-connect setup note to configure the required redirect allowlist.Inconclusivelow confidence

OTEL fallback found no prod spans matching OAuthMcpIntegrationCard (Mintlify connect card) since deploy.

prod, checked Aug 19, 2026, 1:49 AM

Libra has verdicts on 0 of 3 tracked behaviors on prod; 3 are still being checked. Libra checks hourly for 3 days after each deploy.

Why

Connecting Mintlify fails with an opaque "Redirect URI not allowed" unless an admin first allowlists Cedar's callback URL under MCP settings for each docs deployment in the Mintlify dashboard. Mintlify enforces this per-deployment allowlist even though it uses DCR (unlike Notion). Nothing in the connect UI told users this, so it looked broken.

What

  • Add an optional redirectAllowlist to the OAuthMcpProvider config.
  • When set, the card shows a pre-connect note (above the Connect button) with:
    • the exact redirect URL for the current environment (${getRuntimeBackendUrl()}/oauth/<provider>/callback) + a copy button,
    • where to add it, and a link to the provider dashboard.
  • Enabled for Mintlify only; Notion/Pylon unaffected.

Because the URL is derived from the runtime backend URL, it renders correctly on staging (api.mail-staging…) and prod without hardcoding.

Note preview (Mintlify, not-yet-connected)

ⓘ Before connecting, an admin must add this redirect URL in your Mintlify dashboard → MCP settings, for each docs deployment you want to connect. Otherwise Mintlify rejects the connection with "Redirect URI not allowed." https://api.mail-staging.cedarcopilot.com/oauth/mintlify/callback [copy] Open Mintlify settings ↗

Typecheck clean (@zero/mail, 0 errors).

🤖 Generated with Claude Code

Greptile Summary

Adds optional provider redirect-allowlist guidance to OAuth MCP integration cards and enables it for Mintlify.

  • Derives and displays the environment-specific OAuth callback URL before connection.
  • Adds clipboard-copy feedback and a link to the Mintlify dashboard.
  • Leaves providers without redirect-allowlist configuration unchanged.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking usability issue in the manual-copy fallback.

The generated Mintlify callback URL matches the configured production and staging backend routes, but users whose clipboard request fails may be told to copy a URL whose full value is hidden by truncation.

Files Needing Attention: apps/mail/modules/integrations/oauth-mcp-integration-card.tsx

Important Files Changed

FilenameOverview
apps/mail/modules/integrations/oauth-mcp-integration-card.tsxAdds Mintlify’s pre-connect allowlist notice; the clipboard failure fallback is weakened by truncating the only displayed URL.
Prompt To Fix All With AI
### Issue 1
apps/mail/modules/integrations/oauth-mcp-integration-card.tsx:203
**Truncated manual-copy fallback**

When the Clipboard API rejects the copy request, the toast directs the user to copy the redirect URI manually, but `truncate` hides part of the only rendered value on narrow cards. This makes the exact Mintlify allowlist URL difficult to recover precisely when the fallback is needed.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(integrations): show redirect-URL se..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Show production surfaces and changed-file mapping

Production surfaces

Libra has not measured any production surfaces for this change yet.

Changed files → surfaces

  • apps/mail/modules/integrations/oauth-mcp-integration-card.tsxno production surface mapped