library-mcp是一个用于与 Markdown 知识库交互的 MCP 服务器。它包含一个文件夹,该文件夹可能有或没有子文件夹,包含以.md为扩展名的文件,并以如下元数据开头:
当前版本的典型工作流程是检索给定标签的最新内容,然后讨论使用该标签:
您也可以按日期范围执行相同操作:
您可能会合理地问“为什么不直接将整个博客上传到上下文窗口?”并且该库在两个方面优于这种方法:
我的博客语料库比目前大多数模型的上下文窗口要大得多。此外,即使上下文窗口变得非常大,我过去也写了很多平庸的东西,所以也许省略它也是一个特点。
我有许多不同的 Markdown 知识库,这使我可以同时操作它们。
最后,这是一个业余项目,旨在在您的笔记本电脑上本地运行。目前为止,还没有人因使用该软件而受到伤害,但它确实���行良好!
工具
该 MCP 服务器公开了这些工具。
内容搜索工具
用于将内容检索到上下文窗口中的工具:
get_by_tag- 通过标签检索内容get_by_text- 搜索内容中的特定文本get_by_slug_or_url- 通过 slug 或 URL 查找帖子get_by_date_range- 获取在某个日期范围内发布的帖子
标签管理工具
浏览知识库的工具:
search_tags- 搜索与查询匹配的标签list_all_tags- 列出按帖子数和新近度排序的所有标签
维护工具
处理运行该工具的工具:
rebuild- 重建内容索引,如果您添加了更多内容、编辑了现有内容等,则很有用
设置/安装
这些说明描述了在 OS X 上安装Claude Desktop的方法。它在其他平台上应该可以类似地工作。
安装Claude Desktop 。
将library-mcp克隆到一个方便的位置,我假设是
/Users/will/library-mcp确保你已经安装了
uv,你可以按照这些说明进行操作前往 Cladue Desktop,然后依次选择“设置”、“开发者”,并让其创建你的 MCP 配置文件。之后,你需要更新
claude_desktop_config.json文件。(注意,你应该将will替换为你的用户,例如whoami的输出。)cd /Users/will/Library/Application Support/Claude vi claude_desktop_config.json然后添加此部分:
{ "mcpServers": { "library": { "command": "uv", "args": [ "--directory", "/Users/will/library-mcp", "run", "main.py", "/Users/will/irrational_hugo/content" ] } } }关闭 Claude 并重新打开它。
它应该可以工作...
local-only server
The server can only run on the client's local machine because it depends on local resources.
MCP 服务器可与 Markdown 知识库进行交互,允许用户通过标签、文本、URL 或日期范围从本地 markdown 文件中搜索和检索内容。
Related MCP Servers
- Asecurity-licenseAqualityMCP server for collecting code from files and directories into a single markdown document.Last updated -9MIT License
- Asecurity-licenseAqualityA powerful MCP server for fetching and transforming web content into various formats (HTML, JSON, Markdown, Plain Text) with ease.Last updated -41,01737MIT License
- -security-license-qualityAn MCP server that enables searching and retrieving content from Confluence documentation systems, providing capabilities for both document searches and full page content retrieval.Last updated -1
- Asecurity-licenseAqualityAn MCP server that fetches and converts Deepwiki documentation into Markdown, allowing users to crawl pages from deepwiki.com repositories and access them in different output formats.Last updated -12,1541,015MIT License