doc-lib-mcp MCP server
A Model Context Protocol (MCP) server for document ingestion, chunking, semantic search, and note management.
Components
Resources
- Implements a simple note storage system with:
- Custom
note://URI scheme for accessing individual notes - Each note resource has a name, description, and
text/plainmimetype
- Custom
Prompts
- Provides a prompt:
- summarize-notes: Creates summaries of all stored notes
- Optional “style” argument to control detail level (brief/detailed)
- Generates prompt combining all current notes with style preference
- summarize-notes: Creates summaries of all stored notes
Tools
The server implements a wide range of tools:
- add-note: Add a new note to the in-memory note store
- Arguments:
name(string),content(string)
- Arguments:
- ingest-markdown: Ingest and chunk a markdown (.md) file
- Arguments:
path(string)
- Arguments:
- ingest-python: Ingest and chunk a Python (.py) file
- Arguments:
path(string)
- Arguments:
- ingest-openapi: Ingest and chunk an OpenAPI JSON file
- Arguments:
path(string)
- Arguments:
- ingest-html: Ingest and chunk an HTML file
- Arguments:
path(string)
- Arguments:
- ingest-html-url: Ingest and chunk HTML content from a URL (optionally using Playwright for dynamic content)
- Arguments:
url(string),dynamic(boolean, optional)
- Arguments:
- search-chunks: Semantic search over ingested content
- Arguments:
query(string): The semantic search query.top_k(integer, optional, default 3): Number of top results to return.type(string, optional): Filter results by chunk type (e.g.,code,html,markdown).tag(string, optional): Filter results by tag in chunk metadata.
- Returns the most relevant chunks for a given query, optionally filtered by type and/or tag.
- Arguments:
- delete-source: Delete all chunks from a given source
- Arguments:
source(string)
- Arguments:
- ingest-batch: Ingest and chunk multiple documentation files (markdown, OpenAPI JSON, Python) in batch
- Arguments:
paths(list of strings)
- Arguments:
- list-sources: List all unique sources (file paths) that have been ingested and stored in memory
- update-chunk-metadata: Update the metadata field for a chunk by id
- Arguments:
id(integer),metadata(object)
- Arguments:
- tag-chunks-by-source: Adds specified tags to the metadata of all chunks associated with a given source (URL or file path). Merges with existing tags.
- Arguments:
source(string),tags(list of strings)
- Arguments:
- list-notes: List all currently stored notes and their content.
Chunking and Code Extraction
- Markdown, Python, OpenAPI, and HTML files are split into logical chunks for efficient retrieval and search.
- The HTML chunker uses the
readability-lxmllibrary to extract main content first. - It then extracts block code snippets from
<pre>tags as dedicated “code” chunks. Inline<code>content remains part of the narrative chunks.
Semantic Search
- The
search-chunkstool performs vector-based semantic search over all ingested content, returning the most relevant chunks for a given query. - Supports optional
typeandtagarguments to filter results by chunk type (e.g.,code,html,markdown) and/or by tag in chunk metadata, before semantic ranking. - This enables highly targeted retrieval, such as “all code chunks tagged with ‘langfuse’ relevant to ‘cost and usage’”.
Metadata Management
- Chunks include a
metadatafield for categorization and tagging. - The
update-chunk-metadatatool allows updating metadata for any chunk by its id. - The
tag-chunks-by-sourcetool allows adding tags to all chunks from a specific source in one operation. Tagging merges new tags with existing ones, preserving previous tags.
Configuration
[TODO: Add configuration details specific to your implementation]
Quickstart
Install
Claude Desktop
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Development/Unpublished Servers Configuration
``` "mcpServers": { "doc-lib-mcp": { "command": "uv", "args": [ "--directory", "/home/administrator/python-share/documentation_library/doc-lib-mcp", "run", "doc-lib-mcp" ] } } ```Published Servers Configuration
``` "mcpServers": { "doc-lib-mcp": { "command": "uvx", "args": [ "doc-lib-mcp" ] } } ```Development
Building and Publishing
To prepare the package for distribution:
- Sync dependencies and update lockfile:
uv sync
- Build package distributions:
uv build
This will create source and wheel distributions in the dist/ directory.
- Publish to PyPI:
uv publish
Note: You’ll need to set PyPI credentials via environment variables or command flags:
- Token:
--tokenorUV_PUBLISH_TOKEN - Or username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory /home/administrator/python-share/documentation_library/doc-lib-mcp run doc-lib-mcp
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Document Library Server
Project Details
- shifusen329/doc-lib-mcp
- Last Updated: 4/20/2025
Recomended MCP Servers
使用Github Action将国外的Docker镜像转存到阿里云私有仓库,供国内服务器使用,免费易用
TypeScript Model Context Protocol (MCP) server boilerplate providing IP lookup tools/resources. Includes CLI support and extensible structure for...
A comprehensive MCP (Model Context Protocol) server for file system operations, providing Claude and other AI assistants with...
MCP Server for the Alpha Vantage API
A powerful multi-database server implementing the Model Context Protocol (MCP) to provide AI assistants with structured access to...
MCP Server integrating MCP Clients with Stability AI-powered image manipulation functionalities: generate, edit, upscale, and more.
Provides integration between the Hunter API and any LLM provider supporting the MCP protocol
Repositório com um MCP-Server que calcula a receita ideal e faz uma pequena análise da saúde financeira da...
Atom of Thoughts (AoT) MCP is a server that decomposes complex problems into independent atomic units of thought,...
Read your Apple Notes with Claude Model Context Protocol





