shuge-mcp-server
Allows AI assistants to search and browse the Shuge ancient book library through its public WordPress REST API, retrieving book details, categories, tags, download links, and latest releases.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@shuge-mcp-server 帮我搜索《山海经》,并给出 PDF 下载链接"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
shuge-mcp-server
书格(shuge.org)MCP Server —— 让 AI 助手直接检索和浏览中国古籍数字图书馆。
书格是一个自由开放的在线古籍图书馆,收录 700+ 部高清古籍资源(PDF),涵盖经、史、子、集四部分类。本项目通过 Model Context Protocol 将书格的公开 API 封装为结构化工具,供 Claude Code、Claude Desktop 等 MCP 客户端调用。
功能
提供 7 个工具:
工具 | 功能 |
| 按关键词搜索古籍 |
| 获取单本古籍详情(HTML 自动清洗为纯文本) |
| 列出所有分类(四部分类、朝代等) |
| 按分类浏览古籍列表 |
| 获取标签列表 |
| 获取古籍 PDF 下载链接 |
| 获取最新发布的古籍 |
特性
HTML → 纯文本:自动清洗 WordPress 富文本,节省 token
分页支持:所有列表工具支持
page+per_page参数分类缓存:分类数据内存缓存 30 分钟
内容截断:超长内容优雅截断至 25000 字符
无需认证:书格 API 完全公开
Related MCP server: conceptio-search
安装
git clone https://github.com/Mocooa/shuge-mcp-server.git
cd shuge-mcp-server
npm install
npm run build注册到 Claude Code
claude mcp add shuge -- node /path/to/shuge-mcp-server/dist/index.js注册到 Claude Desktop
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"shuge": {
"command": "node",
"args": ["/path/to/shuge-mcp-server/dist/index.js"]
}
}
}使用示例
注册后重启客户端,即可用自然语言调用:
"搜索书格上的山海经"
"看看书格最近更新了什么古籍"
"列出书格的所有分类"
"帮我找到《本草纲目》的下载链接"
技术栈
TypeScript + Node.js
@modelcontextprotocol/sdk— MCP 协议 SDKstdio 传输(标准 MCP 接入方式)
原生
fetch(Node.js 内置)
数据来源
所有数据来自 书格 的公开 WordPress REST API。本项目仅作为 API 的结构化封装,不存储任何古籍内容。
License
MIT
Available Tools
7 toolsshuge_browse_categoryA
按分类 ID 浏览该分类下的古籍列表。先用 shuge_list_categories 获取分类 ID。
Inputs: category_id (required), page, per_page.
shuge_get_bookB
获取单本古籍的详细信息,包括清洗后的纯文本内容。
Inputs: id (required).
shuge_get_download_linksB
获取古籍的下载链接(PDF 文件)。返回该书所有可用版本的下载地址。
Inputs: id (required).
shuge_get_tagsA
获取书格古籍标签列表,用于发现主题和关联浏览。
Inputs: page, per_page.
shuge_latestB
获取书格最新发布的古籍列表。
Inputs: page, per_page.
shuge_list_categoriesA
列出书格所有古籍分类(四部分类、朝代、现代分类等)。结果会缓存 30 分钟。
Inputs: force_refresh.
shuge_searchA
按关键词搜索书格古籍。返回匹配的古籍列表(标题、摘要、链接等)。
Inputs: keyword (required), page, per_page.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have clearly distinct purposes: detail retrieval (get_book), discovery by keyword (search), by category (browse_category), by recency (latest), plus two taxonomy listings and a download-link fetcher. The only mild overlap is between list_categories and get_tags, since both surface taxonomy-like ID lists, but the descriptions (四部分类/朝代 vs. 主题标签) make the distinction workable.
All names share the shuge_ namespace prefix and 5 of 7 follow a verb_noun pattern (get_book, list_categories, browse_category, get_tags, get_download_links). shuge_latest is a bare noun/adjective and shuge_search is a bare verb with no object, which are minor deviations from the otherwise predictable scheme.
Seven tools is a well-scoped surface for a digital archive: one detail fetch, three list/browse entry points, two taxonomy helpers, and one asset-link tool. No tool looks redundant or filler, and nothing essential seems crammed in.
The lifecycle is mostly covered (discover via search/category/latest, inspect via get_book, download via get_download_links), but get_tags is a dead end: tags are listed for '关联浏览' yet there is no browse-by-tag tool analogous to browse_category. Search may partially compensate, but an agent following a tag cannot proceed.
Maintenance
Related MCP Connectors
MCP server for classical Chinese poetry: search poems by title, author, dynasty or verse, with full
Search and read ~250k pages of Chinese Buddhist texts from Xianmi Library (xianmi.co).
MCP server for classical Chinese texts: sentence lookup, source attribution and full-text search
CBETA MCP tools to search, browse and read Chinese Buddhist scripture, sutra, Tipitaka texts.
Related MCP Servers
- AlicenseBqualityDmaintenanceExposes 97 official Shanghai Library open data APIs and the Sou-Yun poetry database (1.99 million poems) as 12 MCP tools, covering genealogy, ancient books, calligraphy, historical buildings, and more. Enables MCP clients to query these datasets using natural language.1228 PyPI4MIT
- AlicenseAqualityBmaintenanceEnables AI agents to search 1m+ open-access papers, standards, textbooks, and legal documents, resolve identifiers such as RFCs, DOIs, and legal citations, download PDFs, and retrieve citations and metadata through MCP tools.9MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search a Zotero library, retrieve item metadata, and access full-text PDF contents through MCP tools.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search a personal reference library, retrieve complete item metadata, and read the full text of attached PDFs through MCP tools.-