Get the FREE Ultimate OpenClaw Setup Guide →

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.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio 8ensmith-mcp-open-library node build/index.js

How to use

MCP Open Library is an MCP server that exposes Open Library data through a set of tools designed for AI assistants using the Model Context Protocol. It lets clients search for books by title, look up authors by name, retrieve detailed author information, fetch author photos, obtain book cover images, and get detailed book information by various identifiers. The server is intended to be run after a build step, and it provides a set of tools such as get_book_by_title, get_authors_by_name, get_author_info, get_author_photo, get_book_cover, and get_book_by_id. You can connect to the server via the MCP Inspector (as demonstrated in the README) and invoke these tools to fetch structured data that your assistant can present to users.

To use it with any MCP-compatible client, point the client at the running server and call the available tools. Each tool accepts a JSON input as shown in the examples: for instance, get_book_by_title with {"title": "The Hobbit"} returns a list of matching books with details like title, authors, first_publish_year, cover_url, and more. The get_book_by_id tool accepts identifiers (ISBN, LCCN, OCLC, OLID) and returns a comprehensive object containing title, authors, publishers, publish_date, pages, identifiers, and related Open Library data. The server aims to provide structured, easily consumable data for downstream agents.

How to install

Prerequisites:

  • Node.js v14+ (the project in the README references Node v22; use a compatible version for your environment or follow the project's recommendations).
  • npm or yarn for installing dependencies.

Installation steps:

  1. Clone the repository: git clone https://github.com/8enSmith/mcp-open-library.git cd mcp-open-library

  2. Install dependencies: npm install

  3. Build the project (produces build/index.js used by the MCP server): npm run build

  4. Run the Inspector to test tools (optional but recommended): npm run inspector

  5. Start the server (in production or after a build): node build/index.js

  6. If you’re using Docker as an alternative, you can follow the Docker workflow described in the README (docker build -t mcp-open-library . and docker run -p 8080:8080 mcp-open-library).

Additional notes

Notes and tips:

  • The server exposes tools for common Open Library interactions: get_book_by_title, get_authors_by_name, get_author_info, get_author_photo, get_book_cover, and get_book_by_id. Craft your tool inputs exactly as shown in the examples to ensure predictable responses.
  • When testing with the Inspector, ensure you select the STDIO transport and point to build/index.js as the server entry point.
  • If you plan to run behind firewall or in a container, ensure the port (default 8080 in the Docker example) is exposed and accessible to your MCP client.
  • The API returns structured JSON for most tools; consider validating responses against the expected shapes in your client to provide consistent UX.
  • The repository uses npm scripts (build, watch, test, format). Use npm run build before starting the server to ensure the latest code is compiled.

Related MCP Servers

Sponsor this space

Reach thousands of developers