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
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/14144-llms-txt-names-the-openapi-description-s → main 3 commits fork
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 | ||
| 536 | 536 | `# forge at ${ctx.url.host}`, |
| 537 | 537 | "", |
| 538 | 538 | running, |
| 539 | `MCP: ${mcp.url} (OAuth; start and report need no account)`, | |
| 540 | `OpenAPI: ${o}${DISCOVERY.openapi}`, | |
| 539 | 541 | "", |
| 540 | 542 | SITE_PATH(o), |
| 541 | 543 | "", |
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 | ||
| 72 | 72 | test("the text names no private host", () => { |
| 73 | 73 | expect(body).not.toMatch(/\b(10\.\d+\.\d+\.\d+|192\.168\.|\.svc|\.internal\b|\.cluster\.local)/); |
| 74 | 74 | }); |
| 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 | }); |
new above
offline