Repository navigation
Conversation
…unts The Terminal49 resolve endpoint now refuses a WorkOS MCP grant with 403 and a fixed code when the account is billing-restricted (billing_access_restricted) or has not finished onboarding (account_onboarding_incomplete), instead of issuing a token every tool call would get 401 for (MCP-SERVER-G). The gateway maps those known codes to fixed, actionable messages and returns the code; unknown codes keep the generic 403 text, so upstream text never reaches the client. The refusal code is logged with the request. Resolver refusals are not reported to Sentry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8cPhjxmTweWGCzzfxM9ys
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Shadow risk calibration
Calibration result: agreement. Shadow risk never blocks or enables merge. Keep it in observation mode until roughly 50 pull requests have human-reviewed labels, then calibrate before considering any policy use. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the gateway half of the MCP-SERVER-G fix.
The backend (Terminal49/t49,
fix(tnt-api): refuse MCP resolve…) now refuses/v2/connected-clients/resolvewith a 403 and a fixedcodefor two kinds of account:Before this, resolve issued a token that every tool call then failed with a 401.
What changes in the gateway:
api/mcp.ts:RESOLVE_REFUSAL_MESSAGESmaps each known code to a fixed, plain message:{error: 'Forbidden', code, message}.refusal_codeis logged. Resolve refusals are still not reported to Sentry.Testing
packages/mcp/tests/api-handler.test.ts: 34/34 pass, including one test per known code and one confirming that an unknown code stays generic.npm run agent-verifypasses every step (Node 24).Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.