Search the SansFiction book catalog and manage a personal reading library (books, collections, reading progress, ratings, stats) over a token-authenticated REST API...
SansFiction is a digital library for books, collections, reading journals, and
discovery. This skill drives its public REST API (/api/v1). An MCP server
exposing the same capabilities is also available at /api/mcp for MCP-native
clients โ both accept the same bearer token.
Base URL: https://sansfiction.com
Public catalog endpoints need no auth. Personal library endpoints require a bearer token:
Authorization: Bearer sf_mcp_xxxxxxxxxxxxxxxxxxxxxxxx
A signed-in user generates a token at https://sansfiction.com/docs/agents.
Never ask the user for a password โ only a token. On 401, ask for a fresh one.
GET /api/v1/catalog/search?q={query}&limit=20&searchType=all|author|series|mood|isbnGET /api/v1/catalog/books/{bookId}GET /api/v1/catalog/series/{seriesId}GET /api/v1/catalog/collections?limit=20curl "https://sansfiction.com/api/v1/catalog/search?q=dune&limit=5"
GET /api/v1/library/books?status=reading|want|read|dnf|all&limit=20POST /api/v1/library/books โ body { "book_id", "status?", "edition_id?" }PATCH /api/v1/library/books/{bookId} โ body { "status?","rating?","review?","started_at?","finished_at?","current_page?" }DELETE /api/v1/library/books/{bookId}GET /api/v1/library/search?q={query}&status=all&limit=10GET /api/v1/library/collections?limit=20&query=GET /api/v1/library/collections/{collectionId}?limit=&offset=&rank=truePOST /api/v1/library/collections/{collectionId}/items โ body { "book_id","note?","edition_id?" }GET /api/v1/library/stats?scope=weekly|monthly|yearly&include_logs=falsecurl -H "Authorization: Bearer $SF_TOKEN" \
"https://sansfiction.com/api/v1/library/books?status=reading"
{ "error": string, "code"?: string }.book_id is the catalog UUID returned by any catalog search/detail response.Retry-After on 429; check X-RateLimit-Remaining / X-RateLimit-Reset.GET /api/v1/catalog/search โ take book.id.POST /api/v1/library/books { "book_id": "โฆ", "status": "want" }.PATCH /api/v1/library/books/{id} { "current_page": 120 }.PATCH /api/v1/library/books/{id} { "status": "read", "rating": 5, "review": "โฆ" }.MCP-native clients can connect to https://sansfiction.com/api/mcp
(streamable HTTP) with the same bearer token; its tools mirror these endpoints.