feat: add github-app and OIDC token auth support for custom HTTP MCP servers (fixes #23566)#23573
Closed
feat: add github-app and OIDC token auth support for custom HTTP MCP servers (fixes #23566)#23573
Conversation
…servers Agent-Logs-Url: https://github.com/github/gh-aw/sessions/76d10f38-e21d-46c3-8a2e-65cd8789ca3d Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ant parse) Agent-Logs-Url: https://github.com/github/gh-aw/sessions/76d10f38-e21d-46c3-8a2e-65cd8789ca3d Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
March 30, 2026 18:18
View session
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
Implements two complementary authentication mechanisms for any custom HTTP MCP server – previously only
tools.githubsupportedgithub-app. Closes #23566.Feature 1 —
github-appon any custom HTTP MCP serverUsers can now add a
github-appblock to any entry undermcp-servers:(ortools:):What the compiler generates:
<server>-mcp-app-token) before the agent step usingactions/create-github-app-token, with permissions derived from the job's permission block.MCP_<SERVER>_APP_TOKENand forwarded to the gateway container."Authorization": "Bearer ${MCP_<SERVER>_APP_TOKEN}"for that server.Feature 2 —
auth.type: github-oidcon any custom HTTP MCP serverBased on issue #23566:
What the compiler generates:
id-token: writeis automatically injected into the agent job's permissions (no manual frontmatter required).ACTIONS_ID_TOKEN_REQUEST_URLandACTIONS_ID_TOKEN_REQUEST_TOKENare forwarded to the gateway container so it can request fresh OIDC JWTs.authblock is included verbatim in the gateway's JSON config for that server.The gateway is responsible for acquiring/refreshing tokens (~5 min lifetime) and injecting them as
Authorization: Bearer <token>on each proxied request.Mutual exclusivity
github-appandauthare mutually exclusive on the same server. This is enforced by both the JSON schema and Go-level validation ingetMCPConfig().Changes
pkg/types/mcp.goMCPServerAuthstruct;Auth *MCPServerAuthfield onBaseMCPServerConfigpkg/parser/schemas/mcp_config_schema.jsongithub-appandauthproperties + mutual-exclusion and HTTP-only constraintspkg/parser/schemas/main_workflow_schema.jsongithub-appandauthadded tohttp_mcp_tooldefinitionpkg/workflow/mcp_config_custom.goauth/github-appfrom raw config; auto-inject Authorization header; renderauthin gateway JSONpkg/workflow/mcp_config_validation.gogithub-appandauthas known tool fieldspkg/workflow/compiler_custom_mcp_steps.go(new)hasCustomMCPServerOIDCAuthhelperpkg/workflow/compiler_yaml_main_job.gopkg/workflow/mcp_environment.gopkg/workflow/tools.goid-token: writewhen OIDC auth is detectedpkg/workflow/schemas/mcp-gateway-config.schema.jsonauthblock added tohttpServerConfigpkg/workflow/custom_mcp_auth_test.go(new)