From b866a4cc421fa6df82d65f539be7edf79021fbd7 Mon Sep 17 00:00:00 2001 From: Marcus Sanatan Date: Tue, 30 Dec 2025 00:44:57 -0400 Subject: [PATCH] Simplify default HTTP (#495) * The default URL is already set when we call the function * Remove placeholer for HTTP URL in the UI When we load the UI, we use `HttpEndpointUtility.GetBaseUrl()`, so we don't need this --- .../Transport/Transports/WebSocketTransportClient.cs | 5 ----- .../Windows/Components/Connection/McpConnectionSection.uxml | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs b/MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs index 51cd17d..704bd93 100644 --- a/MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs +++ b/MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs @@ -703,11 +703,6 @@ namespace MCPForUnity.Editor.Services.Transport.Transports private static Uri BuildWebSocketUri(string baseUrl) { - if (string.IsNullOrWhiteSpace(baseUrl)) - { - baseUrl = "http://localhost:8080"; - } - if (!Uri.TryCreate(baseUrl, UriKind.Absolute, out var httpUri)) { throw new InvalidOperationException($"Invalid MCP base URL: {baseUrl}"); diff --git a/MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.uxml b/MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.uxml index 14e3bab..b33ad8e 100644 --- a/MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.uxml +++ b/MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.uxml @@ -9,7 +9,7 @@ - +