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

Function getInitialTransportType

client/src/utils/configUtils.ts:61–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59};
60
61export const getInitialTransportType = ():
62 | "stdio"
63 | "sse"
64 | "streamable-http" => {
65 const param = getSearchParam("transport");
66 if (param === "stdio" || param === "sse" || param === "streamable-http") {
67 return param;
68 }
69 return (
70 (localStorage.getItem("lastTransportType") as
71 | "stdio"
72 | "sse"
73 | "streamable-http") || "stdio"
74 );
75};
76
77export const getInitialSseUrl = (): string => {
78 const param = getSearchParam("serverUrl");

Callers

nothing calls this directly

Calls 1

getSearchParamFunction · 0.85

Tested by

no test coverage detected