- Home
- MCP servers
- Doc-lib
Doc-lib
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"shifusen329-doc-lib-mcp": {
"command": "uv",
"args": [
"--directory",
"/home/administrator/python-share/doc-lib-mcp",
"run",
"doc-lib-mcp"
],
"env": {
"HOST": "localhost",
"DB_NAME": "doclibdb",
"DB_PORT": "5432",
"DB_USER": "doclibdb_user",
"RAG_AGENT": "llama3",
"DB_PASSWORD": "doclibdb_password",
"OLLAMA_HOST": "localhost",
"OLLAMA_PORT": "11434",
"OLLAMA_MODEL": "nomic-embed-text-v2-moe",
"RERANKER_USE_FP16": "True",
"RERANKER_MODEL_PATH": "/srv/samba/fileshare2/AI/models/bge-reranker-v2-m3"
}
}
}
}You run a self-contained MCP server that ingests documents, chunks content for semantic search, and manages notes. This guide helps you deploy and use the doc-lib-mcp server, configure local execution, and perform common actions like adding notes, ingesting files, and searching content.
How to use
To interact with the doc-lib MCP server, you run it locally and connect using its supported tools. You can add notes, ingest various document types, perform semantic searches over chunks, and retrieve relevant content for AI-assisted tasks. Use the provided commands to start the local server, then access the MCP client or integration you prefer to execute the available tools.
How to install
Prerequisites you need before starting: Python installed on your system, and a compatible runtime for the MCP executor (the project uses a standard MCP setup with the UV tooling). Ensure you have access to the file paths referenced in the commands below and that you can run shell commands from your terminal.
- Clone the project directory that contains the MCP server code and its assets. 2) Install dependencies for the MCP server using the designated tool. 3) Start the MCP server using the runtime command shown in the configuration entries below.
Configuration
Two local runtime configurations are provided for running the doc-lib MCP server. Choose the one that matches your environment: development with a directory path or a published setup that runs directly from the MCP runner.
{
"mcpServers": {
"doclib_dev": {
"command": "uv",
"args": [
"--directory",
"/home/administrator/python-share/doc-lib-mcp",
"run",
"doc-lib-mcp"
]
},
"doclib_publ": {
"command": "uvx",
"args": [
"doc-lib-mcp"
]
}
}
}
Notes on environment and tooling
The server relies on environment configuration for model access, vector embeddings, and data persistence as described in the environment variables section. You can customize runtimes and paths to fit your deployment topology, but ensure the command and arguments reflect the exact startup pattern shown above for your chosen mode.
Tool usage overview
The server exposes tools to manage notes, ingest content, search and retrieve chunks, and handle metadata. You can expand your usages by combining ingestion with semantic search to answer complex questions over your stored notes and documents.
Troubleshooting and tips
If you encounter issues starting the MCP server, verify that the path to the doc-lib-mcp directory exists and that the MCP runtime (uv or uvx) is installed and available in your shell. Check that the environment settings for the underlying models and embeddings are accessible to the process. For debugging, use a local inspector or logging to track the startup sequence and tool invocations.
Available tools
add-note
Add a new note to the in-memory note store with a name and content
ingest-string
Ingest and chunk a text string with optional source and tags
ingest-markdown
Ingest and chunk a markdown file from a given path
ingest-python
Ingest and chunk a Python file from a given path
ingest-openapi
Ingest and chunk an OpenAPI JSON file from a given path
ingest-html
Ingest and chunk an HTML file from a given path
ingest-html-url
Ingest and chunk HTML content from a URL with optional dynamic rendering
smart_ingestion
Extract technical content using Gemini and chunk it preserving code blocks and narrative content; then embed for semantic search
search-chunks
Perform semantic search over ingested content with optional type and tag filters
delete-source
Delete all chunks from a specified source
delete-chunk-by-id
Delete one or more chunks by id or a list of ids
update-chunk-type
Update the type attribute for a chunk by id
ingest-batch
Ingest and chunk multiple files in batch (markdown, OpenAPI, Python) from given paths
list-sources
List all sources with optional tag or semantic query filtering and top_k limit
get-context
Retrieve relevant content chunks for AI context with filtering and top_k
update-chunk-metadata
Update the metadata for a chunk by id
tag-chunks-by-source
Add tags to all chunks from a specific source, merging with existing tags
list-notes
List all stored notes and their content