Skip to main content
Glama

mcp-open-library

MCPオープンライブラリ

AI アシスタントが書籍や著者の情報を検索できるようにする Open Library API 用のモデル コンテキスト プロトコル (MCP) サーバー。

概要

このプロジェクトは、AIアシスタントがOpen Libraryと連携するためのツールを提供するMCPサーバーを実装します。タイトルによる書籍情報の検索、著者名による著者検索、Open Libraryキーを使用した著者詳細情報の取得、Open Library ID(OLID)を使用した著者写真のURLの取得が可能です。サーバーは書籍と著者情報の構造化データを返します。

特徴

  • タイトルによる書籍検索: タイトルを使用して書籍を検索します ( get_book_by_title )。
  • 著者名による検索: 著者名を使用して著者を検索します ( get_authors_by_name )。
  • 著者の詳細を取得: Open Library キー ( get_author_info ) を使用して、特定の著者の詳細情報を取得します。
  • 著者の写真を取得: Open Library ID (OLID) を使用して著者の写真の URL を取得します ( get_author_photo )。
  • 本の表紙を取得: さまざまな識別子 (ISBN、OCLC、LCCN、OLID、ID) を使用して本の表紙画像の URL を取得します ( get_book_cover )。

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の MCP Open Library を自動的にインストールするには:

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

手動インストール

# 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

使用法

サーバーの実行

MCP Inspector を使用してサーバーをテストできます。

npm run inspector

MCP Inspectorにアクセスし、ツールをテストします。

代替テキスト

MCPクライアントでの使用

このサーバーはモデルコンテキストプロトコル(MCP)を実装しており、MCP対応のAIアシスタントやクライアント(例: Claude Desktop)から利用できます。サーバーは以下のツールを公開しています。

  • get_book_by_title : タイトルで書籍情報を検索する
  • get_authors_by_name : 著者情報を名前で検索する
  • get_author_info : Open Library Author Keyを使用して特定の著者の詳細情報を取得します。
  • get_author_photo : Open Library Author ID (OLID) を使用して著者の写真の URL を取得します。
  • get_book_cover : 特定の識別子 (ISBN、OCLC、LCCN、OLID、または ID) を使用して、本の表紙画像の URL を取得します。

get_book_by_title入力例:

{ "title": "The Hobbit" }

get_book_by_title出力例:

[ { "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" } ]

get_authors_by_name入力例:

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

get_authors_by_name出力例:

[ { "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 } ]

get_author_info入力例:

{ "author_key": "OL26320A" }

get_author_info出力例:

{ "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" } }

get_author_photo入力例:

{ "olid": "OL26320A" }

get_author_photo出力例:

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

get_book_cover入力例:

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

get_book_cover出力例:

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

get_book_coverツールは次のパラメータを受け入れます。

  • key : 識別子の種類( ISBNOCLCLCCNOLIDIDのいずれか)
  • value : 識別子の値
  • size : オプションのカバーサイズ( Sは小、 Mは中、 Lは大、デフォルトはL

Claude Desktop で使用されているこのツールの例は、こちらでご覧いただけます。

ドッカー

このMCPサーバーはDockerを使ってテストできます。まずは以下を実行してください。

docker build -t mcp-open-library . docker run -p 8080:8080 mcp-open-library

その後、インスペクタを使用してDocker内で実行されているサーバーをテストできます。

pnpm run inspector http://localhost:8080

発達

プロジェクト構造

  • src/index.ts - メインサーバーの実装
  • src/types.ts - TypeScript 型定義
  • src/index.test.ts - テストスイート

利用可能なスクリプト

  • npm run build - TypeScriptコードをビルドする
  • npm run watch - 変更を監視して再構築する
  • npm test - テストスイートを実行する
  • npm run format - Prettier でコードをフォーマットする
  • npm run inspector - サーバーに対してMCPインスペクターを実行します

テストの実行

npm test

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

謝辞

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

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.

AI アシスタントが書籍情報を検索できるようにする Open Library API 用の Model Context Protocol (MCP) サーバー。

  1. 概要
    1. 特徴
      1. インストール
        1. Smithery経由でインストール
        2. 手動インストール
      2. 使用法
        1. サーバーの実行
        2. MCPクライアントでの使用
        3. ドッカー
      3. 発達
        1. プロジェクト構造
        2. 利用可能なスクリプト
        3. テストの実行
      4. 貢献
        1. 謝辞

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
            Last updated -
            1
            1,964
            1,697
            TypeScript
            MIT License
            • Apple
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol (MCP) server implementation for the OpenLedger API. This server provides structured context to AI models according to the MCP specification.
            Last updated -
            8
            TypeScript
            Apache 2.0
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that enables AI assistants to search and access information stored in Kibela, supporting note search, retrieval, creation and updating.
            Last updated -
            6
            107
            9
            TypeScript
            MIT License
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that enables AI assistants like Claude to interact with Outline document services, supporting document searching, reading, creation, editing, and comment management.
            Last updated -
            25
            19
            Python
            MIT License

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/8enSmith/mcp-open-library'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server