Skip to content

Commit fe83edb

Browse files
Copilotpelikhan
andcommitted
Remove container requirement and gh CLI dependency from MCP gateway
- Remove container field requirement from MCPGatewayConfig schema - Remove container field check in generateMCPGatewaySteps - Remove gh extension check from gateway installation logic - Replace gh CLI commands with curl for downloading awmg binary - Update workflows (dev.md, smoke-copilot.md) to not specify container - Update all tests to not expect/require container field - Update documentation to remove container references - Gateway now works as pure standalone CLI without Docker or gh CLI This addresses the issue that the container ghcr.io/githubnext/mcp-gateway does not exist, and ensures awmg is a simple Go CLI without gh extension dependencies as requested. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent 1ad37ba commit fe83edb

12 files changed

Lines changed: 31 additions & 95 deletions

File tree

.github/workflows/dev.lock.yml

Lines changed: 4 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/dev.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ permissions:
1313

1414
sandbox:
1515
mcp:
16-
container: ghcr.io/githubnext/mcp-gateway
1716
port: 8080
1817

1918
tools:

.github/workflows/smoke-copilot.lock.yml

Lines changed: 4 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/smoke-copilot.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ network:
2222
sandbox:
2323
agent: awf # Firewall enabled
2424
mcp:
25-
container: ghcr.io/githubnext/mcp-gateway
2625
port: 8080
2726
tools:
2827
cache-memory: true

docs/awmg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ The awmg binary is designed to work seamlessly with GitHub Agentic Workflows. Wh
127127
---
128128
sandbox:
129129
mcp:
130-
container: ghcr.io/githubnext/mcp-gateway
130+
# MCP gateway runs as standalone awmg CLI
131131
port: 8080
132132
---
133133
```

docs/src/content/docs/reference/sandbox.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ features:
6464
6565
sandbox:
6666
mcp:
67-
container: "ghcr.io/your-org/mcp-gateway"
6867
port: 8080
6968
api-key: "${{ secrets.MCP_GATEWAY_API_KEY }}"
7069
```
@@ -80,7 +79,6 @@ features:
8079
sandbox:
8180
agent: awf
8281
mcp:
83-
container: "ghcr.io/your-org/mcp-gateway"
8482
port: 8080
8583
```
8684

@@ -252,7 +250,7 @@ features:
252250
253251
sandbox:
254252
mcp:
255-
container: "ghcr.io/githubnext/mcp-gateway"
253+
# MCP gateway runs as standalone awmg CLI
256254
version: "v1.0.0"
257255
port: 9000
258256
api-key: "${{ secrets.MCP_GATEWAY_API_KEY }}"

pkg/cli/mcp_gateway_inspect_integration_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ permissions:
4545
engine: copilot
4646
sandbox:
4747
mcp:
48-
container: ghcr.io/githubnext/mcp-gateway
4948
port: 8089
5049
tools:
5150
playwright:

pkg/parser/schemas/main_workflow_schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,6 @@
20232023
"description": "API key for authenticating with the MCP gateway (supports ${{ secrets.* }} syntax)"
20242024
}
20252025
},
2026-
"required": ["container"],
20272026
"additionalProperties": false
20282027
}
20292028
},

pkg/workflow/gateway.go

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ func generateMCPGatewaySteps(workflowData *WorkflowData, mcpServersConfig map[st
6363
}
6464

6565
config := getMCPGatewayConfig(workflowData)
66-
if config == nil || config.Container == "" {
66+
if config == nil {
6767
return nil
6868
}
6969

70-
gatewayLog.Printf("Generating MCP gateway steps for container: %s", config.Container)
70+
gatewayLog.Print("Generating MCP gateway steps")
7171

7272
var steps []GitHubActionStep
7373

@@ -121,18 +121,9 @@ func generateMCPGatewayStartStep(config *MCPGatewayConfig, mcpServersConfig map[
121121
" if [ -f \"./awmg\" ]; then",
122122
" echo 'Using local awmg build'",
123123
" AWMG_CMD=\"./awmg\"",
124-
" # Check if gh-aw extension is installed (has awmg)",
125-
" elif gh extension list 2>/dev/null | grep -q 'githubnext/gh-aw' && [ -f \"$HOME/.local/share/gh/extensions/gh-aw/awmg\" ]; then",
126-
" echo 'Using awmg from gh-aw extension'",
127-
" AWMG_CMD=\"$HOME/.local/share/gh/extensions/gh-aw/awmg\"",
128124
" else",
129125
" # Download awmg from releases",
130126
" echo 'Downloading awmg from GitHub releases...'",
131-
" AWMG_VERSION=$(gh release list --repo githubnext/gh-aw --limit 1 | grep -v draft | grep -v prerelease | head -n 1 | awk '{print $1}')",
132-
" if [ -z \"$AWMG_VERSION\" ]; then",
133-
" echo 'No release version found, using latest'",
134-
" AWMG_VERSION='latest'",
135-
" fi",
136127
" ",
137128
" # Detect platform",
138129
" OS=$(uname -s | tr '[:upper:]' '[:lower:]')",
@@ -143,14 +134,10 @@ func generateMCPGatewayStartStep(config *MCPGatewayConfig, mcpServersConfig map[
143134
" AWMG_BINARY=\"awmg-${OS}-${ARCH}\"",
144135
" if [ \"$OS\" = \"windows\" ]; then AWMG_BINARY=\"${AWMG_BINARY}.exe\"; fi",
145136
" ",
146-
" # Download from releases",
147-
" if [ \"$AWMG_VERSION\" = \"latest\" ]; then",
148-
" gh release download --repo githubnext/gh-aw --pattern \"$AWMG_BINARY\" --dir /tmp || true",
149-
" else",
150-
" gh release download \"$AWMG_VERSION\" --repo githubnext/gh-aw --pattern \"$AWMG_BINARY\" --dir /tmp || true",
151-
" fi",
152-
" ",
153-
" if [ -f \"/tmp/$AWMG_BINARY\" ]; then",
137+
" # Download from releases using curl (no gh CLI dependency)",
138+
" RELEASE_URL=\"https://github.com/githubnext/gh-aw/releases/latest/download/$AWMG_BINARY\"",
139+
" echo \"Downloading from $RELEASE_URL\"",
140+
" if curl -L -f -o \"/tmp/$AWMG_BINARY\" \"$RELEASE_URL\"; then",
154141
" chmod +x \"/tmp/$AWMG_BINARY\"",
155142
" AWMG_CMD=\"/tmp/$AWMG_BINARY\"",
156143
" echo 'Downloaded awmg successfully'",

pkg/workflow/gateway_test.go

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,17 @@ func TestParseMCPGatewayTool(t *testing.T) {
2525
expected: nil,
2626
},
2727
{
28-
name: "minimal config with container only",
28+
name: "minimal config with port only",
2929
input: map[string]any{
30-
"container": "ghcr.io/githubnext/mcp-gateway",
30+
"port": 8080,
3131
},
3232
expected: &MCPGatewayConfig{
33-
Container: "ghcr.io/githubnext/mcp-gateway",
34-
Port: DefaultMCPGatewayPort,
33+
Port: 8080,
3534
},
3635
},
3736
{
3837
name: "full config",
3938
input: map[string]any{
40-
"container": "ghcr.io/githubnext/mcp-gateway",
41-
"version": "v1.0.0",
4239
"port": 8888,
4340
"api-key": "${{ secrets.API_KEY }}",
4441
"args": []any{"-v", "--debug"},
@@ -48,8 +45,6 @@ func TestParseMCPGatewayTool(t *testing.T) {
4845
},
4946
},
5047
expected: &MCPGatewayConfig{
51-
Container: "ghcr.io/githubnext/mcp-gateway",
52-
Version: "v1.0.0",
5348
Port: 8888,
5449
APIKey: "${{ secrets.API_KEY }}",
5550
Args: []string{"-v", "--debug"},
@@ -58,26 +53,19 @@ func TestParseMCPGatewayTool(t *testing.T) {
5853
},
5954
},
6055
{
61-
name: "numeric version",
62-
input: map[string]any{
63-
"container": "ghcr.io/githubnext/mcp-gateway",
64-
"version": 1.0,
65-
},
56+
name: "empty config",
57+
input: map[string]any{},
6658
expected: &MCPGatewayConfig{
67-
Container: "ghcr.io/githubnext/mcp-gateway",
68-
Version: "1",
69-
Port: DefaultMCPGatewayPort,
59+
Port: DefaultMCPGatewayPort,
7060
},
7161
},
7262
{
7363
name: "float port",
7464
input: map[string]any{
75-
"container": "ghcr.io/githubnext/mcp-gateway",
76-
"port": 8888.0,
65+
"port": 8888.0,
7766
},
7867
expected: &MCPGatewayConfig{
79-
Container: "ghcr.io/githubnext/mcp-gateway",
80-
Port: 8888,
68+
Port: 8888,
8169
},
8270
},
8371
}
@@ -133,19 +121,17 @@ func TestIsMCPGatewayEnabled(t *testing.T) {
133121
data: &WorkflowData{
134122
SandboxConfig: &SandboxConfig{
135123
MCP: &MCPGatewayConfig{
136-
Container: "test",
124+
Port: 8080,
137125
},
138126
},
139127
},
140128
expected: true,
141129
},
142130
{
143-
name: "sandbox.mcp configured",
131+
name: "sandbox.mcp with empty config",
144132
data: &WorkflowData{
145133
SandboxConfig: &SandboxConfig{
146-
MCP: &MCPGatewayConfig{
147-
Container: "test",
148-
},
134+
MCP: &MCPGatewayConfig{},
149135
},
150136
},
151137
expected: true,
@@ -185,8 +171,7 @@ func TestGetMCPGatewayConfig(t *testing.T) {
185171
data: &WorkflowData{
186172
SandboxConfig: &SandboxConfig{
187173
MCP: &MCPGatewayConfig{
188-
Container: "test-image",
189-
Port: 9090,
174+
Port: 9090,
190175
},
191176
},
192177
},
@@ -199,7 +184,6 @@ func TestGetMCPGatewayConfig(t *testing.T) {
199184
result := getMCPGatewayConfig(tt.data)
200185
if tt.hasConfig {
201186
require.NotNil(t, result)
202-
assert.Equal(t, "test-image", result.Container)
203187
assert.Equal(t, 9090, result.Port)
204188
} else {
205189
assert.Nil(t, result)
@@ -226,8 +210,7 @@ func TestGenerateMCPGatewaySteps(t *testing.T) {
226210
data: &WorkflowData{
227211
SandboxConfig: &SandboxConfig{
228212
MCP: &MCPGatewayConfig{
229-
Container: "test-gateway",
230-
Port: 8080,
213+
Port: 8080,
231214
},
232215
},
233216
Features: map[string]bool{
@@ -251,8 +234,7 @@ func TestGenerateMCPGatewaySteps(t *testing.T) {
251234

252235
func TestGenerateMCPGatewayStartStep(t *testing.T) {
253236
config := &MCPGatewayConfig{
254-
Container: "ghcr.io/githubnext/mcp-gateway",
255-
Port: 8080,
237+
Port: 8080,
256238
}
257239
mcpServers := map[string]any{
258240
"github": map[string]any{},

0 commit comments

Comments
 (0)