We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53c4003 commit 801b048Copy full SHA for 801b048
mcpgateway/wrapper.py
@@ -92,7 +92,12 @@ def _extract_base_url(url: str) -> str:
92
parsed = urlparse(url)
93
if not parsed.scheme or not parsed.netloc:
94
raise ValueError(f"Invalid URL provided: {url}")
95
- return f"{parsed.scheme}://{parsed.netloc}"
+
96
+ if "/servers/" in url:
97
+ before_servers = parsed.path.split('/servers')[0]
98
+ return f"{parsed.scheme}://{parsed.netloc}{before_servers}"
99
100
+ return f"{url}"
101
102
103
BASE_URL: str = _extract_base_url(SERVER_CATALOG_URLS[0]) if SERVER_CATALOG_URLS else ""
0 commit comments