book-teardown-mcp
Enables deep structural analysis of ebooks by extracting core conflicts, insights, mental models, and actionable items from PDF, Markdown, or text files.
README
Book Teardown MCP Server
一个基于 Model Context Protocol (MCP) 的电子书结构化深度拆解服务。
功能特性
- 支持多种电子书格式:PDF、Markdown、纯文本
- 支持本地文件、Base64 内容、远程 URL 输入
- 结构化拆解输出:
- 核心矛盾解析
- 底层逻辑梳理
- 关键洞察提取
- 心智模型提炼
- 可执行行动清单
- 金句卡片
- 批判性分析
- Mermaid 流程图
安装
npm install book-teardown-mcp
配置
环境变量
创建 .env 文件或设置以下环境变量:
# LLM API Keys(必需)
GLM5_API_KEY=your_glm5_api_key
KIMI_API_KEY=your_kimi_api_key
# 可选:自定义 API 端点
GLM5_BASE_URL=https://open.bigmodel.cn/api/paas/v4
KIMI_BASE_URL=https://api.moonshot.cn/v1
# 可选:鉴权配置
SKILL_KEY=your_skill_key
SKILL_VERIFY_URL=https://api.skillmarket.io/v1/verify
SKIP_AUTH=true # 跳过鉴权验证
使用方式
作为 MCP Server 使用
在 Claude Desktop 或其他 MCP 客户端中配置:
{
"mcpServers": {
"book-teardown": {
"command": "npx",
"args": ["book-teardown-mcp"],
"env": {
"GLM5_API_KEY": "your_glm5_api_key",
"KIMI_API_KEY": "your_kimi_api_key"
}
}
}
}
命令行使用
# 构建项目
npm run build
# 启动 MCP Server
npm start
# 开发模式
npm run dev
MCP Tool 说明
book_teardown
对电子书进行结构化深度拆解。
输入参数:
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| file_path | string | 否* | 本地文件路径(PDF、Markdown 或 TXT) |
| file_content | string | 否* | Base64 编码的文件内容 |
| file_url | string | 否* | 文件的远程 URL |
| user_intent | string | 否 | 用户的阅读意图 |
| user_role | string | 否 | 用户角色(ceo/manager/student/investor/creator/other) |
| output_format | string | 否 | 输出格式(full/essentials) |
| include_mermaid | boolean | 否 | 是否包含 Mermaid 图表 |
*必须提供 file_path、file_content 或 file_url 之一
示例调用:
{
"file_path": "/path/to/book.pdf",
"user_intent": "学习商业策略",
"user_role": "manager",
"output_format": "full",
"include_mermaid": true
}
输出结构
拆解报告包含以下部分:
- 书籍信息 - 标题、作者、拆解日期
- 核心矛盾 - 书籍的核心冲突及其解决路径
- 底层逻辑 - 核心概念、解释和证据
- 关键洞察 - 分类整理的洞察点
- 心智模型 - 可复用的思维框架
- 行动清单 - 优先级排序的执行项
- 金句摘录 - 可分享的引用
- 批判性分析 - 局限性、对立观点、作者盲点
- 可交付物 - Mermaid 图表、行动检查清单
开发
项目结构
src/
├── auth/ # 鉴权模块
├── core/ # 核心业务逻辑
│ ├── classifier.ts # 识别层
│ ├── teardown.ts # 主拆解层
│ ├── refiner.ts # 批判层
│ ├── self-correction.ts # 自我校验
│ ├── fusion.ts # 融合层
│ └── pipeline.ts # 流程编排
├── deliverables/ # 可交付物生成
├── llm/ # LLM 客户端
├── operators/ # 算子加载器
├── parsers/ # 文件解析器
├── prompts/ # Prompt 模板
├── tools/ # MCP Tool 定义
└── types/ # 类型定义
运行测试
# 运行所有测试
npm test
# 监听模式
npm run test:watch
构建
npm run build
技术栈
- TypeScript
- Model Context Protocol SDK
- Vitest (测试框架)
- pdf-parse (PDF 解析)
- Axios (HTTP 客户端)
许可证
ISC
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.