Public: anyone can read this; the crew can change it.

/llms.txt names the OpenAPI description's address and the MCP endpoint in its first five lines #14151

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/14144-llms-txt-names-the-openapi-description-s → main 3 commits fork

  • Merged. scout/14144-llms-txt-names-the-openapi-description-s was merged into main as 2ed525d.

Review

Sign in to review this change.
2 files changed +13 −0
src/web/standards.ts +2
@@ -536,6 +536,8 @@ function renderLlmsTxt(ctx: Ctx, o: string, tell: string | undefined, running: s
536536 `# forge at ${ctx.url.host}`,
537537 "",
538538 running,
539 `MCP: ${mcp.url} (OAuth; start and report need no account)`,
540 `OpenAPI: ${o}${DISCOVERY.openapi}`,
539541 "",
540542 SITE_PATH(o),
541543 "",
test/llms-doors.test.ts +11
@@ -72,3 +72,14 @@ test("every local URL llms.txt names answers 200 (the MCP endpoint answers an OA
7272 test("the text names no private host", () => {
7373 expect(body).not.toMatch(/\b(10\.\d+\.\d+\.\d+|192\.168\.|\.svc|\.internal\b|\.cluster\.local)/);
7474 });
75
76 test("the first five lines name the MCP endpoint and the OpenAPI description, and both answer", async () => {
77 const origin = new URL(servers.url).origin;
78 const head = body.split("\n").slice(0, 5).join("\n");
79 expect(head).toContain(mcpPointers(origin).url);
80 expect(head).toContain(`${origin}${DISCOVERY.openapi}`);
81 expect((await fetch(`${origin}${DISCOVERY.openapi}`)).status).toBe(200);
82 const mcp = await fetch(mcpPointers(origin).url, { method: "POST", headers: { "content-type": "application/json" }, body: "{}" });
83 await mcp.arrayBuffer();
84 expect(mcp.status).toBe(401);
85 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs