Skip to main content
Glama
fantlab-mcp

fantlab-mcp

by waldfalke

fantlab-mcp monorepo

MCP server for FantLab API focused on publisher normalization for book catalogs.

License model

This repository is source-available for non-commercial research and educational use. Commercial use is prohibited without separate permission. See LICENSE.

Note:

  • this is a non-commercial research license, not OSI open-source.

Related MCP server: mcp-bookbrainz

Monorepo layout

fantlab-mcp/
  packages/
    fantlab-mcp-python/
      src/fantlab_mcp/
  tests/
  scripts/
  docs/ (planned)

What it solves

  • Reliable publisher resolution via ISBN (primary path).

  • Fallback candidate search for noisy publisher names.

  • Batch mode for enrichment/patch workflows.

Tools

  • resolve_publishers_by_isbn(isbn)

  • search_publisher_candidates(name_raw, include_no_matches=false, max_candidates=10)

  • resolve_publisher_from_record(publisher_raw, isbn="", title="")

  • batch_resolve_publishers(records[])

Each tool returns explicit contract fields:

  • ok

  • confidence (high|medium|low|none)

  • evidence

  • error (if failed)

Install

pip install -e .

or from Git:

pip install "git+https://github.com/<your-org>/fantlab-mcp.git@v0.1.0"

Run

fantlab-mcp

Env vars:

  • FANTLAB_MCP_TRANSPORT (stdio by default)

  • FANTLAB_TIMEOUT_SEC (default 12)

  • FANTLAB_RETRIES (default 2)

  • FANTLAB_CACHE_TTL_SEC (default 43200)

MCP config example

{
  "mcpServers": {
    "fantlab": {
      "command": "fantlab-mcp",
      "env": {
        "FANTLAB_TIMEOUT_SEC": "12",
        "FANTLAB_RETRIES": "2",
        "FANTLAB_CACHE_TTL_SEC": "43200"
      }
    }
  }
}

Local smoke

python scripts/smoke_live.py

Development

python -m py_compile packages/fantlab-mcp-python/src/fantlab_mcp/*.py
python -m pytest

Notes

  • ISBN path is authoritative: search-editions -> edition/{id} -> creators.publishers.

  • Name-only search is fallback and should be treated as lower confidence.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables querying a curated book database using MCP tools to retrieve basic or detailed book information by ISBN or title, including batch lookups.
      1
      ISC
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides access to BookBrainz open book metadata, enabling search, lookup, and browsing of works, editions, authors, publishers, and series via natural language or direct tool calls.
      64 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      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.
      75 npm
      MIT