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
Stata MCP Extension for VS Code and Cursor IDE
A Model Context Protocol (MCP) server for analyzing GitLab repositories and performing security assessments.
Webflow MCP server
A Model Context Protocol server for fetching IETF documents (RFCs) for Large Language Models.
CCXT MCP Server bridges the gap between AI models and cryptocurrency trading by providing a standardized interface through...
An MCP server to allow you to debug webpages using LLMs
MCP Server for using Garak LLM vulnerability scanner
An mcp server that auto commits changes and creates commit message in the form of conventional commits (https://www.conventionalcommits.org/en/v1.0.0/)





