Skip to main content

mcp_library_search

PyPI version

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

支持情况

城市 标识 状态 数据源
上海 shanghai ✅ 已接入 上海中心图书馆"一卡通"总分馆体系(900+ 网点,含地铁站 24 小时自助机)
广州 guangzhou ✅ 已接入 广州图书馆(图创 Interlib)
杭州 hangzhou ✅ 已接入 杭州图书馆+浙江图书馆双源合并(同一本书跨馆归并成一条结果)
深圳 shenzhen ✅ 已接入 深圳图书馆之城统一平台(自研 JSON API,167 馆)
天津 tianjin ✅ 已接入 天津图书馆等三源合并(主馆+少儿馆+中新友好图书馆,同一本书跨馆归并成一条结果)
重庆 chongqing ✅ 已接入 重庆 InDigLib 集群数字图书馆
合肥 hefei ✅ 已接入 安徽省图书馆+合肥市图书馆双源合并(同一本书跨馆归并成一条结果)
南京 nanjing ✅ 已接入 金陵图书馆+12 区馆联合目录 + 南京图书馆(江苏省图)双源合并,馆藏到单册级;南图源走 Ex Libris ALEPH,有验证码墙
成都 chengdu ✅ 已接入 成都平原经济区联合目录(图创 Interlib pro2018)
宁波 ningbo ✅ 已接入 宁波市图书馆全市联合目录(图创 tcc-opac)
绍兴 shaoxing ✅ 已接入 绍兴市公共图书馆联合目录(图创 Interlib pro2018)
大连 dalian ✅ 已接入 大连地区网上联合目录(SirsiDynix iLink)
金华 jinhua ✅ 已接入 金华市图书馆(UILAS HTML OPAC)
江阴 jiangyin ✅ 已接入 江阴市图书馆(图创 Interlib,含农家书屋等 24H 网点)
温州 wenzhou ✅ 已接入 温州市图书馆(图创 Interlib,全市总分馆体系)
台州 taizhou ✅ 已接入 台州市图书馆(图创 Interlib pro2018,含地铁站点通借)
青岛 qingdao ✅ 已接入 青岛市公共图书馆联合目录(图创 Interlib,26 馆联合,检索走站点 Solr 通道)
无锡 wuxi ✅ 已接入 无锡市新吴区图书馆(图星 LibStar Find;市图书馆源预留未接入)
扬州 yangzhou ✅ 已接入 扬州市图书馆联盟联合目录(汇文 uopac,与南京金陵源同系统;站点 securitycam 反爬按静态挑战处理)
更多城市 — 欢迎提需求或贡献适配器 北京等因站点侧限制暂未接入,详见 docs/data-sources.md

安装

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,再用它查馆藏或详情。都带 region 与 city 两个定位参数:region 是地区标识(取域名后缀),默认 cn(中国);city 默认 shanghai。未接入的地区或城市会返回明确提示:

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

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

赞赏

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

支付宝收款码 微信收款码

致谢

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

Metadata

Release files for mcp-library-search 0.4.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.4.0
File Size Uploaded Provenance Actions
mcp_library_search-0.4.0.tar.gz 2.8 MB With provenance Details for mcp_library_search-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 2.9 MB

Release files / mcp_library_search-0.4.0.tar.gz

Download URL mcp_library_search-0.4.0.tar.gz
Size 2.8 MB
Tags Source
SHA-256 checksum
How to use checksums
7c11d23f70f3c27295f3a45858ab6ea10447db23d3a4c5a733b4ad231d3abb33
BLAKE2b-256 checksum
How to use checksums
2fbe08150107b248cfe29613f7f7e939419d679588cc47c39bf50ba9223ee347
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.4.0-py3-none-any.whl

Download URL mcp_library_search-0.4.0-py3-none-any.whl
Size 152.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
512bf2dcb5897dae6987afb1ffabe860a38e26b79b4936eb0606eb55a1f9c4ad
BLAKE2b-256 checksum
How to use checksums
47b08de76948b27ca1788eeceb149628b55a3b1852639afd5c82f00218bcac6a
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.4.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.4.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