Skip to main content

Japanese Books MCP Server (jp-books-mcp)

PyPI version Python Version

A Model Context Protocol (MCP) server that provides tools to search Japanese books and retrieve rich metadata. It integrates search results from:

  1. books.or.jp (Japan Book Publishers Association)
  2. National Diet Library (NDL) Search (National Diet Library Search)

Features

  • Book Search: Query books on books.or.jp or the National Diet Library (NDL).
  • Rich Metadata Extraction: Retrieve full book descriptions, publishers, formats (size), pages, prices, publication dates, and cover image URLs.
  • Robust Schema: Data is validated and structured using Pydantic v2.

Tools

The server registers three tools:

1. jp_books_search

Searches for books on books.or.jp by title, author, publisher, or other keywords.

  • Arguments:
    • query (string, required): The search query (e.g., book title, author name, or keyword).
  • Returns: A list of search results including title, author, publisher, publish date, URL, and ISBN/Code.

2. ndl_books_search

Searches for books in the National Diet Library (NDL) Database using their OpenSearch API.

  • Arguments:
    • query (string, required): The search query.
  • Returns: A list of NDL catalog results including title, authors, publisher, publication date, NDL link, ISBN, price, and pages.

3. jp_books_get_details

Retrieves rich details and descriptions for a specific book from books.or.jp using its ISBN or internal code.

  • Arguments:
    • isbn (string, required): The 13-digit ISBN or JPRO book code.
  • Returns: Detailed book metadata including title, author list, publisher, description, cover image URL, size, pages, price, publish/release dates, and raw metadata.

Configuration

You can easily run this MCP server using uvx (part of the uv toolchain) or npx/pipx.

Claude Desktop Configuration

Add this to your claude_desktop_config.json:

Using uvx (Recommended)

{
  "mcpServers": {
    "jp-books-mcp": {
      "command": "uvx",
      "args": [
        "jp-books-mcp"
      ]
    }
  }
}

Using python (if installed globally or in a virtualenv)

{
  "mcpServers": {
    "jp-books-mcp": {
      "command": "python",
      "args": [
        "-m",
        "jp_books_mcp.server"
      ]
    }
  }
}

Cursor Configuration

To use it in Cursor:

  1. Go to Settings > Features > MCP.
  2. Click + Add New MCP Server.
  3. Set the details:
    • Name: jp-books-mcp
    • Type: command
    • Command: uvx jp-books-mcp

Development

To set up the project locally for development, make sure you have uv installed.

1. Clone the repository and install dependencies

git clone https://github.com/rmc8/jp_books_mcp.git
cd jp_books_mcp
uv sync

2. Running the server locally

uv run jp-books-mcp

3. Running tests and linting

# Code formatting and lint check
uv run ruff check src

# Type checking
uv run mypy src

License

This project is licensed under the MIT License. See the LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jp_books_mcp-0.1.3.tar.gz (50.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jp_books_mcp-0.1.3-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file jp_books_mcp-0.1.3.tar.gz.

File metadata

  • Download URL: jp_books_mcp-0.1.3.tar.gz
  • Upload date:
  • Size: 50.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for jp_books_mcp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c8fbaa4cfde5f3142f45700090732d86fbc590147d02c19e21fa2f5eb55bb693
MD5 87332b3cd30f94287ef9c5134f090ffc
BLAKE2b-256 679219da31733f8eb01049a54c6b9f47631c3c1f04a59cd9662e221b9d71d0fc

See more details on using hashes here.

File details

Details for the file jp_books_mcp-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: jp_books_mcp-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for jp_books_mcp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4c4f67f792984f9e5310889e2b071937365ae8d420826a5306d54a3a01f75ed7
MD5 df0a50b0da9854d5108ae44ffbddd712
BLAKE2b-256 8e20822da700aa989a3da04b527fded85dc80cf21fb94f4b61caad079f3c887c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page