home / mcp / data4library mcp server

Data4Library MCP Server

MCP server for Korean National Library API with 25+ tools for book/library search, popular trends, and GPS-based nearby library discovery

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "isnow890-data4library-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@isnow890/data4library-mcp"
      ],
      "env": {
        "LIBRARY_API_KEY": "your-api-key"
      }
    }
  }
}

You will run and connect to the data4library MCP Server to access nationwide library data, book search, borrowing status, and reading analytics from the Library Information Naroo API. This MCP Server wraps the API endpoints so your AI tooling can call them in a cohesive, programmable way.

How to use

Use an MCP client to talk to the data4library MCP Server. You can run the server locally or connect to it through an HTTP endpoint if you have one configured. The MCP exposes 25 endpoints for library discovery, book search, availability checks, trends, statistics, and personalized recommendations. You combine tool calls to form complex queries, such as finding nearby libraries, then checking the newest arrivals at those libraries, or querying popular books by region.

How to install

Prerequisites you need before installation are Node.js 18+ and an API key for the Library Information Naroo service.

Option A: Install via NPX (recommended for quick setup)

npx -y @smithery/cli install @isnow890/data4library-mcp

Configure your MCP client or Claude Desktop to load the server using this NPX command. Ensure you set the LIBRARY_API_KEY environment variable to your issued API key.

Option B: Local installation for development or customization

Step 1: Obtain the source and build the project.

git clone https://github.com/isnow890/data4library-mcp.git
cd data4library-mcp
npm install
npm run build

Step 2: Claude Desktop integration (stdio configuration) to run the built server directly with Node.

If you are on Windows, add this to Claude Desktop configuration (adjust paths to your setup):

{
  "mcpServers": {
    "data4library_mcp_stdio": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/data4library-mcp/dist/src/index.js"],
      "cwd": "/path/to/data4library-mcp",
      "env": {
        "LIBRARY_API_KEY": "your-api-key"
      }
    }
  }
}

If you are on macOS or Linux, add this to Claude Desktop configuration (adjust paths to your setup):

{
  "mcpServers": {
    "data4library_mcp_stdio": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/data4library-mcp/dist/src/index.js"],
      "cwd": "/path/to/data4library-mcp",
      "env": {
        "LIBRARY_API_KEY": "your-api-key"
      }
    }
  }
}

Step 3: Restart Claude Desktop to activate the local server configuration. Ensure your API key is set in the environment and the dist index.js path points to the built file.

Available tools

search_libraries

Search nationwide public libraries by region or name to locate nearby facilities and contact information.

search_books

Perform a comprehensive search for books by title, author, publisher, or subject across libraries.

search_libraries_by_book

Find which libraries hold a specific book by providing the book title, ISBN, or other identifiers.

get_book_detail

Retrieve detailed information for a book using its ISBN.

check_book_availability

Check in real-time whether a specific book is currently available for borrowing.

search_popular_books

List nationally or regionally popular loaned books to identify trending titles.

search_popular_books_by_library

Get the popular books specific to a given library.

get_hot_trend

Query trending books in real time across the system.

get_new_arrival_books

Fetch newly arrived books for each library.

get_monthly_keywords

Obtain keywords that encapsulate monthly reading trends.

get_usage_trend

Visualize borrowing/return trends by library over time.

get_reading_quantity

Compare reading activity across regions to gauge overall reading engagement.

search_items

Retrieve library-specific statistics for inventory and loans.

get_book_usage_analysis

Analyze usage patterns for a particular book across libraries.

get_mania_recommendations

Provide expert-level recommendations for highly engaged readers.

get_reader_recommendations

Suggest titles for voracious readers who complete many books.

get_book_keywords

Analyze core keywords associated with a book to improve search and discovery.

search_nearby_libraries

Find libraries near your current location with distance in kilometers.

search_library_codes

Look up library codes by library name for API usage.

get_region_codes

Obtain regional codes for nationwide segmentation.

get_detailed_region_codes

Get detailed region codes for finer geographic filtering.

get_subject_codes

Retrieve major subject classification codes (KDC) for book categorization.

get_detailed_subject_codes

Fetch detailed sub-classification codes for precise filtering.

get_library_info

Query comprehensive library information including holdings and activity.

get_popular_books_by_library

List popular books at a specific library.