Serve the Pipelines chat tools over a loopback MCP endpoint and register it with Claude Code, Codex and OpenCode chats

This commit is contained in:
2026-11-09 16:34:21 +00:00
parent 3ab029cd7b
commit 9791f09230
33 changed files with 2308 additions and 7 deletions
+15
View File
@@ -585,3 +585,18 @@ test("raw peer HTML and legacy SVG files retain a local sandbox and no cookie au
assert.match(await response.text(), /<script>/);
}
});
test("the relay never forwards a machine's loopback MCP chat-tools endpoint", async (t) => {
const f = await fixture(t);
await f.register("one", { endpoints: [f.remotes[0]], password: "password-one" });
const before = f.observations.length;
for (const method of ["GET", "POST"]) {
const reply = await fetch(f.base + "/peers/one/mcp/chat/" + "a".repeat(64), {
method,
headers: { Cookie: f.cookie, "Content-Type": "application/json" },
body: method === "POST" ? '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' : undefined,
});
assert.equal(reply.status, 404);
}
assert.equal(f.observations.length, before);
});