MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / mcpUrlForActiveLocalServer

Function mcpUrlForActiveLocalServer

apps/cli/src/main.ts:1359–1374  ·  view source on GitHub ↗
(input: {
  readonly connection: ExecutorServerConnection;
  readonly elicitationMode: "browser" | "model";
  readonly artifacts: boolean;
})

Source from the content-addressed store, hash-verified

1357// ---------------------------------------------------------------------------
1358
1359const mcpUrlForActiveLocalServer = (input: {
1360 readonly connection: ExecutorServerConnection;
1361 readonly elicitationMode: "browser" | "model";
1362 readonly artifacts: boolean;
1363}): URL => {
1364 const url = new URL("/mcp", input.connection.origin);
1365 if (input.elicitationMode === "browser") {
1366 url.searchParams.set("elicitation_mode", "browser");
1367 }
1368 // Artifacts are on by default; only the opt-out is spelled out, so the
1369 // default endpoint stays clean.
1370 if (!input.artifacts) {
1371 url.searchParams.set("artifacts", "false");
1372 }
1373 return url;
1374};
1375
1376/**
1377 * Bridge a stdio MCP client to a local server's HTTP `/mcp` endpoint. `executor

Callers 1

runMcpHttpBridgeFunction · 0.85

Calls 1

setMethod · 0.80

Tested by

no test coverage detected