leaflet-search#
search for leaflet.
live: leaflet-search.pages.dev
how it works#
- tap syncs leaflet content from the network
- backend indexes content into SQLite FTS5 via Turso, serves search API
- site static frontend on Cloudflare Pages
MCP server#
search is also exposed as an MCP server for AI agents like Claude Code:
claude mcp add-json leaflet '{"type": "http", "url": "https://leaflet-search-by-zzstoatzz.fastmcp.app/mcp"}'
see mcp/README.md for local setup and usage details.
api#
GET /search?q=<query>&tag=<tag> # search with query, tag, or both
GET /tags # list all tags with counts
GET /stats # document/publication counts
GET /health # health check
search returns three entity types: article (document in a publication), looseleaf (standalone document), publication (newsletter itself). tag filtering applies to documents only.
stack#
- Fly.io hosts backend + tap
- Turso cloud SQLite
- Tap syncs leaflet content from ATProto firehose
- Zig HTTP server, search API, content indexing
- Cloudflare Pages static frontend