MCPcopy Create free account
hub / github.com/modelcontextprotocol/inspector / getMCPProxyAddress

Function getMCPProxyAddress

client/src/utils/configUtils.ts:16–28  ·  view source on GitHub ↗
(config: InspectorConfig)

Source from the content-addressed store, hash-verified

14};
15
16export const getMCPProxyAddress = (config: InspectorConfig): string => {
17 let proxyFullAddress = config.MCP_PROXY_FULL_ADDRESS.value as string;
18 if (proxyFullAddress) {
19 proxyFullAddress = proxyFullAddress.replace(/\/+$/, "");
20 return proxyFullAddress;
21 }
22
23 // Check for proxy port from query params, fallback to default
24 const proxyPort =
25 getSearchParam("MCP_PROXY_PORT") || DEFAULT_MCP_PROXY_LISTEN_PORT;
26
27 return `${window.location.protocol}//${window.location.hostname}:${proxyPort}`;
28};
29
30export const getMCPServerRequestTimeout = (config: InspectorConfig): number => {
31 return config.MCP_SERVER_REQUEST_TIMEOUT.value as number;

Callers 4

AppFunction · 0.90
createProxyFetchFunction · 0.90
checkProxyHealthFunction · 0.90
connectFunction · 0.90

Calls 1

getSearchParamFunction · 0.85

Tested by

no test coverage detected