MCP server · live

fetchdocs

Fast documentation search over any public forge repo - on demand, no pre-indexing. Point it at a library’s repo and it returns the exact docs your agent needs, fresh from source.

MCP endpoint - Streamable HTTP
https://fetchdocs.saul.link/mcp
Add to Claude Code
$ claude mcp add --transport http fetchdocs https://fetchdocs.saul.link/mcp
Why it’s different

A retrieval primitive, not another crawler

AI coding agents hallucinate APIs. fetchdocs is the layer they read from - it does not call an LLM itself.

/01

Straight from source

A blobless, sparse clone pulls only the doc files, on demand. No stale index, no crawler - the docs match the repo at HEAD, or any pinned @ref.

/02

Hybrid ranking, no LLM

Ripgrep-exact lexical search fused with local embeddings (bge-small) by reciprocal rank fusion. Runs entirely in-process; never calls a model API.

/03

Built to face the public

SSRF-guarded resolver on every redirect hop, sandboxed git, strict size caps. Hardened to sit behind a TLS + rate-limiting ingress.

Agent tools

Five tools over one shared core

The same engine as the CLI. Every source accepts owner/repo, a forge URL, a docs-site URL, or owner/repo@ref.

search_docsFetch a repo’s docs and return ranked snippets for a query.
fetch_docsWarm the cache for a repo; returns repo, commit and doc count.
list_docsList a repo’s documentation files as repo-relative paths.
read_docRead one documentation file in full, by its path.
cache_listList cached repos, most-recently-used first.
Quick start

Call it directly

One stateless JSON-RPC call - no session needed. Here, search the Tokio docs for how to spawn a task.

# search a repo's docs, top 3 hits
curl -s -X POST https://fetchdocs.saul.link/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{
        "name":"search_docs",
        "arguments":{"source":"tokio-rs/tokio","query":"spawn a task","limit":3}}}'

Bare owner/repo defaults to GitHub. Pin a branch or tag with owner/repo@v1.40.0, or hand it a docs-site URL and it resolves the repo for you.

Supported forges

Works with any of these

Clones from github.com codeberg.org gitea.com code.forgejo.org