Repository navigation
chore: live SFY auth status on single-server GET and mid-turn authorize - #668
Conversation
🦋 Changeset detectedLatest commit: 0b0ca27 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0b0ca27. Configure here.
| tenant_id: record.tenant_id, | ||
| name: record.name, | ||
| userRef, | ||
| }); |
There was a problem hiding this comment.
Invoke requires OAuth public URL
Medium Severity
resolveInvokeHeaders now always calls authorize before returning gateway headers. authorize always builds a redirect URL via resolveAuthorizeRedirectURL, which fails with a 500 if PUBLIC_BASE_URL is empty. No-auth and header MCP invokes previously skipped this path, so a TrueFoundry deploy without PUBLIC_BASE_URL can now fail every mid-turn tool call, not just OAuth.
Reviewed by Cursor Bugbot for commit 0b0ca27. Configure here.


Summary
Closes #
Changes
How was this tested?
Checklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Medium Risk
Changes MCP authentication timing and status for header/env and other non-DCR modes, which can alter UI and turn behavior for servers that previously skipped live SFY checks.
Overview
TrueFoundry MCP auth is no longer limited to DCR/oauth-style servers: single-server responses (e.g. GET by name) call SFY
getMcpAuthStatusfor the one record, while multi-server list responses still use manifest-derived stub status to avoid N upstream calls.Mid-turn tool invoke always runs SFY
authorizebefore attaching gateway Bearer headers. Servers that need user action returnauthRequiredwith the consent URL; missing URLs still fail with 422. Per-server header overrides and Bearer stripping are unchanged.Unit tests cover live status for non-DCR records and authorize gating on invoke;
perServerMcpHeadersmocks now stubgetMcpAuthorizeso every invoke path succeeds auth.Reviewed by Cursor Bugbot for commit 0b0ca27. Bugbot is set up for automated code reviews on this repo. Configure here.