Data4library MCP Server South Korea Library API
Access the MCP server for Korea's Library Information Naru API to search books, check loans, view reading stats, and find nearby public libraries via GPS.
npx -y @isnow890/data4library-mcpOverview
This MCP (Model Context Protocol) server provides a developer-friendly proxy to South Korea’s Library Information Naru API. It wraps library data and operations — book search, loan status checks, reading statistics, and GPS-based public library discovery — behind a consistent REST/MCP interface so client applications can integrate library services without talking directly to Naru.
The server is useful for building mobile apps, web portals, or backend services that need unified access to Korean public library data. It normalizes parameters, handles authentication to the upstream Naru API, and implements location-based search helpers (find nearby libraries by coordinates) to simplify common developer tasks.
Features
- Unified REST/MCP endpoints for:
- Book search (title, author, ISBN)
- Loan/status lookup for patrons
- Reading and usage statistics
- Nearby public library discovery via GPS
- Parameter normalization and paging
- Example client-ready JSON responses suitable for use with MCP-aware tools
- Lightweight deployment: runs locally or in containers
- Useful for location-aware apps and library search integrations
Installation / Configuration
Clone the repository and install dependencies (Node.js example). Replace environment values with credentials you obtain from the library/Naru authority.
- Clone and install
- Create a .env file (example)
PORT=3000
NODE_ENV=production
NARU_API_KEY=your_naru_api_key_here
DEFAULT_RADIUS=5000 # meters
- Run the server
# development
# production
- Docker (optional)
# docker-compose.yml (example)
version: '3'
services:
mcp-server:
image: your-registry/data4library-mcp:latest
ports:
- "3000:3000"
environment:
- PORT=3000
- NARU_API_KEY=your_naru_api_key_here
Configuration notes:
- NARU_API_KEY is required to forward requests to the upstream Library Information Naru API.
- PORT controls the listening port; change as needed for your environment.
- DEFAULT_RADIUS sets a fallback search radius for GPS-based queries.
Available Resources
- GitHub repository: https://github.com/isnow890/data4library-mcp
- MCP-compatible endpoints (documented below)
- Example client scripts and curl snippets in the repo to get started quickly
API Endpoints (Common)
| Endpoint | Method | Description | Parameters |
|---|---|---|---|
| /search/books | GET | Search books by title, author, ISBN | q (query), isbn, page, size |
| /loans | POST | Check patron loan status | libraryCode, patronId, secret (or token) |
| /reading/stats | GET | Retrieve reading or circulation stats | libraryCode, startDate, endDate |
| /libraries/nearby | GET | Find public libraries near GPS coordinates | lat, lng, radius (meters) |
Note: Parameter names may be normalized from upstream Naru API formats. Authentication to the server can be implemented per your deployment (API keys, tokens).
Use Cases and Examples
Example 1 — Book search (title):
Example response (abridged):
Example 2 — Check loans for a patron:
Response:
Example 3 — Find nearby public libraries:
Response:
Tips for Developers
- Cache common search results to reduce calls to the upstream API and improve latency.
- Respect upstream rate limits and implement retry/backoff.
- For sensitive patron operations (loan checks), use HTTPS and secure credential storage; consider token exchange rather than passing raw secrets.
- Use the DEFAULT_RADIUS environment variable for consistent proximity defaults in mobile apps.
If you need deeper integration details (data shapes, paging rules, or MCP specifics), consult the repository README and the upstream Naru API documentation linked in the project.