ndl-search-mcp
Searches bibliographic metadata published via OpenSearch, enabling title and author queries against the NDL Search API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ndl-search-mcp 夏目漱石の『吾輩は猫である』の書誌情報を探して"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ndl-search-mcp
国立国会図書館サーチの公式APIを参照する読み取り専用のMCPサーバーです。Python 3.12以上とuv(0.13.4で検証)を使います。上流APIのキー設定は不要です。
MCPクライアント設定
GitHubリポジトリへのアクセス権がある環境でクローンします。
git clone https://github.com/koizumikento/ndl-search-mcp.git
cd ndl-search-mcp
uv sync --lockedクライアントの設定に、クローン先の絶対パスを指定します。
{
"mcpServers": {
"ndl-search-mcp": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/ndl-search-mcp", "run", "--locked", "ndl-search-mcp"]
}
}
}Related MCP server: mcp-cinii
ツール
ツール | 用途 |
| タイトル・著者で書誌を検索 |
OpenSearchで公開されている書誌メタデータを検索します。利用目的と提供元に応じて申請や許諾が必要な場合があります。
CLI
uv run ndl-search-mcp search-bibliography --title "源氏物語" --limit 1結果は標準出力にUTF-8のJSONで出力します。コマンドの引数は uv run ndl-search-mcp search-bibliography --help で確認できます。
Pythonライブラリ
パッケージをインストールしたPython環境で、下記の非同期関数を直接呼び出せます。
import asyncio
from ndl_search_mcp import search_bibliography
result = asyncio.run(search_bibliography(title="源氏物語", limit=1))
print(result)公開関数 search_bibliography を利用できます。イベントループがある環境では、関数を直接 await します。
出典と利用条件
コードはMIT Licenseです。取得するデータの権利と利用条件は、API提供元と各データ提供機関の定めに従います。公式API仕様 · 利用案内
開発
uv sync --locked
uv run ruff check .
uv run ty check
uv run pytest
uv buildAvailable Tools
1 toolsearch_bibliographyBRead-onlyIdempotent
Find bibliographic records by title, author, or both. Start is one-based.
Inputs: limit, start, title, creator. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion or misselection between tools. Any search request maps unambiguously to search_bibliography.
The single name follows a clear verb_noun snake_case pattern (search_bibliography), matching the convention implied by its description. No competing conventions exist to conflict.
A one-tool server is too thin for a bibliographic search service; only a single lookup operation is exposed. Reasonable scope would include at least record retrieval or listing tools.
The surface covers only search by title/author, with no way to fetch a full record by identifier, list available fields, or page results beyond a numeric Start. Agents hitting a record will have no follow-up operation to retrieve details.
Maintenance
Related MCP Connectors
Read-only search and retrieval of published books, articles and authors, with public catalog links.
National Diet Library catalogue search.
Search 7,400+ libraries across Japan, find which one holds a book, and browse NDC classification.
Search a catalog of 1.7 million books and find books by mood, vibe, pace or genre. Read-only.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables natural language search of Japan's National Diet Library bibliographic database via Claude Desktop, allowing users to find books and academic materials using intuitive Japanese queries.6MIT
- AlicenseAqualityDmaintenanceEnables searching CiNii Research for academic articles, books, grants, and research data, and retrieving metadata for individual items.2MIT
- AlicenseAqualityBmaintenanceMCP server for searching the National Diet Library of Japan (NDL Search), enabling Japanese-script bibliographic and article searches with rate limiting and attribution.61MIT
- 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.277 npmMIT