This server allows AI assistants to interact with the Open Library API to fetch information about books and authors.
Capabilities:
- Search for books by title (
get_book_by_title
) - Search for authors by name (
get_authors_by_name
) - Retrieve detailed author information using their Open Library key (
get_author_info
) - Get URLs for author photos using their Open Library ID (OLID) (
get_author_photo
) - Get URLs for book cover images using various identifiers (ISBN, OCLC, LCCN, OLID, ID) (
get_book_cover
) - Retrieve detailed book information using various identifiers (ISBN, LCCN, OCLC, or OLID) (
get_book_by_id
)
Referenced in the repository URL for cloning the project.
Used for package management and running scripts.
Used for code formatting in the development workflow.
Used as the implementation language for the MCP server.
Used for comprehensive test coverage of the MCP server.
MCP Open Library
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 for book information by title, searching for authors by name, retrieving detailed author information using their Open Library key, and getting URLs for author photos using their Open Library ID (OLID). The server returns structured data for book and author information.
Features
- Book Search by Title: Search for books using their title (
get_book_by_title
). - Author Search by Name: Search for authors using their name (
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
).
Installation
Installing via Smithery
To install MCP Open Library for Claude Desktop automatically via Smithery:
Manual Installation
Usage
Running the Server
You can use the MCP Inspector to test the server:
Access the MCP Inspector and then test the tool e.g.
Using with an MCP Client
This server implements the Model Context Protocol, which means it can be used by any MCP-compatible AI assistant or client e.g. Claude Desktop. The server exposes the following tools:
get_book_by_title
: Search for book information by titleget_authors_by_name
: Search for author information by nameget_author_info
: Get detailed information for a specific author using their Open Library Author Keyget_author_photo
: Get the URL for an author's photo using their Open Library Author ID (OLID)get_book_cover
: Get the URL for a book's cover image using a specific identifier (ISBN, OCLC, LCCN, OLID, or ID)get_book_by_id
: Get detailed book information using a specific identifier (ISBN, LCCN, OCLC, or OLID)
Example get_book_by_title
input:
Example get_book_by_title
output:
Example get_authors_by_name
input:
Example get_authors_by_name
output:
Example get_author_info
input:
Example get_author_info
output:
Example get_author_photo
input:
Example get_author_photo
output:
Example get_book_cover
input:
Example get_book_cover
output:
The get_book_cover
tool accepts the following parameters:
key
: The type of identifier (one of:ISBN
,OCLC
,LCCN
,OLID
, orID
)value
: The value of the identifiersize
: Optional cover size (S
for small,M
for medium,L
for large, defaults toL
)
Example get_book_by_id
input:
Example get_book_by_id
output:
The get_book_by_id
tool accepts the following parameters:
idType
: The type of identifier (one of:isbn
,lccn
,oclc
,olid
)idValue
: The value of the identifier
An example of this tool being used in Claude Desktop can be see here:
Docker
You can test this MCP server using Docker. To do this first run:
You can then test the server running within Docker via the inspector e.g.
Development
Project Structure
src/index.ts
- Main server implementationsrc/types.ts
- TypeScript type definitionssrc/index.test.ts
- Test suite
Available Scripts
npm run build
- Build the TypeScript codenpm run watch
- Watch for changes and rebuildnpm test
- Run the test suitenpm run format
- Format code with Prettiernpm run inspector
- Run the MCP Inspector against the server
Running Tests
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol (MCP) server for the Open Library API that enables AI assistants to search for book information.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.Last updated -12,1671,631TypeScriptMIT License
Open-Ledger-MCP-Serverofficial
-securityAlicense-qualityA Model Context Protocol (MCP) server implementation for the OpenLedger API. This server provides structured context to AI models according to the MCP specification.Last updated -8TypeScriptApache 2.0- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants to search and access information stored in Kibela, supporting note search, retrieval, creation and updating.Last updated -61079TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants like Claude to interact with Outline document services, supporting document searching, reading, creation, editing, and comment management.Last updated -2519PythonMIT License