Skip to content

Commit 88b554b

Browse files
fix: automated fix for #171 via Codex (#173)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 872c6d3 commit 88b554b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/mcpm/clients/base.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,9 @@ def activate_profile(self, profile_name: str, router_config: Dict[str, Any], ali
418418
"""
419419
host = router_config["host"]
420420
port = router_config["port"]
421-
default_base_url = f"http://{host}:{port}/sse"
421+
422+
# Use streamable HTTP endpoint instead of the deprecated SSE one.
423+
default_base_url = f"http://{host}:{port}/mcp/"
422424

423425
server_config = self._format_router_server(profile_name, default_base_url, alias_name)
424426
return self.add_server(server_config)
@@ -688,7 +690,8 @@ def activate_profile(self, profile_name: str, router_config: Dict[str, Any], ali
688690
"""
689691
host = router_config["host"]
690692
port = router_config["port"]
691-
default_base_url = f"http://{host}:{port}/sse"
693+
# Use streamable HTTP endpoint.
694+
default_base_url = f"http://{host}:{port}/mcp/"
692695

693696
server_config = self._format_router_server(profile_name, default_base_url, alias_name)
694697
return self.add_server(server_config)

src/mcpm/utils/router_server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
def format_server_url(client: str, profile: str, router_url: str, server_name: str | None = None) -> ServerConfig:
55
return RemoteServerConfig(
66
name=server_name if server_name else profile,
7-
url=f"{router_url}?/client={client}&profile={profile}",
7+
# Correct query parameters.
8+
url=f"{router_url}?client={client}&profile={profile}",
89
)
910

1011

@@ -14,7 +15,7 @@ def format_server_url_with_proxy_param(
1415
result = STDIOServerConfig(
1516
name=server_name if server_name else profile,
1617
command="uvx",
17-
args=["mcp-proxy", f"{router_url}?/client={client}&profile={profile}"],
18+
args=["mcp-proxy", f"{router_url}?client={client}&profile={profile}"],
1819
)
1920
return result
2021

0 commit comments

Comments
 (0)