Connect

The library is reachable two ways, both with a key from your dashboard: the MCP endpoint (the main way — for LLMs) and the REST API (for code).

MCP (recommended)

Point any MCP client at https://anglicanlibrary.com/mcp, authenticating with Authorization: Bearer YOUR_KEY. It exposes one tool, search_anglican_library, returning attributed passages your model can cite.

{
  "mcpServers": {
    "anglican-library": {
      "type": "http",
      "url": "https://anglicanlibrary.com/mcp",
      "headers": { "Authorization": "Bearer bk_your_key" }
    }
  }
}

Tool arguments: query, top_k, mode ("semantic"/"literal"), rerank, deep (exhaustive recall, top_k up to 200), and filters author / category / title / year_min / year_max. Then just ask your assistant to “search the Anglican library for …”.

MCP via OAuth (custom connectors)

Some MCP clients use a one-click "custom connector" flow that doesn't take a pasted key. For those, just add https://anglicanlibrary.com/mcp as the connector URL — the client discovers the OAuth endpoints automatically, sends you here to log in and authorize, and is then issued a token bound to your account (metered against the same monthly quota). No key handling on your end.

Under the hood: protected-resource and authorization-server metadata at /.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server, dynamic client registration at /oauth/register, and an authorization-code + PKCE flow (/oauth/authorize, /oauth/token).

REST API

Authenticate with your API key as a bearer token (or X-API-Key header).

POST /v1/search

curl -s https://YOUR_DOMAIN/v1/search \
  -H "Authorization: Bearer bk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"query":"the eternal generation of the Son","top_k":5}'

Request body

querystring, required
top_kint, default 5, max 25
mode"semantic" (default) or "literal"
rerankbool, default true (cross-encoder rerank)
deepbool, default false. Exhaustive recall mode: returns many passages (top_k up to 200, no rerank) for a long-context model to synthesize. Counts as more quota units.
author, category, titlesubstring filters
year_min, year_maxpublication-year range

Response

{
  "query": "...",
  "count": 5,
  "results": [
    {"score": 0.91, "title": "...", "author": "...", "year": 1854,
     "book_id": 1914, "url": "https://...", "char_start": 8331,
     "char_end": 10034, "text": "..."},
    ...
  ]
}

Status codes

200success
401missing/invalid API key
429monthly quota exceeded
503search engine not ready

Your monthly request quota is shown on your dashboard.