fix(ui): use dynamic proxy base URL in MCP usage examples (#30487)

Replace hardcoded http://localhost:4000 with getProxyBaseUrl() in the
MCP server usage example and copy-to-clipboard snippet so the generated
configuration works for non-local deployments.

Fixes #30466
This commit is contained in:
Nahrin 2026-06-17 07:48:00 -04:00 committed by GitHub
parent 5ac0c57383
commit 751fad712e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,6 +11,7 @@ import Navbar from "./navbar";
import {
agentHubPublicModelsCall,
skillHubPublicCall,
getProxyBaseUrl,
getPublicModelHubInfo,
getUiConfig,
mcpHubPublicServersCall,
@ -1929,7 +1930,7 @@ import asyncio
config = {
"mcpServers": {
"${selectedMcpServer.server_name}": {
"url": "http://localhost:4000/${selectedMcpServer.server_name}/mcp",
"url": "${getProxyBaseUrl()}/${selectedMcpServer.server_name}/mcp",
"headers": {
"x-litellm-api-key": "Bearer sk-1234"
}
@ -1969,7 +1970,7 @@ import asyncio
config = {
"mcpServers": {
"${selectedMcpServer.server_name}": {
"url": "http://localhost:4000/${selectedMcpServer.server_name}/mcp",
"url": "${getProxyBaseUrl()}/${selectedMcpServer.server_name}/mcp",
"headers": {
"x-litellm-api-key": "Bearer sk-1234"
}