mcp-open-library

mcp-open-library

Model Context Protocol server for accessing Open Library book and author data.

34
Stars
9
Forks
34
Watchers
0
Issues
Provides an implementation of a Model Context Protocol (MCP) server to enable AI assistants and clients to search and retrieve book and author information from the Open Library API. Supports searching by title, author name, and various identifiers, as well as fetching author photos and book covers. Returns structured, machine-readable data suitable for AI model context integration. Offers installation via Smithery, manual setup, and Docker deployment.

Key Features

Book search by title
Author search by name
Retrieve detailed author information by Open Library key
Get author photos by OLID
Fetch book cover images by various IDs (ISBN, OCLC, LCCN, OLID, ID)
Get detailed book information by ID
Structured JSON output for AI clients
MCP Inspector for server testing
Docker support for deployment
TypeScript implementation

Use Cases

Enabling AI assistants to answer book and author related queries
Integrating bibliographic search in conversational AI applications
Providing book metadata and images to generative AI tools
Augmenting AI chatbots with detailed author information and bios
Building researcher or librarian tools for quick bibliographic lookup
Automating addition of book covers and author photos to reading apps
Supporting educational bots with accurate book and author facts
Facilitating book recommendation systems with structured data
Supplying context to writing or study assistants
Deploying custom MCP-compliant servers for knowledge retrieval

README

MCP Open Library

Trust Score smithery badge

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:

bash
npx -y @smithery/cli install @8enSmith/mcp-open-library --client claude

Manual Installation

bash
# 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:

bash
npm run inspector

Access the MCP Inspector and then test the tool e.g.

alt text

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 title
  • get_authors_by_name: Search for author information by name
  • get_author_info: Get detailed information for a specific author using their Open Library Author Key
  • get_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:

json
{
  "title": "The Hobbit"
}

Example get_book_by_title output:

json
[
  {
    "title": "The Hobbit",
    "authors": [
      "J. R. R. Tolkien"
    ],
    "first_publish_year": 1937,
    "open_library_work_key": "/works/OL45883W",
    "edition_count": 120,
    "cover_url": "https://covers.openlibrary.org/b/id/10581294-M.jpg"
  }
]

Example get_authors_by_name input:

json
{
  "name": "J.R.R. Tolkien"
}

Example get_authors_by_name output:

json
[
  {
    "key": "OL26320A",
    "name": "J. R. R. Tolkien",
    "alternate_names": [
      "John Ronald Reuel Tolkien"
    ],
    "birth_date": "3 January 1892",
    "top_work": "The Hobbit",
    "work_count": 648
  }
]

Example get_author_info input:

json
{
  "author_key": "OL26320A"
}

Example get_author_info output:

json
{
  "name": "J. R. R. Tolkien",
  "personal_name": "John Ronald Reuel Tolkien",
  "birth_date": "3 January 1892",
  "death_date": "2 September 1973",
  "bio": "John Ronald Reuel Tolkien (1892-1973) was a major scholar of the English language, specializing in Old and Middle English. He served as the Rawlinson and Bosworth Professor of Anglo-Saxon and later the Merton Professor of English Language and Literature at Oxford University.",
  "alternate_names": ["John Ronald Reuel Tolkien"],
  "photos": [6791763],
  "key": "/authors/OL26320A",
  "remote_ids": {
    "viaf": "95218067",
    "wikidata": "Q892"
  },
  "revision": 43,
  "last_modified": {
    "type": "/type/datetime",
    "value": "2023-02-12T05:50:22.881"
  }
}

Example get_author_photo input:

json
{
  "olid": "OL26320A"
}

Example get_author_photo output:

text
https://covers.openlibrary.org/a/olid/OL26320A-L.jpg

Example get_book_cover input:

json
{
  "key": "ISBN",
  "value": "9780547928227",
  "size": "L"
}

Example get_book_cover output:

text
https://covers.openlibrary.org/b/isbn/9780547928227-L.jpg

The get_book_cover tool accepts the following parameters:

  • key: The type of identifier (one of: ISBN, OCLC, LCCN, OLID, or ID)
  • value: The value of the identifier
  • size: Optional cover size (S for small, M for medium, L for large, defaults to L)

Example get_book_by_id input:

json
{
  "idType": "isbn",
  "idValue": "9780547928227"
}

Example get_book_by_id output:

json
{
  "title": "The Hobbit",
  "authors": [
    "J. R. R. Tolkien"
  ],
  "publishers": [
    "Houghton Mifflin Harcourt"
  ],
  "publish_date": "October 21, 2012",
  "number_of_pages": 300,
  "isbn_13": [
    "9780547928227"
  ],
  "isbn_10": [
    "054792822X"
  ],
  "oclc": [
    "794607877"
  ],
  "olid": [
    "OL25380781M"
  ],
  "open_library_edition_key": "/books/OL25380781M",
  "open_library_work_key": "/works/OL45883W",
  "cover_url": "https://covers.openlibrary.org/b/id/8231496-M.jpg",
  "info_url": "https://openlibrary.org/books/OL25380781M/The_Hobbit",
  "preview_url": "https://archive.org/details/hobbit00tolkien"
}

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:

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

bash
npm run inspector http://localhost:8080

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

bash
npm test

Contributing

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

Acknowledgments

Star History

Star History Chart

Repository Owner

8enSmith
8enSmith

User

Repository Details

Language TypeScript
Default Branch main
Size 508 KB
Contributors 3
License MIT License
MCP Verified Sep 2, 2025

Programming Languages

TypeScript
88.33%
JavaScript
9.83%
Dockerfile
1.84%

Tags

Topics

ai assistants authors books internet-archive mcp mcp-server modelcontextprotocol open-library open-library-api openlibrary

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • OpenMCP

    OpenMCP

    A standard and registry for converting web APIs into MCP servers.

    OpenMCP defines a standard for converting various web APIs into servers compatible with the Model Context Protocol (MCP), enabling efficient, token-aware communication with client LLMs. It also provides an open-source registry of compliant servers, allowing clients to access a wide array of external services. The platform supports integration with local and remote hosting environments and offers tools for configuring supported clients, such as Claude desktop and Cursor. Comprehensive guidance is offered for adapting different API formats including REST, gRPC, GraphQL, and more into MCP endpoints.

    • 252
    • MCP
    • wegotdocs/open-mcp
  • 1mcp-app/agent

    1mcp-app/agent

    A unified server that aggregates and manages multiple Model Context Protocol servers.

    1MCP Agent provides a single, unified interface that aggregates multiple Model Context Protocol (MCP) servers, enabling seamless integration and management of external tools for AI assistants. It acts as a proxy, managing server configuration, authentication, health monitoring, and dynamic server control with features like asynchronous loading, tag-based filtering, and advanced security options. Compatible with popular AI development environments, it simplifies setup by reducing redundant server instances and resource usage. Users can configure, monitor, and scale model tool integrations across various AI clients through easy CLI commands or Docker deployment.

    • 96
    • MCP
    • 1mcp-app/agent
  • mcp

    mcp

    Universal remote MCP server connecting AI clients to productivity tools.

    WayStation MCP acts as a remote Model Context Protocol (MCP) server, enabling seamless integration between AI clients like Claude or Cursor and a wide range of productivity applications, such as Notion, Monday, Airtable, Jira, and more. It supports multiple secure connection transports and offers both general and user-specific preauthenticated endpoints. The platform emphasizes ease of integration, OAuth2-based authentication, and broad app compatibility. Users can manage their integrations through a user dashboard, simplifying complex workflow automations for AI-powered productivity.

    • 27
    • MCP
    • waystation-ai/mcp
  • mcp-server-templates

    mcp-server-templates

    Deploy Model Context Protocol servers instantly with zero configuration.

    MCP Server Templates enables rapid, zero-configuration deployment of production-ready Model Context Protocol (MCP) servers using Docker containers and a comprehensive CLI tool. It provides a library of ready-made templates for common integrations—including filesystems, GitHub, GitLab, and Zendesk—and features intelligent caching, smart tool discovery, and flexible configuration options via JSON, YAML, environment variables, or CLI. Perfect for AI developers, data scientists, and DevOps teams, it streamlines the process of setting up and managing MCP servers and has evolved into the MCP Platform for enhanced capabilities.

    • 5
    • MCP
    • Data-Everything/mcp-server-templates
  • mcpmcp-server

    mcpmcp-server

    Seamlessly discover, set up, and integrate MCP servers with AI clients.

    mcpmcp-server enables users to discover, configure, and connect MCP servers with preferred clients, optimizing AI integration into daily workflows. It supports streamlined setup via JSON configuration, ensuring compatibility with various platforms such as Claude Desktop on macOS. The project simplifies the connection process between AI clients and remote Model Context Protocol servers. Users are directed to an associated homepage for further platform-specific guidance.

    • 17
    • MCP
    • glenngillen/mcpmcp-server
  • mindsdb

    mindsdb

    Connect, unify, and query data at scale with an open-source AI platform.

    MindsDB enables seamless connection to and unification of data from hundreds of enterprise sources, allowing for highly accurate responses across large-scale federated systems. It provides an open-source server with built-in support for the Model Context Protocol (MCP) to facilitate standardized interaction with AI-driven question answering over diverse data sets. The platform offers tools for preparing, organizing, and transforming both structured and unstructured data via knowledge bases, views, and scheduled jobs. Its agent framework and SQL interface empower users to configure data-centric agents, automate workflows, and interact with data conversationally.

    • 35,487
    • MCP
    • mindsdb/mindsdb
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results