Skip to content

[awf] mcpg-proxy: GraphQL 404 on GHE Cloud data residency hosts #4476

Description

@lpcox

Problem: On GHE Cloud with data residency (e.g., sj.ghe.com), the DIFC proxy (ghcr.io/github/gh-aw-mcpg:v0.3.19) correctly routes REST (/api/v3) but returns HTTP 404 for GraphQL (/api/graphql). The Copilot agent fails immediately on its first GraphQL call, blocking agent startup entirely.

Context: gh-aw#36209 — GHE Cloud data residency (sj.ghe.com), gh aw v0.76.1. Logs: [startup] Upstream GitHub API URL: (copilotapi.sj.ghe.com/redacted) ✓ then `HTTP 404: 404 Not Found ((localhost/redacted)

Root Cause: The DIFC/MCP gateway proxy does not map the /api/graphql path to the correct upstream for GHE data residency hosts. It resolves the upstream correctly for /api/v3 (REST) but lacks a route entry for /api/graphql, returning 404.

Proposed Solution:

  1. In the MCP gateway proxy route table, forward /api/graphql to the same upstream host used for REST, applying the same host-resolution logic as /api/v3.
  2. Validate GITHUB_GRAPHQL_URL at proxy startup and use it as the upstream target for all GraphQL requests.
  3. Add an integration test covering GHE data-residency copilot-api.*.ghe.com endpoints for both REST and GraphQL paths.

Generated by Firewall Issue Dispatcher · sonnet46 4.4M ·

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions