find-a-book-mcp
An MCP server for searching and downloading books from Library Genesis, supporting EPUB, MOBI, PDF, and more through natural language queries.
README
find-a-book-mcp
An MCP (Model Context Protocol) server for searching and downloading books from Library Genesis. Works with Claude Code, Claude Desktop, and any MCP-compatible AI agent.
Tools
get_formats
Search for a book and return all available formats grouped by unique title + author. Instead of many duplicate rows, each book appears once with a list of all available formats (EPUB / MOBI / PDF / AZW3, etc.) and their MD5s. Fetches up to 75 results in parallel for comprehensive coverage.
Parameters:
query(string, required) — Book title, author, or keywords
Returns:
[
{
"title": "Harry Potter and the Philosopher's Stone",
"author": "J.K. Rowling",
"publisher": "Bloomsbury",
"year": "2015",
"language": "English",
"formats": [
{ "extension": "EPUB", "size": "920 kB", "size_bytes": 942080, "md5": "D7FF6458..." },
{ "extension": "MOBI", "size": "1.1 MB", "size_bytes": 1153433, "md5": "A3CC9012..." }
]
}
]
search_books
Search for books by title, author, or keywords. Returns 5 results per page with pagination support.
Parameters:
query(string, required) — Book title, author, or keywordspage(number, optional, default 1) — Display page number (5 results per page)extensions(string[], optional) — Filter by format, e.g.["epub", "pdf", "mobi"]
Returns:
{
"books": [
{
"title": "...",
"author": "...",
"publisher": "...",
"year": "2021",
"language": "Chinese",
"extension": "EPUB",
"size": "920 kB",
"size_bytes": 942080,
"md5": "D7FF6458..."
}
],
"displayPage": 1,
"totalDisplayPages": 10,
"totalCount": 50,
"hasMore": true,
"hasPrev": false
}
download_book
Download a book by its MD5 hash. Automatically tries multiple mirrors in order: libgen.li → libgen.rs → libgen.st → library.lol.
Parameters:
md5(string, required) — MD5 hash from search resultstitle(string, optional) — Book title, used for the filename
Returns: Local file path, filename, size in bytes, and format extension.
Installation
Claude Code / Claude Desktop
Add to your settings.json:
{
"mcpServers": {
"find-a-book": {
"command": "npx",
"args": ["-y", "find-a-book-mcp"]
}
}
}
Manual
git clone https://github.com/Xiaochengzi2048/find-a-book-mcp
cd find-a-book-mcp
npm install
node server.js
How It Works
- Search — Scrapes LibGen HTML (no API key or account required); tries
libgen.li→libgen.rs→libgen.stautomatically - Paginate — LibGen returns 25 results per server page; this server presents 5 per display page with
hasMore/hasPrevflags for navigation - Download — Two-step: fetch a one-time key from
ads.php, then download viaget.php; falls back through all mirrors thenlibrary.lolon failure - Save — File saved to system temp directory (
/tmp/) with a timestamped filename to avoid collisions
Notes
- No account or API key required
- Supports EPUB, MOBI, PDF, AZW3, FB2, DJVU, and more
size_bytesfield lets callers decide delivery method (e.g. direct send vs. link for large files)- Downloaded files are saved to
/tmp/— move them as needed - Mirror failures are logged to stderr for easy debugging
find-a-book-mcp(中文说明)
基于 Library Genesis 的 MCP 工具服务,支持搜索和下载电子书。兼容 Claude Code、Claude Desktop 及所有支持 MCP 协议的 AI Agent。
工具说明
get_formats — 按格式汇总
搜索一本书,将所有重复条目按「书名 + 作者」归并,每本书只出现一次,并列出所有可用格式(EPUB / MOBI / PDF / AZW3 等)及其 MD5。并行抓取最多 75 条结果,覆盖更全面。
参数:
query(必填)— 书名、作者或关键词
返回示例:
[
{
"title": "置身事内",
"author": "兰小欢",
"year": "2021",
"language": "Chinese",
"formats": [
{ "extension": "EPUB", "size": "2.3 MB", "size_bytes": 2411724, "md5": "..." },
{ "extension": "PDF", "size": "8.1 MB", "size_bytes": 8493466, "md5": "..." }
]
}
]
search_books — 搜索书籍
按书名、作者或关键词搜索,每页返回 5 条结果,支持翻页。
参数:
query(必填)— 书名、作者或关键词page(可选,默认 1)— 显示页码,每页 5 条extensions(可选)— 按格式过滤,如["epub", "mobi", "pdf"]
返回字段说明:
books— 当前页书籍列表,含书名、作者、出版社、年份、语言、格式、大小、size_bytes(字节数)、MD5totalCount— 总结果数(单页时精确,多页时为估算值)totalDisplayPages— 总显示页数hasMore/hasPrev— 是否有下一页 / 上一页
download_book — 下载书籍
通过 MD5 下载书籍,自动按顺序尝试多个镜像:libgen.li → libgen.rs → libgen.st → library.lol。
参数:
md5(必填)— 搜索结果中的 MD5title(可选)— 书名,用于文件命名
返回: 本地文件路径、文件名、字节大小、格式。
安装方式
Claude Code / Claude Desktop
在 settings.json 中添加:
{
"mcpServers": {
"find-a-book": {
"command": "npx",
"args": ["-y", "find-a-book-mcp"]
}
}
}
手动安装
git clone https://github.com/Xiaochengzi2048/find-a-book-mcp
cd find-a-book-mcp
npm install
node server.js
工作原理
- 搜索 — 抓取 LibGen 页面,无需账号或 API Key;自动尝试
libgen.li→libgen.rs→libgen.st - 分页 — LibGen 每次返回 25 条,本服务每显示页展示 5 条,通过
hasMore/hasPrev驱动翻页 - 下载 — 两步流程:从
ads.php获取一次性 key,再通过get.php下载;所有镜像失败后自动切换到library.lol - 保存 — 文件存入
/tmp/,文件名含时间戳防冲突
注意事项
- 无需账号或 API Key
- 支持 EPUB、MOBI、PDF、AZW3、FB2、DJVU 等格式
size_bytes字段方便调用方判断发送方式(如小文件直发,大文件给链接)- 文件默认保存在
/tmp/,请自行移至目标位置 - 镜像失败时会写入 stderr,便于排查问题
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。