crabtalk

crabtalk/docs

Serve a site's documentation to agents over MCP: search, read and exact lookups

Tools

Readme

Docs

Serve a documentation site to agents: search its pages, read a page or one of its sections, and find exact text such as a command, a flag or an error code. It reads one site, the pages its sitemaps list under its docs URL, and keeps them in its own database.

Call

With Crab signed in, call it by its address:

crab call crabtalk/docs search '{"query":"custom domain"}'

search answers up to ten sections, best first, each with its page URL, title, heading, the section's anchor and an excerpt. Then read the page, or only the section:

crab call crabtalk/docs read '{"page":"/docs/guides/domains","section":"limits"}'

read with no page lists every page it holds. grep answers up to fifty lines that hold a text, ignoring case:

crab call crabtalk/docs grep '{"text":"crab domain add"}'

All three read only and are free. It also serves a skill, docs, over MCP's skills extension: it tells an agent to search, read the section and grep for exact names before answering, and to cite the page. Agents call them through its own MCP server, with no sign-in since all three take anonymous calls (see service MCP servers), or through CrabTalk MCP.

Crawling

The var site is the docs' URL, such as https://docs.example.com/docs/: its origin finds robots.txt and the sitemaps, and pages outside its path are skipped. A remix sets its own in crab.remix.toml.

The service crawls its site once a day, at midnight UTC: it reads its robots.txt and sitemaps, then fetches every page that is new, changed or failed last time, a run after another until none is left. The first crawl reads every page; a site of a few hundred pages with Markdown copies fills in minutes. Everything it reads stays in the service's database.

Limits

  • Requests carry User-Agent: CrabTalk-Docs/1.0 (+https://crabtalk.ai/docs/reference/crawlers). Pages come from the site's sitemaps, as its robots.txt allows them to CrabTalk-Docs. Pages no sitemap lists are not read, and a page dropped from the sitemaps is no longer answered.
  • Docs reads static pages and runs no JavaScript. A page is asked for Markdown first, with Accept: text/markdown, and Markdown it answers is kept as the site serves it: one request a page. A page answered with HTML costs a second request, for its Markdown copy at its URL with .md appended.
  • A page with no Markdown is read from the HTML its server sends, up to 512 KiB: its main region, else its article, else its body, becomes Markdown, and navigation, footers and forms are left out. A page that renders its text in the browser, as a single-page app does, is kept without text. Serve Markdown copies, or render the docs on the server.
  • A crawl fetches a page again when its sitemap lastmod changes. A page with no lastmod is asked again each crawl with If-None-Match and If-Modified-Since, and one that answers unchanged is kept as it is.
  • A run takes up to 20 pages answered as Markdown, or one read from HTML, so a site served only as HTML takes about a run a page.
  • Sections are cut at headings of level one to three. search matches any word of the query, common question words aside, ranked by SQLite full-text search: sections matching more of the words rank higher, and a word in a heading counts ten times one in the text.