Get the FREE Ultimate OpenClaw Setup Guide →

data4library

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

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio isnow890-data4library-mcp npx -y @isnow890/data4library-mcp \
  --env LIBRARY_API_KEY="your-api-key"

How to use

The data4library-mcp server wraps the Data4Library API provided by the National Library of Korea to expose a comprehensive set of tools for public library data. It includes capabilities for searching libraries and books, checking real-time availability, analyzing trends and usage, obtaining new arrivals, and generating personalized recommendations. You can chain tools to perform complex queries (for example, locate nearby libraries, then fetch new arrivals or popular books at those libraries), and all calls validate inputs and return structured results suitable for downstream AI use cases. Typical workflows include: searching for libraries by region or name, performing a unified book search by title/author/publisher/subject, retrieving detailed book information by ISBN, and getting real-time availability. There are also trend and statistics tools for insights like popular books by library, usage trends, and regional reading metrics. To use the server in Claude Desktop or similar tooling, configure an MCP server entry that points to the data4library-mcp package so your assistant can invoke the 25+ wrapped endpoints with consistent input/output formats.

How to install

Prerequisites:

  • Node.js 18+
  • Data4Library API key (LIBRARY_API_KEY)

Option A: Installing via Smithery (recommended)

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

Configure Claude Desktop or Cursor AI to pass the API key, for example in the environment variable block:

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

Option B: NPX installation (manual)

Steps:

# Install via NPX (recommended for quick start)
npx -y @isnow890/data4library-mcp

Claude Desktop setup (example):

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

Option C: Local install and build (for development or customization)

Step 1: Clone and build

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

Step 2: Claude Desktop configuration after build

{
  "mcpServers": {
    "data4library-mcp": {
      "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"
      }
    }
  }
}

Notes:

  • After building, ensure the dist folder contains the compiled server entry point.
  • The LIBRARY_API_KEY must be provided for all environments using the MCP server.

Additional notes

Tips and common issues:

  • Ensure you have a valid API key from data4library.kr and set LIBRARY_API_KEY in your environment before starting the MCP server.
  • If you encounter rate limits, consider registering your server IP with the API provider to increase the daily quota.
  • In Smithery setups, the installer will wire up the necessary environment variables automatically when you provide the API key through the deployment UI.
  • For local deployments, always run npm run build after pulling new changes to generate the dist folder used by the runtime entry point.
  • The MCP wrapper exposes 25+ endpoints; consult the English docs for endpoint mapping and input schemas to ensure proper request formatting.
  • Use the provided examples to configure Claude Desktop or Cursor AI to pass environment variables and route calls to the correct endpoints.

Related MCP Servers

Sponsor this space

Reach thousands of developers