Get the FREE Ultimate OpenClaw Setup Guide →

NLI_AI_Search

MCP for the National Library of Israel - AI-powered bridge for exploring millions of cultural, historical, and literary assets.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mula2812-nli_ai_search python -m nli_mcp

How to use

This MCP server provides a natural language interface to the National Library of Israel Open Library API via Claude Desktop. It converts conversational queries in Hebrew or English into structured API calls, retrieves metadata, thumbnails, and IIIF manifests, and can stream media when available. The built-in tools enable natural language query processing, result assembly with images, and access to item manifests and media streams. After installation and registering the tool in Claude Desktop, you can ask questions like: “Books by Bialik published after 1920” or “Show me Hebrew manuscripts with thumbnails.” The server handles disambiguation, topic inference, and multiple query generation to return rich, media-enabled results in your preferred language.

Available tools include:

  • process_natural_query: Transforms a natural language query into structured API parameters.
  • generate_response: Fetches results, extracts images, and builds a user-facing response with metadata and links.
  • stream_batches: Streams large result sets for long or segmented queries.
  • get_image: Retrieves an IIIF image by its identifier.
  • get_manifest: Retrieves the IIIF manifest JSON for a given record.
  • get_stream: Retrieves MP4, HLS, or audio streams associated with a library record.

How to install

Prerequisites:

  • Python 3.10 or newer
  • Git
  • Access to the National Library of Israel Open Library API (API key may be required, see environment variables below)

Step 1: Clone the repository

git clone https://github.com/mula2812/NLI_AI_Search.git
cd NLI_AI_Search

Step 2: Create and activate a Python virtual environment (recommended)

python3.10 -m venv venv
source venv/bin/activate  # on Unix/macOS
venv\Scripts\activate     # on Windows

Step 3: Install dependencies

pip install -r requirements.txt

Step 4: Install the MCP server (installer script)

  • Windows:
.\install_mcp_server.bat
  • Linux:
chmod +x install_mcp_server.bash
./install_mcp_server.bash

Step 5: Run the MCP server using the module

python -m nli_mcp

Step 6: Register and use with Claude Desktop

  • Open Claude Desktop and ensure the tool named nli_mcp appears in the “Search and Tools” area after restart.
  • If needed, follow the in-app prompts to authorize and connect the MCP server.

Prerequisites recap: Python 3.10+, git, virtual environment, network access to Claude Desktop and the NLI Open Library API. If you encounter API key issues, ensure NLI_API_KEY is set in your environment (see environment variables below).

Additional notes

Environment variables and configuration:

  • NLI_API_KEY: Your personal API key for the National Library of Israel Open Library API. If you don’t have one, the project can operate with a default visitor key, but full data access may require your own key. Ensure the key is available to the MCP process, e.g., export NLI_API_KEY=your_key_here (Linux/macOS) or set in your environment on Windows.

Tips and common issues:

  • If the Claude Desktop plugin (nli_mcp) doesn’t appear, ensure Claude Desktop is version 2.0 or newer and that you restarted the app after installation.
  • Place your project and installation files in a path that contains only English characters to avoid path encoding issues.
  • Verify internet connectivity and firewall rules if the MCP cannot reach the NLI API.
  • Check logs for error messages when the MCP isn’t responding or fails to fetch data.

Related MCP Servers

Sponsor this space

Reach thousands of developers