get_by_tagLABSCO SUMMARY
Retrieval instead of upload, for a corpus bigger than the window.
The author's own reason is the useful one: a long-running blog does not fit in a context window, and even if it did, the weaker half is not worth including. Tag and date retrieval let you pull the fifty posts that bear on a question and discuss those.
What it is
An MCP server over folders of Markdown files whose front matter carries title, tags and url, such as a personal blog or a set of notes. It retrieves the relevant posts into the context window instead of uploading the whole corpus.
What you get
- Content retrieved by tag, in batches you choose (get_by_tag)
- The corpus searched for specific text (get_by_text)
- A post found by slug or URL (get_by_slug_or_url)
- Everything published inside a date range (get_by_date_range)
- The tag vocabulary navigated: tags matching a query, or all tags sorted by post count and recency (search_tags, list_all_tags)
- Several separate knowledge bases used together
Requirements
uv, and a local folder of .md files whose front matter carries title, tags and url. The setup documented is a clone run under Claude Desktop on macOS.
Setup effort
Follow the published steps — Install Claude Desktop (https://claude.ai/download)
USE CASES
Thinking through a problem with what you already wrote about it
Pull the recent posts under that tag, then discuss the problem against them.
Summarising a year of your own writing
Retrieve everything inside the date range and work from that set.
Finding the post you half remember
Search the text, or go straight to it if you know the slug.
Working out what a knowledge base actually covers
List the tags by post count and recency, and search the ones that look close.
Drawing on two knowledge bases at once
The same tag retrieval runs across the separate folders you point it at.
7 tools
Listed in project docs. Your client may show a different list.
get_by_textget_by_slug_or_urlget_by_date_rangesearch_tagslist_all_tagsrebuildBEFORE YOU INSTALL
What to know first
Tools you get
7 tools named in the project's documentation.
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
Install Claude Desktop (https://claude.ai/download)
Clone library-mcp (https://github.com/lethain/library-mcp) into a convenient location
Make sure you have uv installed
In Claude Desktop, Settings > Developer, have it create your MCP config file, then edit claude_desktop_config.json (in ~/Library/Application Support/Claude) and add the mcpServers section below, with --directory set to your clone and the last argument set to your own folder of Markdown files
Close Claude and reopen it
MCP Clients
Any MCP client
{
"mcpServers": {
"library": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_LIBRARY_MCP>",
"run",
"main.py",
"<YOUR_PATH_TO_MARKDOWN_FOLDER>"
]
}
}
}