Mcp Open Library
A Model Context Protocol (MCP) server for the Internet Archive's Open Library API that enables AI assistants to search for book and author information.
A Model Context Protocol (MCP) server for the Open Library API that enables AI assistants to search for book and author information.
Overview
This project implements an MCP server that provides tools for AI assistants to interact with the Open Library. It allows searching the catalogue by title, author, subject and other fields, searching for authors by name, retrieving detailed author information using their Open Library key, and getting URLs for book covers and author photos. The server returns JSON projections of the Open Library responses rather than the raw payloads.
Features
- Book Search: Search across titles, authors, subjects, places, people, publishers and ISBNs, with sorting and paging (
search_books). - Book Search by Title: Search for books using their title (
get_book_by_title). - Author Search by Name: Search for authors using their name, with paging (
get_authors_by_name). - Get Author Details: Retrieve detailed information for a specific author using their Open Library key (
get_author_info). - Get Author Photo: Get the URL for an author's photo using their Open Library ID (OLID) (
get_author_photo). - Get Book Cover: Get the URL for a book's cover image using various identifiers (ISBN, OCLC, LCCN, OLID, ID) (
get_book_cover). - Get Book by ID: Retrieve detailed book information using various identifiers (ISBN, LCCN, OCLC, OLID) (
get_book_by_id).
Search results are paged — every search tool returns at most limit results (default 10, maximum 50) alongside num_found, the total number of matches, which you page through with offset (maximum 1000). The two cover tools check that an image actually exists and say so when it does not, rather than handing back a URL that resolves to a blank placeholder.
Every tool is a read-only lookup and advertises itself as such with the readOnlyHint and openWorldHint annotations, which may allow a client to skip the confirmation prompt it shows for tools that could change something. These are hints: the MCP specification has clients treat annotations as untrusted unless the server is trusted, so the confirmation policy is the client's to decide. Failures — an unreachable API, a rejected argument — come back as a tool result flagged isError, so an assistant can read what went wrong and correct its next call rather than the request failing outright.
Installation
Quick Start
Nothing to install or build. Point an MCP client at the package with npx and it
will be fetched on first run:
{
"mcpServers": {
"mcp-open-library": {
"command": "npx",
"args": ["-y", "mcp-open-library"]
}
}
}
In Claude Desktop that goes in claude_desktop_config.json; other clients use the
same shape. Restart the client and the seven tools below become available.
MCP Registry
This server publishes to the official MCP Registry as
io.github.8enSmith/mcp-open-library from v1.0.3 onwards. Clients that
support the registry can install it by that name.
To inspect the published listing:
curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.8enSmith/mcp-open-library"
Manual Installation
# Clone the repository
git clone https://github.com/8enSmith/mcp-open-library.git
cd mcp-open-library
# Install dependencies
npm install
# Build the project
npm run build
Usage
Running the Server
From the project's README.