Skip to main content
Glama

Library MCP

by lethain

library-mcp是一个用于与 Markdown 知识库交互的 MCP 服务器。它包含一个文件夹,该文件夹可能有或没有子文件夹,包含以.md为扩展名的文件,并以如下元数据开头:

---- title: My blog post tags: - python - programming url: /my-blog-post --- # My blog post Yesterday I was dreaming about...

当前版本的典型工作流程是检索给定标签的最新内容,然后讨论使用该标签:

Get the next 50 posts with tag "executive", then tell me what I should do about this problem I am running into: ...

您也可以按日期范围执行相同操作:

Summarize the blog posts I wrote in the past year.

您可能会合理地问“为什么不直接将整个博客上传到上下文窗口?”并且该库在两个方面优于这种方法:

  1. 我的博客语料库比目前大多数模型的上下文窗口要大得多。此外,即使上下文窗口变得非常大,我过去也写了很多平庸的东西,所以也许省略它也是一个特点。
  2. 我有许多不同的 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的方法。它在其他平台上应该可以类似地工作。

  1. 安装Claude Desktop
  2. library-mcp克隆到一个方便的位置,我假设是/Users/will/library-mcp
  3. 确保你已经安装了uv ,你可以按照这些说明进行操作
  4. 前往 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" ] } } }
  5. 关闭 Claude 并重新打开它。
  6. 它应该可以工作...
-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

MCP 服务器可与 Markdown 知识库进行交互,允许用户通过标签、文本、URL 或日期范围从本地 markdown 文件中搜索和检索内容。

  1. 内容搜索工具
    1. 标签管理工具
      1. 维护工具
        1. 设置/安装

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            MCP server for collecting code from files and directories into a single markdown document.
            Last updated -
            2
            4
            Python
            MIT License
          • A
            security
            A
            license
            A
            quality
            A powerful MCP server for fetching and transforming web content into various formats (HTML, JSON, Markdown, Plain Text) with ease.
            Last updated -
            4
            146
            12
            TypeScript
            MIT License
            • Apple
            • Linux
          • A
            security
            A
            license
            A
            quality
            An MCP server that enables users to download webpages as markdown files using r.jina.ai service, with features for configurable download directories and automatic date-stamped filenames.
            Last updated -
            5
            2
            25
            JavaScript
            MIT License
            • Linux
            • Apple
          • -
            security
            A
            license
            -
            quality
            A Python-based MCP server that crawls websites to extract and save content as markdown files, with features for mapping website structure and links.
            Last updated -
            1
            Python
            MIT License

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/lethain/library-mcp'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server