Labsco
8enSmith logo

MCP Open Library

โ˜… 80

from 8enSmith

A Model Context Protocol (MCP) server for the Open Library API that enables AI assistants to search for book and author information.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

MCP Open Library

Trust Score Listed on Spark smithery badge

A Model Context Protocol (MCP) server for the Open Library API that enables AI assistants to search for book and author information.

<a href="https://glama.ai/mcp/servers/@8enSmith/mcp-open-library"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@8enSmith/mcp-open-library/badge" alt="mcp-open-library MCP server" /> </a>

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).

Development

Project Structure

  • src/index.ts - Main server implementation
  • src/types.ts - TypeScript type definitions
  • src/index.test.ts - Test suite

Available Scripts

  • npm run build - Build the TypeScript code
  • npm run watch - Watch for changes and rebuild
  • npm test - Run the test suite
  • npm run format - Format code with Prettier
  • npm run inspector - Run the MCP Inspector against the server

Running Tests

Copy & paste โ€” that's it
npm test

Contributing

Contributions are welcome! Please feel free to submit a pull request.

Acknowledgments