Token导航 LogoToken导航TokenDH.com
Ebook MCP logo
搜索检索stdio官方级别未说明来源级核验

Ebook MCP

MCP Server

A MCP server that supports mainstream eBook formats including EPUB, PDF and more. Simplify your eBook user experience with LLM.

工具数

0

提示词数

0

GitHub Stars

365

资源数

0
PythonClaude搜索ClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

onebirdrocks

提供方

onebirdrocks

最后核验

2026/5/18 02:16

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run mcp dev src/ebook_mcp/main.py

详细介绍

](https://mseep.ai/app/onebirdrocks-ebook-mcp)

电子书MCP

电子书MCP是一个功能强大的模型上下文协议(MCP)服务器,用于处理电子书。建立在 模型上下文协议,它提供了一组标准化的API,用于LLM应用程序和电子书处理功能之间的无缝集成。目前支持EPUB和PDF格式。

用例和价值

电子书MCP通过与您的阅读材料进行自然语言对话,改变了您与数字图书的互动方式。它与Cursor和Claude等现代AI驱动的IDE无缝集成,使您能够:

  • 智能图书馆管理:只需问“显示我下载文件夹中的所有EPUB文件”或“在我的库中查找有关GenAI的书籍”
  • 互动阅读体验:自然地谈论你的书:

- “给我简要介绍一下《法学硕士工程师手册》” - “第三章涵盖了什么?” - “总结本书中关于RAG的要点”

  • 主动学习支持:通过AI驱动的互动增强您的学习:

- “根据第5章中的RAG概念创建一个测验” - “解释本章讨论的架构之间的差异” - “根据本节中的概念给我做实际练习”

  • 内容导航:使用自然语言查询轻松浏览您的书籍:

- “查找所有讨论快速工程的章节” - “显示有关微调的章节” - “带我去看关于矢量数据库的部分”

通过弥合传统电子书和人工智能功能之间的差距,Ebook MCP帮助读者通过直观、基于对话的互动从数字图书馆中提取更多价值。

快速演示-使用DeepSeek运行(请使用mcp客户端示例文件夹下的Claude/OpenAI检查所有示例)

Query:Please check all the epub books in my download folder. user id is onebird.
......

Query: Can you ask me a few questions to test my understanding of this book?

Answer: Sure! Here are 5 questions about Elon Musk by Walter Isaacson to test your understanding of the book. Please answer based on your knowledge — I’ll give feedback and add details after each response.

Question 1:
How did Musk’s childhood and family background shape his personality and career later in life?
(Hint: His relationship with his father, growing up in South Africa, etc.)

Question 2:
Zip2 and X.com (later PayPal) were Musk’s early startups. What problems did they solve? How did Musk eventually exit from these companies?
(Hint: Zip2’s business model, X.com’s merger with Confinity, etc.)

Question 3:
In 2008, both SpaceX and Tesla were on the verge of bankruptcy. How did Musk save these two companies?
(Hint: Falcon 1’s fourth launch, NASA contract, Tesla’s last-minute rescue, etc.)

Question 4:
What controversies surround Musk’s management style? What specific incidents in the book illustrate his “hardcore” or “extreme” work culture?
(Hint: Fremont factory’s “production hell,” Twitter layoffs, etc.)

Question 5:
What is Musk’s attitude toward Artificial Intelligence (AI)? Why did he simultaneously support both OpenAI and Neuralink, which seem to have conflicting goals?
(Hint: AI as an existential threat, brain-machine interface vision, etc.)

Please answer each question. I’ll provide feedback and additional details or correct any misunderstandings!
(If a question isn’t clear, feel free to ask me.)

Query:
Question 1: His father’s abusive attitude made him less empathetic towards others.
Question 2: Zip2 solved the problem of electronic maps and online yellow pages. X.com solved online payments.
Question 3: He secured a contract with NASA. Tesla solved its production problems by building a factory in China.
Question 4: I don’t know. Please answer for me.
Question 5: He believes open-source technology is necessary to ensure AI is safe and open.

Answer: Your answers have captured some key points from the book. Let me add details, correct some inaccuracies, and provide further background for Questions 4 and 5:

Question 1 — Correction & Supplement
Influence of His Father:
Musk's father, Errol, was indeed extremely harsh — for example, forcing young Elon to kneel and count grains of rice for hours. The book emphasizes that this emotional desensitization shaped Musk into an extremely goal-oriented person — indifferent to others’ suffering but obsessively committed to his goals.

Reverse Impact:
It’s not that Musk is incapable of empathy — it’s selective. For instance, he may treat employees coldly but personally study medical equipment for his son X’s health issues.

Question 2 — Correction & Supplement
Zip2:
Essentially an online Yellow Pages + map navigation service (helping newspapers go online). Musk wrote much of the early code himself and slept in the office. Eventually, Compaq acquired Zip2 for $307 million (Musk received $22 million).

X.com:
Not just online payments — it was Musk’s attempt to create a comprehensive financial platform (aiming to replace banks). Later merged with Confinity (the precursor of PayPal). Musk was ousted due to internal conflicts, but when eBay acquired PayPal, Musk earned $180 million.
(Note: Musk later bought back the domain X.com — it’s now Twitter’s parent company name).

Question 3 — Correction & Supplement
SpaceX:
In 2008, Falcon 1 succeeded on its fourth launch (after three failures drained their funds). Right after that, SpaceX secured a $1.6 billion NASA contract for cargo resupply — a lifeline for the company.

Tesla:
In 2008, Tesla survived through a $50 million investment from Daimler and a loan from the U.S. Department of Energy.
Building the Gigafactory in China (2019) came much later. In the early years, survival depended on the launch of Model S (2012) and Musk’s personal gamble — selling all his real estate to fund Tesla.

Question 4 — Explanation: Controversy Around His Management Style
“Hardcore” Culture:

At SpaceX/Tesla: Musk demanded employees work 80+ hours per week, even sleeping at the factory. ("If you’re not here, your replacement is.")

After acquiring Twitter: He immediately laid off 75% of staff and asked the remaining employees to sign a "hardcore commitment" — agreeing to long hours and high-intensity output.

Extreme Cases:

At the Fremont Factory: During the "production hell" of the Model 3, Musk slept on the production line and once yelled at employees calling them "worse than dogs" (he later apologized).

Firing Executives: Musk once fired a senior Tesla executive on the spot because the font size in their PowerPoint presentation wasn’t big enough.

Question 5 — Correction & Supplement
AI Threat Theory:
Musk believes that AI could destroy humanity ("more dangerous than nuclear weapons"). Therefore:

OpenAI: He initially supported it to promote safe, open-source AI (but left later due to disputes over control).

Neuralink: He aims to use brain-machine interfaces to merge humans with AI — to prevent humans from being left behind.

Contradictions:
While warning about AI risks, Musk is simultaneously pushing for Full Self-Driving (FSD) technology at Tesla and has founded xAI to research Artificial General Intelligence (AGI).

Overall Evaluation:
✅ You have captured the key events accurately, but the details need to be strengthened (such as timelines and specific figures).
🔍 Recommended areas for further study: Musk's multi-threaded management style (running five companies simultaneously) and his skill in media manipulation (governing through Twitter).

特性

EPUB支持

  • 提取元数据(标题、作者、出版日期等)
  • 摘录目录
  • 提取章节内容(带Markdown输出)
  • 批量处理EPUB文件

PDF支持

  • 提取元数据(标题、作者、创建日期等)
  • 摘录目录
  • 按页码提取内容
  • 按章节标题提取内容
  • Markdown输出支持
  • 批量处理PDF文件

安装

  1. 克隆存储库:
git clone https://github.com/yourusername/ebook-mcp.git
cd ebook-mcp
  1. 使用安装依赖项 uv:
uv pip install -e .

用法

以开发模式启动MCP服务器

在开发模式下运行服务器:

uv run mcp dev src/ebook_mcp/main.py

您可以访问http://localhost:5173/用于测试和调试目的 您还可以为测试安装检查器。

npx @modelcontextprotocol/inspector uv --directory . run src/ebook_mcp/main.py

在Prod模式下启动MCP服务器

运行服务器:

uv run src/ebook_mcp/main.py

在游标中配置MCP

在Cursor中添加以下配置

"ebook-mcp":{
            "command": "uv",
            "args": [
                "--directory",
                "/Users/onebird/github/ebook-mcp/src/ebook_mcp/",
                "run",
                "main.py"
            ]
        }

EPUB处理示例

# Get all EPUB files in a directory
epub_files = get_all_epub_files("/path/to/books")

# Get EPUB metadata
metadata = get_metadata("/path/to/book.epub")

# Get table of contents
toc = get_toc("/path/to/book.epub")

# Get specific chapter content (in Markdown format)
chapter_content = get_chapter_markdown("/path/to/book.epub", "chapter_id")

PDF处理示例

# Get all PDF files in a directory
pdf_files = get_all_pdf_files("/path/to/books")

# Get PDF metadata
metadata = get_pdf_metadata("/path/to/book.pdf")

# Get table of contents
toc = get_pdf_toc("/path/to/book.pdf")

# Get specific page content
page_text = get_pdf_page_text("/path/to/book.pdf", 1)
page_markdown = get_pdf_page_markdown("/path/to/book.pdf", 1)

# Get specific chapter content
chapter_content, page_numbers = get_pdf_chapter_content("/path/to/book.pdf", "Chapter 1")

api参考

EPUB API

get_all_epub_files(path: str) -> List[str]

获取指定目录中的所有EPUB文件。

get_metadata(epub_path: str) -> Dict[str, Union[str, List[str]]]

从EPUB文件获取元数据。

get_toc(epub_path: str) -> List[Tuple[str, str]]

从EPUB文件中获取目录。

get_chapter_markdown(epub_path: str, chapter_id: str) -> str

获取Markdown格式的章节内容。

PDF API

get_all_pdf_files(path: str) -> List[str]

获取指定目录中的所有PDF文件。

get_pdf_metadata(pdf_path: str) -> Dict[str, Union[str, List[str]]]

从PDF文件获取元数据。

get_pdf_toc(pdf_path: str) -> List[Tuple[str, int]]

从PDF文件中获取目录。

get_pdf_page_text(pdf_path: str, page_number: int) -> str

从特定页面获取纯文本内容。

get_pdf_page_markdown(pdf_path: str, page_number: int) -> str

从特定页面获取Markdown格式的内容。

get_pdf_chapter_content(pdf_path: str, chapter_title: str) -> Tuple[str, List[int]]

按章节标题获取章节内容和相应的页码。

依赖项

关键依赖关系包括:

  • ebooklib:EPUB文件处理
  • PyPDF2:基本的PDF处理
  • PyMuPDF:高级PDF处理
  • beautifulsoup4:HTML解析
  • html2text:HTML到Markdown的转换
  • pydantic:数据验证
  • fastmcp:MCP服务器框架

重要提示

  1. PDF处理依赖于文档的目录。如果TOC不可用,某些功能可能无法工作。
  2. 对于大型PDF文件,建议按页面范围处理,以避免一次加载整个文件。
  3. EPUB章节ID必须从目录结构中获得。

建筑

           ┌────────────────────────────┐
           │         Agent Layer        │
           │  - Translation Strategy    │
           │  - Style Consistency Check │
           │  - LLM Call & Interaction │
           └────────────▲─────────────┘
                        │ Tool Calls
           ┌────────────┴─────────────┐
           │        MCP Tool Layer     │
           │  - extract_chapter        │
           │  - write_translated_chapter│
           │  - generate_epub          │
           └────────────▲─────────────┘
                        │ System/IO Calls
           ┌────────────┴─────────────┐
           │     System Base Layer     │
           │  - File Reading          │
           │  - ebooklib Parsing      │
           │  - File Path Storage/Check│
           └────────────────────────────┘

贡献

我们欢迎问题和拉取请求!

有关最近更改的详细信息,请参阅 更改日志.md.

目录标签

目录标签

PythonClaude搜索research-and-data电子书处理本地部署智能阅读AI集成EPUB解析PDF解析

支持客户端

ClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP