home / mcp / mcp open library mcp server
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.
Configuration
View docs{
"mcpServers": {
"8ensmith-mcp-open-library": {
"url": "http://localhost:8080"
}
}
}You can run an MCP server that exposes Open Library data to AI assistants. It lets you search for books by title, find authors, fetch author details and photos, and retrieve book covers and editions through dedicated tools. This enables your AI workflows to discover and present library information quickly and consistently.
Connect your MCP client to the server using either a remote HTTP endpoint or a local stdio client workflow. Once connected, you can call the available tools to search for books, find authors, fetch author details and photos, and retrieve book covers and editions. Use the tools to assemble structured results that your AI can display or reference in chats, apps, or assistants.
Prerequisites you need before starting are Node.js v22.x (or newer) and a working environment for running npm commands.
Manual installation steps you can follow to set up the MCP server locally:
# Clone the MCP Open Library repository
git clone https://github.com/8enSmith/mcp-open-library.git
cd mcp-open-library
# Install dependencies
npm install
# Build the project
npm run buildBuild the project, then start the inspector to connect your client to the local server. The process uses the MCP Inspector to establish a STDIO transport and run tools like get_book_by_title.
Basic flow you can follow once the build is complete:
npm run inspectorIf you prefer running in a container for isolation, you can test with Docker. Build the image and run the container, then connect via the inspector to test tools.
docker build -t mcp-open-library .
docker run -p 8080:8080 mcp-open-library
```
"""
You can then test the server using the inspector, for example:
```
npm run inspector http://localhost:8080Search for book information by title. Returns structured data including title, authors, first publish year, edition count, work key, and a cover URL.
Search for authors by name. Returns author key, name, alternate names, birth date, top work, and work count.
Retrieve detailed information for a specific author using their Open Library key. Includes bios, birth/death dates, alternate names, photos, and external IDs.
Get the URL for an author's photo using their OLID.
Get the URL for a book cover image using a specified identifier (ISBN, OCLC, LCCN, OLID, or ID) and a size.
Retrieve detailed book information using a specific identifier (ISBN, LCCN, OCLC, or OLID).