Skip to content

feat: agent readiness for maple.dev — OpenAPI, MCP manifest, Accept-aware 404s, trust pages - #566

Merged
Makisuo merged 1 commit into
mainfrom
feat/landing-agent-readiness
Aug 21, 2026
Merged

feat: agent readiness for maple.dev — OpenAPI, MCP manifest, Accept-aware 404s, trust pages#566
Makisuo merged 1 commit into
mainfrom
feat/landing-agent-readiness

Conversation

@Makisuo

@Makisuo Makisuo commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Raises maple.dev's machine-readability for agents (audit baseline 73/100). Product behaviour and visual design are unchanged for browsers.

Landing (apps/landing)

  • src/worker.ts: 404 representation follows Accept — HTML for browsers, a short markdown note with recovery links (llms.txt, sitemap, docs, OpenAPI, MCP manifest, about/contact) for everything else, and the v2 JSON error envelope under /api, /v1, /v2, /rpc, /mcp. / gets a markdown twin (/index.md); HTML pages with a twin send Vary: Accept + Link: <…md>; rel="alternate"; type="text/markdown".
  • New endpoints: /openapi.json (OpenAPI 3.1 from MapleApiV2), /.well-known/mcp.json + /.well-known/mcp/server.json (MCP registry server.json, validated against the 2025-12-11 schema), /about, /contact (+ .md twins), docs /docs/api and /docs/mcp (the API's OAuth metadata already linked /docs/mcp).
  • Organization JSON-LD: legalName, email, contactPoint[], address; llms.txt: API / MCP server / Company sections, Homebrew + releases for the CLI; robots.txt names the machine-readable entry points; small "where to look next" row on the HTML 404.

API (apps/api)

  • routes/discovery.http.ts: /openapi.json, /v2/openapi.json, /.well-known/mcp.json, JSON index at /, and a wildcard catch-all answering unmatched routes with the v2 RouteNotFound envelope instead of an empty 404.

Domain (packages/domain)

  • @maple/domain/mcp-manifest (single source of the server.json; McpServer version reads the same constant) and V2RouteNotFound.

Test plan

  • apps/landing: new vitest suite (worker negotiation/404s, OpenAPI + MCP endpoints, trust pages) — 22 passing
  • packages/domain: mcp-manifest.test.ts + existing openapi.test.ts — 43 passing
  • apps/api: discovery.http.test.ts (spec, manifest, catch-all precedence) + mcp/app.test.ts — passing; tsc --noEmit clean
  • astro build ok; built site run under the real worker locally and curl-verified every endpoint (404 markdown/HTML/JSON by Accept, Vary/Link headers, twins, manifests)

Open decisions (not in this PR)

  • Postal address in the Organization schema is country-level only (US).
  • Support contact uses support@maple.dev (already in the OpenAPI info.contact); privacy/legal stay on @getmaple.dev.
  • Registering dev.maple/maple in the MCP registry and publishing the CLI to npm need account access.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…are 404s, trust pages

Landing (maple.dev):
- worker: pick the 404 representation from Accept — HTML for browsers,
  a markdown note with recovery links for everything else, and the v2 JSON
  error envelope under /api, /v1, /v2, /rpc, /mcp. Home page gets a markdown
  twin (/index.md); HTML pages with a twin send Vary: Accept and an
  RFC 8288 alternate Link.
- /openapi.json (derived from MapleApiV2), /.well-known/mcp.json and
  /.well-known/mcp/server.json (registry server.json), /about and /contact
  (+ .md twins), docs pages /docs/api and /docs/mcp.
- Organization JSON-LD gains legalName, email, contactPoint, address;
  llms.txt gains API, MCP server and Company sections; robots.txt names
  the machine-readable entry points.

API:
- /openapi.json, /v2/openapi.json, /.well-known/mcp.json, a JSON index
  at /, and a wildcard catch-all that returns the v2 RouteNotFound envelope
  instead of an empty 404.

Domain:
- @maple/domain/mcp-manifest (single source of the server.json) and
  V2RouteNotFound.

Tests: landing worker + endpoints (vitest, new), domain manifest, API
discovery router.
@Makisuo
Makisuo force-pushed the feat/landing-agent-readiness branch from 0bdb725 to c7c34c0 Compare August 21, 2026 23:38
@Makisuo
Makisuo merged commit e018bd1 into main Aug 21, 2026
38 checks passed
@Makisuo
Makisuo deleted the feat/landing-agent-readiness branch August 21, 2026 23:40
@Makisuo
Makisuo deployed to pr-preview August 21, 2026 23:40 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown

🍁 Maple PR preview

Note

Preview resources were removed when this pull request closed.

Final commit c7c34c0 · View workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant