Skip to content

Conversation

@amirejaz
Copy link
Contributor

Fix remote path handling in GenerateMCPServerURL

This PR updates GenerateMCPServerURL to handle remote paths correctly:

  • Use remote URL path as-is (/ normalized to empty).
  • Append #<containerName> only for SSE/STDIO.
  • No fragment for StreamableHTTP.
  • Local constants (/sse, mcp) unchanged.

Examples

SSE / STDIO

  • http://example.comhttp://localhost:12345#test-container
  • http://example.com/foohttp://localhost:12345/foo#test-container

StreamableHTTP

  • http://example.comhttp://localhost:12345
  • http://example.com/mcphttp://localhost:12345/mcp

This makes remote path handling consistent, avoids injecting local defaults into remote configurations, and ensures correct fragment usage for SSE/STDIO.

@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 42.17%. Comparing base (85875a3) to head (7dd31dc).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
pkg/transport/url.go 95.65% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1810      +/-   ##
==========================================
+ Coverage   42.08%   42.17%   +0.08%     
==========================================
  Files         184      184              
  Lines       21649    21662      +13     
==========================================
+ Hits         9112     9136      +24     
+ Misses      11843    11836       -7     
+ Partials      694      690       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 39.15% (+0.05%) from 39.1%
when pulling 7dd31dc on fix/mcpserver-remote-path
into 85875a3 on main.

@amirejaz amirejaz merged commit 70db18f into main Sep 10, 2025
19 checks passed
@amirejaz amirejaz deleted the fix/mcpserver-remote-path branch September 10, 2025 09:35
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.

4 participants