Get the FREE Ultimate OpenClaw Setup Guide →

kb

Build a knowledge base into a tar.gz and give it to this MCP server, and it is ready to serve.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio geeksfino-kb-mcp-server uvx --from kb-mcp-server@0.3.0 kb-mcp-server --embeddings /path/to/knowledge_base \
  --env VIRTUAL_ENV="path to virtual environment (if using venv)" \
  --env KB_MCP_SERVER_CONFIG="path to config or flags for the server (optional)"

How to use

This MCP server is built on top of txtai and exposes a standardized interface for working with a knowledge base. It provides semantic search, knowledge graph querying, and text processing pipelines (such as summarization and extraction) that can be accessed through the MCP protocol. You can load a knowledge base from a folder or a portable .tar.gz archive and then query it semantically, visualize or query the knowledge graph, and apply text processing workflows on your data. The server is designed to run locally and operate entirely offline, preserving data privacy.

To use it, install the kb-mcp-server package and run the CLI with your chosen embeddings/knowledge base. You can start the server from a PyPI-installed CLI, or use uv/uvx for flexible deployment. Once running, you can perform semantic searches, retrieve contextual passages, and navigate related entities in the knowledge graph. The kb_builder tool is available to build or update knowledge bases, while the MCP server provides the access layer to query and process that data via the standard MCP interface.

How to install

Prerequisites:

  • Python 3.10 or newer recommended
  • Optional: uv or uvx for streamlined packaging and fast starts
  • Access to a knowledge base (folder or .tar.gz) or documents to build one

Installation paths:

  1. Using uv (recommended for a local Python environment)
# Install uv if you don't have it
pip install -U uv

# Create and activate a Python 3.10+ virtual environment (optional but recommended)
uv venv --python=3.10
source .venv/bin/activate

# Install the kb-mcp-server from PyPI
uv pip install kb-mcp-server

# Start the MCP server with a knowledge base
kb-mcp-server --embeddings /path/to/knowledge_base
  1. Using uvx (no installation required for the package at run time)
# Run the MCP server from PyPI without installing
uvx --from kb-mcp-server@0.3.0 kb-mcp-server --embeddings /path/to/knowledge_base
  1. From Source (clone and install in editable mode)
# Create and activate a virtual environment (optional but recommended)
conda create -n embedding-mcp python=3.10
conda activate embedding-mcp

# Clone the repository
git clone https://github.com/Geeksfino/kb-mcp-server.git
cd kb-mcp-server

# Install dependencies in editable mode
pip install -e .

# Start the MCP server
kb-mcp-server --embeddings /path/to/knowledge_base

Optional: If you prefer using a specific packaging workflow, you can adapt commands to your environment, e.g., using a conda environment or a local python path instead of a virtualenv.

Additional notes

Tips and notes:

  • You can load knowledge bases as a folder or as a portable .tar.gz file. The server accepts either form as the embeddings source.
  • If you upgrade transformers beyond 4.49.0, you may see deprecation warnings related to transformers.agents.tools. These warnings do not affect functionality but can be silenced or resolved by pinning the transformer version as recommended.
  • The kb_builder tool is provided for convenience to build and export knowledge bases, but you can also build knowledge bases directly via txtai in Python if you prefer custom workflows.
  • When running with uv/uvx, you can use environment variables to configure paths, port bindings, and other runtime options as needed by your deployment.
  • For portability, export or transfer the knowledge base as a tar.gz and load it with the MCP server without rebuilding.
  • If you run into path or permission issues, ensure your virtual environment or runtime has read/write access to the knowledge base directory and the directory containing the server executable.

Related MCP Servers

Sponsor this space

Reach thousands of developers