Update GitHub MCP compiler to use HTTP transport by default#631
Closed
Update GitHub MCP compiler to use HTTP transport by default#631
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…Docker as appropriate Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] - update compiler to use the http transport and github remote MCP by default for the github tool
- use command "mcp-inspect" to test implementation
Update GitHub MCP compiler to use HTTP transport by default
Sep 10, 2025
Collaborator
|
github fails to connect https://github.com/githubnext/gh-aw/actions/runs/17620307248/job/50064089372 |
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.
This PR updates the GitHub MCP (Model Context Protocol) configuration in the workflow compiler to use HTTP transport instead of Docker by default, while maintaining backward compatibility for engines that don't support HTTP transport.
Problem
The GitHub MCP server was previously configured to use Docker transport for all engines. This required local Docker containers to be spun up for GitHub API interactions, which adds overhead and complexity compared to direct HTTP communication with a remote GitHub MCP server.
Solution
Updated the Claude engine to use HTTP transport by default when configuring GitHub MCP, while preserving Docker transport for engines that don't support HTTP (Codex and Custom engines).
Key Changes
Claude Engine (HTTP Transport):
https://api.github.com/mcpAuthorization: Bearer ${{ secrets.GITHUB_TOKEN }}"http"with proper headersCodex/Custom Engines (Docker Transport - Unchanged):
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server:sha-09deac4GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}Architecture
The implementation uses engine-specific rendering while maintaining parser backward compatibility:
mcp-inspectExamples
Before (Docker for all engines):
{ "mcpServers": { "github": { "command": "docker", "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server:sha-09deac4"], "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "${{ secrets.GITHUB_TOKEN }}"} } } }After (HTTP for Claude):
{ "mcpServers": { "github": { "type": "http", "url": "https://api.github.com/mcp", "headers": { "Authorization": "Bearer ${{ secrets.GITHUB_TOKEN }}", "Content-Type": "application/json" } } } }Testing
mcp-inspectcommand continues working as expected (uses parser configuration)Backward Compatibility
This change is fully backward compatible:
mcp-inspectand other tooling work correctlyThe HTTP transport provides better performance and simpler configuration for Claude engine users, while preserving existing functionality for all other use cases.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.contoso.com/tmp/go-build2745103103/b278/cli.test -test.testlogfile=/tmp/go-build2745103103/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true(dns block)/tmp/go-build1033415633/b278/cli.test -test.testlogfile=/tmp/go-build1033415633/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true(dns block)/tmp/go-build1587057316/b278/cli.test -test.testlogfile=/tmp/go-build1587057316/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.