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.
Integrations
Referenced in the repository URL for cloning the project.
Used for package management and running scripts.
Used for code formatting in the development workflow.
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 and get detailed information
- Author Search by Name: Search for authors using their name and get relevant details
- Structured Response Format: Returns book and author information in a consistent JSON structure
- Error Handling: Proper validation and error reporting
- Testing: Comprehensive test coverage with Vitest
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)
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:
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.
A Model Context Protocol (MCP) server for the Open Library API that enables AI assistants to search for book information.