LL

lethain/library-mcp

效率工作流

本页由 AI 翻译,技术细节请以原文为准。 查看原文

91 stars 8 forks 质量 38 趋势 0

lethain/library-mcp 是从 https://github.com/lethain/library-mcp. 导入的 MCP 服务器候选

概览

lethain/library-mcp 是从 https://github.com/lethain/library-mcp. 导入的 MCP 服务器候选

概述(AI 翻译)

library-mcp 是一个用于交互的 MCP 服务器 Markdown 知识库。基本上,就是那些可能有也可能没有子文件夹的文件夹,包括 文件扩展名为.md,并以以下元数据开头:


标题:我的博客文章 标签:

  • 蟒蛇
  • 节目编排 网址:/my-blog-post

我的博客文章

昨天我梦见了…

当前版本的典型工作流程是 获取给定标签的近期内容,然后 讨论使用该标签:

获取带有“executive”标签的下50篇帖子, 那你告诉我该怎么处理这个问题 我遇到的是:…

你也可以按日期范围做同样的操作:

总结一下我过去一年写的博客文章。

你可能会合理地问:“为什么不直接上传整个博客 进入上下文窗口?“这个图书馆有两个地方 优于这种方法:

  1. 我的博客语料库比大多数模型目前的上下文窗口都要大得多。 此外,即使上下文窗口变得极其庞大,我写了很多 过去的作品都很平庸,所以省略它可能是一个特色。
  2. 我有多个不同的Markdown知识库,这让我能够 它们之间协同作战。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

library-mcp is an MCP server for interacting with Markdown knowledge bases. Basically, folders that may or may not have subfolders, that include files with .md extension and start with metadata like:

----
title: My blog post
tags:
- python
- programming
url: /my-blog-post
---

# My blog post
Yesterday I was dreaming about...

The typical workflow in the current verison is to retrieve recent content for a given tag, and then discuss using that tag:

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

You can also do the same but by date ranges:

Summarize the blog posts I wrote in the past year.

You might reasonably ask “why not just upload your entire blog into the context window?” and there are two places where this library outperforms that approach:

  1. My blog corpus is much larger than most model’s context windows today. Further, even if the context windows became exhaustively large, I wrote a lot of mediocre stuff in the past, so maybe omitting it’s a feature.
  2. I have a number of distinct Markdown knowledge bases, and this lets me operate across them in tandem.

Finally, this is a hobby project, intended for running locally on your laptop. No humans have been harmed using this software, but it does work pretty well!

Tools

This MCP server exposes these tools.

Content Search Tools

Tools for retrieving content into your context window:

  • get_by_tag - Retrieves content by tag
  • get_by_text - Searches content for specific text
  • get_by_slug_or_url - Finds posts by slug or URL
  • get_by_date_range - Gets posts published within a date range

Tag Management Tools

Tools for navigating your knowledge base:

  • search_tags - Searches for tags matching a query
  • list_all_tags - Lists all tags sorted by post count and recency

Maintenance Tools

Tools for dealing with running the tool:

  • rebuild - Rebuilds the content index, useful if you have added more content, edited existing content, etc

Setup / Installation

These instructions describe installation for Claude Desktop on OS X. It should work similarly on other platforms.

  1. Install Claude Desktop.

  2. Clone library-mcp into a convenient location, I’m assuming /Users/will/library-mcp

  3. Make sure you have uv installed, you can follow these instructions

  4. Go to Cladue Desktop, Setting, Developer, and have it create your MCP config file. Then you want to update your claude_desktop_config.json. (Note that you should replace will with your user, e.g. the output of whoami.

     cd /Users/will/Library/Application Support/Claude
     vi claude_desktop_config.json
    

    Then add this section:

     {
    
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →