Skip to main content
Glama
Pavloffm

universal-knowledge-base-mcp-server

by Pavloffm
README.md
# Universal knowledge base MCP server
The main idea of this project is to create universal MCP server core that can be reused with different knowledge bases. So there will be many different abstraction layers to control it.

# Indexing
The Markdown knowledge base can be indexed recursively with a local
`sentence-transformers` model:

```bash
uv run index-knowledge-base
```

Configure the knowledge base with environment variables or a `.env` file:

```bash
UKB_KNOWLEDGE_BASE_PATH=/path/to/knowledge-base
UKB_EMBEDDING_MODEL_NAME=sentence-transformers/all-MiniLM-L6-v2
UKB_EMBEDDING_DEVICE=cpu
UKB_NORMALIZE_EMBEDDINGS=true
UKB_VECTOR_DATABASE_FOLDER=.knowledge_base
UKB_CHUNK_SIZE=1000
UKB_CHUNK_OVERLAP=150
UKB_INDEX_BATCH_SIZE=100
UKB_RETRIEVAL_K=5
UKB_FORCE_UPDATE=false
UKB_INDEX_LOCK_TIMEOUT_SECONDS=60
```

`UKB_KNOWLEDGE_BASE_PATH` is required. Indexing and retrieval read all runtime
configuration from these settings; the Python API accepts only the search
query or no arguments. Chroma data and the SQLite record manager are stored in
the configured vector database folder. Indexing is serialized with a lock, and
the two stores are reconciled after interrupted runs.

# How to run
## Server
```bash
uv run universal-knowledge-base-mcp-server
```
## Tests
```bash
uv run pytest
```

Maintenance

ActivityMaintained
ResponsivenessNo issues