mcp_library_search
MCP server:查询城市图书馆的馆藏与可借状态——回答"这本书在哪些馆能借到"。
支持情况
| 城市 | 标识 | 状态 | 数据源 |
|---|---|---|---|
| 上海 | shanghai |
✅ 已接入 | 上海中心图书馆"一卡通"总分馆体系(900+ 网点,含地铁站 24 小时自助机) |
| 深圳 | shenzhen |
🔜 待接入 | — |
| 更多城市 | — | 欢迎提需求或贡献适配器 | — |
安装
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 → 查各馆可借状态 → 就近推荐。
致谢
- shanghai-library-book-search-python——上海图书馆检索能力的来源(Apache-2.0)。
完整的第三方组件列表、归属与变更说明见 NOTICE。
Metadata
Release files for mcp-library-search 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcp_library_search-0.1.0.tar.gz | 146.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_library_search-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 176.2 kB
Release files / mcp_library_search-0.1.0.tar.gz
| Download URL | mcp_library_search-0.1.0.tar.gz |
|---|---|
| Size | 146.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
baa796dbbf1d3a84cd666f174a8b1088a1f6741e0abe3d862398eb8248971a35
|
|
BLAKE2b-256 checksum How to use checksums |
f1ec339a36b66082fe7974cacf30ef7698d32b51fb8ef1741c16843e3165eb56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mcp_library_search-0.1.0-py3-none-any.whl
| Download URL | mcp_library_search-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af80e6f1d217c4b1c53b3a0ec4fee1c5431f67ab7a333ce98f28ea5138de1e7b
|
|
BLAKE2b-256 checksum How to use checksums |
8aa1a0db0f84efb51c5ef6301fc2fc56fda16f6443dfd035449e5b460f02863f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|