Readwise MCP 增强版是一个全面的模型上下文协议(MCP)服务器,它将 Readwise Reader 的文档管理与 完整的 Readwise 高亮功能 相统一。该项目可与 Claude Desktop、Continue 以及任何兼容 MCP 的 AI 工具配合使用。它采用 TypeScript 构建,具备先进的文本处理能力、智能内容控制功能以及上下文优化响应机制。
Readwise MCP 增强版是首个统一的 MCP,它整合了以下功能:
它相当于官方的 Readwise MCP,但效率更高且功能更完整,可与所有 MCP 客户端兼容。
无需安装!任何 MCP 客户端都可以使用 npx 自动下载并运行该软件包。
npm install -g readwise-mcp-enhanced
git clone https://github.com/arnaldo-delisio/readwise-mcp-enhanced.git
cd readwise-mcp-enhanced
npm install
npm run build
// 对大型文档进行分页处理
readwise_list_documents({
withFullContent: true,
contentMaxLength: 5000,
contentStartOffset: 0,
contentFilterKeywords: ["machine learning", "AI"]
})
// 在文档和高亮内容中进行搜索
readwise_search_highlights({
textQuery: "productivity habits",
fieldQueries: [
{ field: "document_author", searchTerm: "James Clear" }
],
limit: 10
})
// 获取每日复习的间隔重复内容
readwise_get_daily_review()
// 搜索相关高亮内容以进行深入学习
readwise_search_highlights({
textQuery: "from daily review topics",
limit: 20
})
高级使用场景可参考文档中各个工具的详细配置和使用说明,根据具体需求灵活调整参数,以实现更强大的功能,如在搜索时结合更多的字段查询条件、在保存文档时设置更详细的元数据等。
readwise_save_document:可保存带有完整元数据控制的文档。{
"url": "https://example.com/article",
"tags": ["ai", "productivity"],
"location": "later",
"category": "article"
}
readwise_list_documents:⭐ 具备智能内容控制的增强版{
"withFullContent": true,
"contentMaxLength": 10000,
"contentStartOffset": 0,
"contentFilterKeywords": ["AI", "machine learning"],
"limit": 10
}
智能内容参数:
- contentMaxLength:限制每个文档的内容长度(默认值:50,000 个字符)。
- contentStartOffset:从特定位置开始提取内容(用于分页)。
- contentFilterKeywords:仅提取包含关键词的部分。
- 针对高成本操作提供性能警告。
readwise_update_document:可更新文档的元数据(标题、作者、摘要、位置等)。readwise_delete_document:可从阅读器库中删除文档。readwise_list_tags:可获取所有文档标签。readwise_topic_search:⭐ 具备人工智能驱动的文本处理功能的增强版
readwise_list_highlights:可列出带有高级过滤功能的高亮内容。{
"book_id": 12345,
"highlighted_at__gt": "2024-01-01T00:00:00Z",
"page_size": 100
}
readwise_get_daily_review:可获取间隔重复的高亮内容。{
"review_id": 168844911,
"highlights": [
{
"text": "Strategic wisdom quote...",
"title": "The Art of War",
"author": "Sun Tzu"
}
]
}
readwise_search_highlights:⭐ 支持特定字段查询的高级搜索{
"textQuery": "strategy tactics",
"fieldQueries": [
{
"field": "document_title",
"searchTerm": "Art of War"
}
],
"limit": 20
}
readwise_list_books:可获取带有高亮元数据的书籍。{
"category": "books",
"last_highlight_at__gt": "2024-01-01T00:00:00Z"
}
readwise_get_book_highlights:可获取特定书籍的所有高亮内容。{
"bookId": 53827741
}
readwise_export_highlights:可进行批量导出以进行分析和备份。{
"updatedAfter": "2024-01-01T00:00:00Z",
"includeDeleted": false
}
readwise_create_highlight:可手动添加带有元数据的高亮内容。{
"highlights": [
{
"text": "Important insight...",
"title": "Book Title",
"author": "Author Name",
"note": "My thoughts on this",
"category": "books"
}
]
}
在保持完整功能的同时,实现了 94% 的令牌减少:
| 工具 | 优化前 | 优化后 | 节省比例 |
|---|---|---|---|
| 列出高亮内容(32 项) | ~25,600 个令牌 | ~1,600 个令牌 | 94% |
| 每日复习(5 项) | ~5,000 个令牌 | ~400 个令牌 | 92% |
| 列出书籍(10 项) | ~8,000 个令牌 | ~600 个令牌 | 93% |
优化字段:
id、text、note、book_id。id、title、author、category、num_highlights。text、book、author、score。whatyou → what youfromdissatisfaction → from dissatisfactiontimeago → time ago// 无缝切换 API
v2 API: 高亮内容、书籍、每日复习、导出
v3 API: 阅读器文档、标签、搜索
READWISE_TOKEN 安全存储令牌。该系统实现了 API 的无缝切换,v2 API 负责处理高亮内容、书籍、每日复习和导出功能;v3 API 则用于处理阅读器文档、标签和搜索功能。这种设计使得不同类型的操作能够分别使用最合适的 API,提高了系统的效率和稳定性。
本项目采用 MIT 许可证。
本项目基于 edricgan/Readwise-Reader-MCP 构建,并进行了显著增强:
这代表了从基本文档管理到全面、可用于生产环境的 Readwise 平台的完整演进。 🚀