Repository navigation
[AGE-2723] x-tfg-mcp-headers: pass MCP credentials and skip consent #1313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
6d85393
feat: x-tfg-mcp-headers to pass MCP credentials and skip consent, wit…
rutvij-menavlikar c09705e
Merge remote-tracking branch 'origin/main' into rutvij/age-2723_1
cursoragent b6007af
feat: use gateway 401 authorization_urls for MCP auth_required; drop …
cursoragent cf1d6c5
refactor: trim MCP auth changes and shorten comments (AGE-2723)
cursoragent a15ecff
chore: merge changesets into one (AGE-2723)
cursoragent e57439b
fix: accept only http(s) consent URLs from MCP 401 bodies (AGE-2723)
cursoragent 014c4bc
feat: accept nested x-tfg-mcp-headers entries for virtual MCPs (AGE-2…
cursoragent 0550d0e
chore: keep x-tfg-mcp-headers error message and shorten changeset (AG…
cursoragent 8ca71f6
Merge branch 'main' into rutvij/age-2723_1
rutvij-menavlikar 76eb522
feat: forward nested x-tfg-mcp-headers entries in open-source mode to…
cursoragent d16ae4a
Merge remote-tracking branch 'origin/rutvij/age-2723_1' into rutvij/a…
cursoragent d5efb54
chore: keep original doc wording for moved MCP header helpers (AGE-2723)
cursoragent 0027e08
feat: send nested x-tfg-mcp-headers entries as plain headers in open-…
cursoragent 11b1046
fix: reject managed MCP transport headers in x-tfg-mcp-headers (AGE-2…
cursoragent 550abe6
Merge branch 'main' into rutvij/age-2723_1
rutvij-menavlikar 59979c3
fix: keep onUnauthorized fallback when stamping session header (AGE-2…
rutvij-menavlikar 64fd20f
fix: cap 401 SSE bodies and drop the rejected MCP session on consent …
cursoragent 5f8755e
refactor: move per-server MCP headers out of src/mcp and keep TrueFou…
cursoragent 408c61d
refactor: move TrueFoundry gateway 401 parsing into truefoundry/ (AGE…
cursoragent 3aa59d9
Revert "refactor: move TrueFoundry gateway 401 parsing into truefound…
cursoragent f7199c7
Revert "refactor: move per-server MCP headers out of src/mcp and keep…
cursoragent a7c46dd
refactor: move per-server MCP headers to src/runtime and split TrueFo…
cursoragent 39ed31a
refactor: accept virtual MCP header entries only in TrueFoundry mode …
cursoragent 3206498
refactor: drop the onUnauthorized fallback; a 401 either carries cons…
cursoragent 9aae945
chore: list managed MCP headers in the x-tfg-mcp-headers error (AGE-2…
cursoragent 82ce524
refactor: on a 401, offer the server's own consent flow instead of pa…
cursoragent f18ecbb
refactor: keep open-source 401s a hard failure for caller headers too…
cursoragent 6b8873c
fix: keep the upstream 401 when the consent lookup fails (AGE-2723)
cursoragent 53605f0
refactor: restore up-front MCP authorize; consent on 401 only for cal…
cursoragent 6d2e944
refactor: keep main's TrueFoundry authorize path verbatim; caller-cre…
cursoragent 7578551
refactor: caller-credential 401s fail like any other 401; drop the co…
cursoragent e1acaff
feat: final 401 handling for x-tfg-mcp-headers per agreed spec (AGE-2…
cursoragent e36c89c
fix: start DCR consent on a 401 without deleting the stored token (AG…
cursoragent 43d9a6d
Revert "fix: start DCR consent on a 401 without deleting the stored t…
cursoragent 581baea
fix: keep the 401 consent hook when stamping the session header (AGE-…
rutvij-menavlikar 75a6713
fix: start DCR consent on a 401 without deleting the stored token (AG…
cursoragent e4449a4
Merge branch 'main' into rutvij/age-2723_1
rutvij-menavlikar 413960a
Minor fixes pointed by cursor review
chiragjn f52d1b5
refactor: rename per-server override headers and tidy 401 consent han…
cursoragent 20679e0
Merge branch 'main' into rutvij/age-2723_1
rutvij-menavlikar 9695d62
test: drop redundant x-tfg-mcp-headers tests (AGE-2723)
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@truefoundry/trueforge-core': patch | ||
| '@truefoundry/trueforge': patch | ||
| --- | ||
|
|
||
| `x-tfg-mcp-headers` passes per-MCP-server headers. Open-source mode merges a server's entry over its registered headers, and an entry `Authorization` skips DCR. TrueFoundry mode sends the entry (flat, or a nested virtual MCP map) as `x-tfy-mcp-headers` and no longer calls authorize before connecting. On a 401: open-source fails when the entry carried `Authorization`, otherwise a DCR server restarts consent; TrueFoundry fails whenever the server had an entry, otherwise asks authorize for a consent URL and fails with 422 when authorize returns none or reports no consent is needed. |
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.