MCP Open Library
A Model Context Protocol (MCP) server for the Open Library API that enables AI assistants to search for book information.
Overview
This project implements an MCP server that provides a tool for AI assistants to search the Open Library for book information by title. The server returns structured data about the most relevant book match, including title, authors, publication year, and other metadata.
Features
- Book Search by Title: Search for books using their title and get detailed information
- Structured Response Format: Returns book information in a consistent JSON structure
- Error Handling: Proper validation and error reporting
- Testing: Comprehensive test coverage with Vitest
Installation
# Clone the repository
git clone https://github.com/your-username/mcp-open-library.git
cd mcp-open-library
# Install dependencies
npm install
# Build the project
npm run build
Usage
Running the Server
You can use the MCP Inspector to test the server:
npm run inspector
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 tool:
get_book_by_title: Search for book information by title
Example input:
{
"title": "The Hobbit"
}
Example output:
{
"title": "The Hobbit",
"authors": ["J.R.R. Tolkien"],
"first_publish_year": 1937,
"open_library_work_key": "/works/OL45883W",
"edition_count": 120
}
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:
docker build -t mcp-open-library .
docker run -p 8080:8080 mcp-open-library
You can then test the server running within Docker via the inspector e.g.
pnpm run inspector http://localhost:8080
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
npm test
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
- Open Library API
- Model Context Protocol
Open Library MCP Server
Project Details
- 8enSmith/mcp-open-library
- MIT License
- Last Updated: 4/22/2025
Recomended MCP Servers
Diff & patch JavaScript objects
An unofficial and community-built MCP server for integrating with https://railway.app
MCP server to analyze your genetic test results from WeGene
A MCP server project that creates PowerPoint presentations, forked from supercurses/powerpoint with additional features
An mcp server that provides read-only access to MariaDB.
This read-only MCP Server allows you to connect to Kintone data from Claude Desktop through CData JDBC Drivers....
Java and Kotlin Code samples used on cloud.google.com





