Skip to main content
Glama
ndl-search-mcp

ndl-search-mcp

by koizumikento

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

ツール

ツール

用途

search_bibliography

タイトル・著者で書誌を検索

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 build

Available Tools

1 tool
search_bibliographyB
Read-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

    B3.3/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of confusion or misselection between tools. Any search request maps unambiguously to search_bibliography.

    Naming Consistency5/5

    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.

    Tool Count2/5

    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.

    Completeness2/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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.
      6
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables searching CiNii Research for academic articles, books, grants, and research data, and retrieving metadata for individual items.
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for searching the National Diet Library of Japan (NDL Search), enabling Japanese-script bibliographic and article searches with rate limiting and attribution.
      6
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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 npm
      MIT