home / mcp / library mcp server
MCP server for operating on Markdown knowledge bases
Configuration
View docs{
"mcpServers": {
"lethain-library-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/you/library-mcp",
"run",
"main.py",
"/Users/you/content"
]
}
}
}library-mcp is an MCP server that lets you interact with Markdown knowledge bases organized in folders containing .md files with YAML-style metadata. It enables you to retrieve recent content by tag or date range and discuss or summarize that content within an MCP-enabled client environment. This approach is well suited for working with large Markdown collections locally, across multiple knowledge bases, without uploading everything to a single context window.
You use an MCP client to connect to library-mcp and perform content queries or maintenance actions. Practical workflows include getting recent posts by a tag, then asking the system for recommendations or insights based on that subset, or summarizing posts within a specific date range. You can combine multiple queries to build a focused context before asking for analysis or decision support.
Prerequisites: you need a runtime capable of hosting an MCP server and access to a CLI toolchain that your chosen MCP client supports.
Clone the project to a local directory. Then install dependencies if necessary and start the server according to its runtime requirements.
# 1) Clone the project to a local path
git clone https://example.com/owner/library-mcp.git
# 2) Change to the project directory
cd library-mcp
# 3) Install dependencies if there is a package manifest (example shown for a typical Python setup)
pip install -r requirements.txt
# 4) Start the MCP server using the provided runtime command
uv --directory /path/to/library-mcp run main.py /path/to/contentConfiguration example for running the MCP server locally is shown below. It runs the server using the uv runtime, pointing to a content directory that contains your Markdown files with metadata. Use the exact paths that fit your environment.
{
"mcpServers": {
"library": {
"command": "uv",
"args": [
"--directory",
"/Users/you/library-mcp",
"run",
"main.py",
"/Users/you/content"
]
}
}
}Retrieves content by tag from the knowledge base to bring relevant Markdown posts into your context window.
Searches content for specific text to locate relevant posts or passages.
Finds posts by slug or URL for precise retrieval.
Gets posts published within a specified date range.
Searches for tags matching a query to discover related topics.
Lists all tags sorted by post count and recency.
Rebuilds the content index to incorporate new or edited Markdown files.