Get the server base URL from injected config.
Convenience function that extracts just the base URL from the config. Falls back to window.location.origin if available, or the provided default.
window.location.origin
Fallback URL if not configured and window.location unavailable
The server base URL
// Uses injected config, then window.location.origin, then the fallbackconst baseUrl = getMcpServerBaseUrl("http://localhost:3000");// Configure debug logger with dynamic base URLclientDebugLogger.configure({ transport: "api", apiEndpoint: `${getMcpServerBaseUrl()}/api/logs`,}); Copy
// Uses injected config, then window.location.origin, then the fallbackconst baseUrl = getMcpServerBaseUrl("http://localhost:3000");// Configure debug logger with dynamic base URLclientDebugLogger.configure({ transport: "api", apiEndpoint: `${getMcpServerBaseUrl()}/api/logs`,});
Get the server base URL from injected config.
Convenience function that extracts just the base URL from the config. Falls back to
window.location.originif available, or the provided default.