NLB Singapore Library MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
nlb-mcp
Unofficial FastMCP server for NLB Singapore Library Catalogue (availability + title search), implemented in Python.
What’s inside
Language: Python 3.11+
Framework: FastMCP (Python), httpx (HTTP), pydantic-settings (env), tenacity (retry)
Tools (MCP):
health_check– validate env + startup readiness.search_titles– keyword search over BRN/ISBN/Title/Author/Subject.search_titles_advanced– fielded search with pagination/sorting.availability_by_title– branch-level availability for a title/ISBN/BID.
Related MCP server: Wake County Public Library
Project layout
nlb_mcp/
config.py # env validation (API keys, base URL, timeout)
http_client.py # httpx helper with retry/timeout
nlb_client.py # thin NLB REST client wrappers
models.py # lightweight normalized response shapes
server.py # FastMCP server + tool registration (with basic logging)
help/
nlb-swagger.json # upstream API spec for referenceSetup
Create a virtualenv and install deps:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtEnvironment:
NLB_API_KEY=your_api_key
NLB_APP_CODE=your_app_code
# optional
NLB_API_BASE=https://openweb.nlb.gov.sg/api/v2/Catalogue
REQUEST_TIMEOUT_MS=10000Run locally:
fastmcp run nlb_mcp/server.py:create_serverFastMCP Cloud entrypoint
Preferred:
nlb_mcp/server.py:create_serverDirect object exports:
nlb_mcp/server.py:server(aliasesmcp,app) FastMCP Cloud can point atnlb_mcp/server.py:create_server; it will handle OAuth2 for users. This server only uses NLBX-Api-Key/X-App-Codefrom env.
Auth model
Client/user auth is handled by FastMCP’s built-in OAuth2 provider; this server does not add another layer of user auth.
NLB API authentication uses env-provided keys only; never accept them from user input or log them.
For per-user quotas/auditing, rely on FastMCP identity context when available.
Notes / TODO
If you want stricter schemas, consider pydantic models for tool inputs/outputs.
Add caching/rate limits if upstream limits are tight; httpx + tenacity already retry transient errors.
Logging uses stdlib
logging(logger namenlb_mcp) with secret redaction; extend as needed for metrics or structured logs.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search the Dutch book catalog (2M+ titles, daily updates): natural language, ISBN, new releases.
Search books and authors across Open Library, the Internet Archive open catalog.
Search 7,400+ libraries across Japan, find which one holds a book, and browse NDC classification.
Read-only search and retrieval of published books, articles and authors, with public catalog links.
Related MCP Servers
- AlicenseCqualityCmaintenanceProvides comprehensive access to South Korea's National Library information system, enabling searches across 1,000+ public libraries, real-time book availability checks, borrowing trends, and location-based library discovery.2729 npmMIT
- FlicenseAqualityDmaintenanceEnables searching the Wake County Public Library catalog and all NC Cardinal libraries, returning book details including title, author, format, availability status, and direct catalog links.1-
- AlicenseNot gradedqualityBmaintenanceEnables searching for books by title, author, or keyword, retrieving edition details by ISBN, and accessing author profiles and canonical work records through the Open Library API.93 npmMIT
- AlicenseAqualityBmaintenanceEnables users to find books by keyword, ISBN, or author and check which branches hold copies of them and whether those copies are currently available for loan or when they are due back. Currently covers Shanghai's interlinked public library network of 900+ locations, with a design open to additional cities.3Apache 2.0