AI clients
MCP server reference
Connect AI clients to LibreLeaf's public read-only Streamable HTTP tools for cited work search and source-labelled access resolution.
Endpoint and transport
The production MCP endpoint is https://libreleaf-books.netlify.app/mcp. It uses the official Model Context Protocol SDK with Streamable HTTP in stateless JSON-response mode. The endpoint is public, HTTPS and read-only; it has no OAuth flow, user account or write tool.
An MCP-capable client should connect to that exact URL and inspect the advertised tools before use. In ChatGPT, remote MCP connections are configured through developer mode where the feature and workspace policy allow it. Public availability of the endpoint does not guarantee that a plugin listing has been reviewed or published.
https://libreleaf-books.netlify.app/mcpTools
- search(query) — return citation-ready stable work IDs, titles and canonical LibreLeaf URLs.
- fetch(id) — refresh a search result and return its complete resolver record, provenance, routes and rights context.
- search_books(query, search_by?, limit?, region?) — search six catalogues with a result limit from 1 to 20.
- resolve_access(title, author?, region?) — select one canonical match and return every validated attached offer plus an auditable ranking explanation.
Selection and result rules
Use search followed by fetch when a client needs citation-compatible retrieval. Use search_books for bounded catalogue exploration. Use resolve_access when the title is known and the useful answer is one work with all of its lawful routes.
The server searches Project Gutenberg, Open Library, Wikisource, DOAB, the Library of Congress and LibriVox. It preserves download, read, listen, borrow and preview labels. GB, US and GLOBAL change source-rights context only; the model must not convert that metadata into a universal copyright claim.
Test a connection
Use MCP Inspector to list tools and make a controlled call before connecting a production workflow. Test direct, indirect and negative prompts, including requests that must not turn a preview into a download or describe a US public-domain assessment as worldwide.
The repository contains protocol tests and submission cases. A public ChatGPT plugin submission is a separate OpenAI review process requiring developer or business access, listing information, policy URLs, test cases and domain verification when requested.
npx netlify dev
npx @modelcontextprotocol/inspector
npm run test:mcp