Skip to content

Update Codex remote GitHub MCP configuration to new streamable HTTP format#1509

Merged
pelikhan merged 12 commits intomainfrom
copilot/review-mcp-configuration
Oct 11, 2025
Merged

Update Codex remote GitHub MCP configuration to new streamable HTTP format#1509
pelikhan merged 12 commits intomainfrom
copilot/review-mcp-configuration

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 11, 2025

Problem

The Codex engine's remote GitHub MCP server configuration was using an outdated format that doesn't align with the new streamable HTTP requirements specified in OpenAI Codex documentation (@openai/codex/files/docs/config.md).

Solution

Updated the remote GitHub MCP configuration to use the new streamable HTTP format with the following changes:

Configuration Format Changes

Old format:

[mcp_servers.github]
type = "http"
url = "https://api.githubcopilot.com/mcp/"
headers = { "Authorization" = "Bearer ${{ secrets.GITHUB_MCP_TOKEN }}" }

New format:

# Streamable HTTP requires the experimental rmcp client
experimental_use_rmcp_client = true

[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp/"
bearer_token_env_var = "GITHUB_MCP_TOKEN"

New format (read-only mode):

# Streamable HTTP requires the experimental rmcp client
experimental_use_rmcp_client = true

[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp-readonly/"
bearer_token_env_var = "GITHUB_MCP_TOKEN"

Key Changes

  1. Top-level experimental flag: Added experimental_use_rmcp_client = true at the root configuration level when GitHub tool is in remote mode
  2. Removed deprecated field: Removed type = "http" which is no longer needed with the rmcp client
  3. Authentication method: Changed from inline headers with Bearer token to bearer_token_env_var referencing an environment variable
  4. Read-only mode: Uses dedicated readonly endpoint https://api.githubcopilot.com/mcp-readonly/ instead of X-MCP-Readonly header
  5. Environment variable: Added GITHUB_MCP_TOKEN to the workflow execution step environment variables
  6. dev.md workflow: Updated .github/workflows/dev.md to use the new remote GitHub MCP configuration by adding tools.github.mode: remote, changed trigger to workflow_dispatch, and updated task to write poetry

Backward Compatibility

  • ✅ Local mode (Docker-based) configurations remain unchanged
  • ✅ Only remote mode configurations are affected
  • ✅ Claude and Copilot engines maintain their existing configuration formats
  • ✅ All existing tests pass with updated expectations

Testing

  • Updated github_remote_mode_test.go to verify the new configuration format
  • Added checks to ensure the experimental flag is only present in remote mode
  • Verified both standard and read-only remote mode configurations
  • Confirmed local mode does not include the experimental flag
  • Verified read-only mode uses /mcp-readonly/ endpoint instead of headers
  • Verified dev.md workflow compiles successfully with the new remote configuration

Fixes requirements specified in issue referencing @openai/codex/files/docs/config.md.

Original prompt

Review the codex mcp remote github mcp configuration and make sure it follows the new configuration like this one:

# Streamable HTTP requires the experimental rmcp client
experimental_use_rmcp_client = true
[mcp_servers.figma]
url = "https://mcp.linear.app/mcp"
# Optional environment variable containing a bearer token to use for auth
bearer_token_env_var = "<env var name>"

@openai/codex/files/docs/config.md


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits October 11, 2025 00:52
…ormat

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ormat

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review codex mcp remote configuration for updates Update Codex remote GitHub MCP configuration to new streamable HTTP format Oct 11, 2025
Copilot AI requested a review from pelikhan October 11, 2025 00:58
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan October 11, 2025 01:14
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot update dev.md to use codex and remote GitHub

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Oct 11, 2025

@copilot update dev.md to use codex and remote GitHub

Updated dev.md to use Codex engine with remote GitHub MCP. Added tools.github.mode: remote configuration which now generates the new streamable HTTP format with experimental_use_rmcp_client = true, bearer_token_env_var = "GITHUB_MCP_TOKEN", and the remote endpoint URL.

@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot update dev.md to trigger on dispatch and write a poem about the current text

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Oct 11, 2025

@copilot update dev.md to trigger on dispatch and write a poem about the current text

Updated dev.md to trigger on workflow_dispatch (manual trigger) and changed the task to write creative poetry about the current text. The workflow still uses Codex with remote GitHub MCP in the new streamable HTTP format.

pelikhan and others added 5 commits October 11, 2025 04:05
…tainers (#1513)

* Initial plan

* Fix GITHUB_TOOLSETS to pass through environment variable in Docker args for all engines

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review October 11, 2025 04:31
@github-actions
Copy link
Copy Markdown
Contributor

Agentic Changeset Generator triggered by this pull request

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@pelikhan pelikhan merged commit b3dbf18 into main Oct 11, 2025
8 checks passed
@pelikhan pelikhan deleted the copilot/review-mcp-configuration branch October 11, 2025 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants