Skip to main content

mcp_library_search

PyPI version

MCP server:查询城市图书馆的馆藏与可借状态——回答"这本书在哪些馆能借到"。

支持情况

城市 标识 状态 数据源
上海 shanghai ✅ 已接入 上海中心图书馆"一卡通"总分馆体系(900+ 网点,含地铁站 24 小时自助机)
广州 guangzhou ✅ 已接入 广州图书馆(图创 Interlib)
杭州 hangzhou ✅ 已接入 杭州图书馆(图创 Interlib)
深圳 shenzhen ✅ 已接入 深圳图书馆之城统一平台(自研 JSON API,167 馆)
天津 tianjin ✅ 已接入 天津图书馆等三源合并(主馆+少儿馆+中新友好图书馆,同一本书跨馆归并成一条结果)
重庆 chongqing ✅ 已接入 重庆 InDigLib 集群数字图书馆
更多城市 — 欢迎提需求或贡献适配器 —

安装

Claude Code

claude mcp add mcp-library-search -- uvx mcp_library_search

Claude Desktop

在 claude_desktop_config.json 里加:

"mcpServers": {
  "mcp-library-search": {
    "command": "uvx",
    "args": ["mcp_library_search"]
  }
}

改完重启桌面版。

使用

接入后提供 3 个 tool,查询链路为:先 search_books 按关键字找到 book_id,再用它查馆藏或详情。都带 city 参数(默认 shanghai,未接入的城市会返回明确提示):

tool 作用
search_books(keyword, city, page, limit) 按关键字(书名、ISBN、作者等)搜书,返回分页列表,每条带 book_id 和可借概况
find_book_availability(book_id, city, only_available) 查这本书在哪些馆有、是否可借,可借的馆排前面;only_available=False 时已借出的馆藏带预计归还时间(due_date)
get_book_detail(book_id, city) 查这本书的完整介绍(ISBN、索书号、内容简介)

典型用法:对 Claude 说"帮我查《三体》在哪个馆能借到" → 搜书拿到 book_id → 查各馆可借状态 → 就近推荐。

赞赏

如果这个项目帮到了你,欢迎打赏支持:

支付宝收款码 微信收款码

致谢

完整的第三方组件列表、归属与变更说明见 NOTICE。

Metadata

Release files for mcp-library-search 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-library-search 0.3.0
File Size Uploaded Provenance Actions
mcp_library_search-0.3.0.tar.gz 990.9 kB With provenance Details for mcp_library_search-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-library-search 0.3.0
File Interpreter ABI Platform Actions
mcp_library_search-0.3.0-py3-none-any.whl Python 3 none any Details for mcp_library_search-0.3.0-py3-none-any.whl

Total release size: 1.1 MB

Release files / mcp_library_search-0.3.0.tar.gz

Download URL mcp_library_search-0.3.0.tar.gz
Size 990.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5ecb6b57467ad4378ddccef63e3cafe1a1ba81b4d2ae330fa88f11513e66f55a
BLAKE2b-256 checksum
How to use checksums
6a2f2d4e133e5722cd78bbcb2a679925b51399e4b55881e4676318567bae86ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / mcp_library_search-0.3.0-py3-none-any.whl

Download URL mcp_library_search-0.3.0-py3-none-any.whl
Size 61.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74da69c617aec5c184a74ce17ac9664236102f01b8d3af60951c7a347b0444ee
BLAKE2b-256 checksum
How to use checksums
1a39b65be3d6ade9c9c5fcb84399326409bcf86c14723e52cec21dcf016fadd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Security for mcp-library-search 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_library_search-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page