Implement streamable-http protocol support for awmg CLI#7427
Merged
Conversation
- Add StreamableClientTransport usage for URL-based MCP servers - Replace "HTTP transport not yet supported" with actual implementation - Update documentation to reflect new transport support Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add streamable-http protocol support to awmg CLI
Implement streamable-http protocol support for awmg CLI
Dec 23, 2025
pelikhan
approved these changes
Dec 23, 2025
pelikhan
reviewed
Dec 23, 2025
| @@ -504,10 +504,37 @@ func (g *MCPGatewayServer) createMCPSession(serverName string, config MCPServerC | |||
|
|
|||
| // Handle different server types | |||
| if config.URL != "" { | |||
Contributor
Author
There was a problem hiding this comment.
Moved the gateway code to pkg/awmg package in commit 7a7d8d7. The package now contains:
gateway.go- main gateway implementation with streamable HTTP supportgateway_test.go- unit testsgateway_rewrite_test.go- config rewrite testsgateway_integration_test.go- integration testsgateway_inspect_integration_test.go- inspect integration tests
Updated cmd/awmg/main.go to import from github.com/githubnext/gh-aw/pkg/awmg.
Contributor
|
@copilot add integration test using MCP inspect or go-MCP sdk |
- Create new pkg/awmg package for gateway functionality - Move gateway command, config types, and tests to pkg/awmg - Update cmd/awmg/main.go to use the new package - Add SetVersionInfo and GetVersion to awmg package Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Add TestStreamableHTTPTransport_GoSDKClient: Tests connecting to a mock MCP server using StreamableClientTransport and verifying tool listing - Add TestStreamableHTTPTransport_URLConfigured: Verifies createMCPSession uses StreamableClientTransport for URL-configured servers - Add TestStreamableHTTPTransport_MCPInspect: Tests mcp inspect command with HTTP-based MCP server configuration - Add TestStreamableHTTPTransport_GatewayConnection: Tests end-to-end gateway connection with MCP endpoint via HTTP POST Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Added integration tests for streamable HTTP transport in commit 35fd734:
All tests are in |
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.
createMCPSessionfunction to usemcp.StreamableClientTransportfor URL-based serversSummary
This PR implements streamable-http protocol support for the awmg (mcp-gateway) CLI using the go MCP SDK's
StreamableClientTransport. Previously, the gateway returned an error for HTTP/URL-based servers. Now, it properly connects using the streamable HTTP transport which supports:Additionally, the gateway code has been moved to a dedicated
pkg/awmgpackage for better organization.New Integration Tests
Added integration tests for the streamable HTTP transport in
pkg/awmg/gateway_streamable_http_test.go:TestStreamableHTTPTransport_GoSDKClient: Tests the go-sdkStreamableClientTransportwith a mock MCP server and verifies tool listingTestStreamableHTTPTransport_URLConfigured: VerifiescreateMCPSessionusesStreamableClientTransportfor URL-configured serversTestStreamableHTTPTransport_MCPInspect: Testsmcp inspectcommand with HTTP-based MCP configurationTestStreamableHTTPTransport_GatewayConnection: End-to-end test of gateway connection via HTTP POSTOriginal prompt
💡 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.