jeanibarz_knowledge-base-mcp-server

jeanibarz_knowledge-base-mcp-server

3.5

This MCP server provides tools for listing and retrieving content from different knowledge bases.

The Knowledge Base MCP Server is designed to facilitate the management and retrieval of information from various knowledge bases. It leverages the Hugging Face Inference API to generate embeddings for knowledge base content, enabling efficient semantic search through a FAISS index. The server is built using Node.js and requires specific environment variables for configuration, such as API keys and directory paths. It supports the automatic updating of the FAISS index when knowledge base files are modified, ensuring that search results are always up-to-date. The server is capable of listing available knowledge bases and retrieving similar content chunks based on user queries, making it a powerful tool for knowledge management.

Features

  • Semantic Search: Utilizes FAISS index for efficient similarity search across knowledge bases.
  • Automatic Indexing: Automatically updates the FAISS index when knowledge base files are modified.
  • Environment Configuration: Supports environment variables for flexible configuration of API keys and directory paths.
  • Markdown Output: Provides search results in a structured markdown format for easy readability.
  • Multi-Knowledge Base Support: Capable of handling multiple knowledge bases with directory-based organization.

MCP Tools

  • {'list_knowledge_bases': 'Lists the available knowledge bases.'}
  • {'retrieve_knowledge': 'Retrieves similar chunks from the knowledge base based on a query.'}

Usage with Different Platforms

Node.js

bash
git clone <repository_url>
cd knowledge-base-mcp-server
npm install
npm run build

MCP Configuration


"knowledge-base-mcp": {
  "command": "node",
  "args": [
    "/path/to/knowledge-base-mcp-server/build/index.js"
  ],
  "disabled": false,
  "autoApprove": [],
  "env": {
    "KNOWLEDGE_BASES_ROOT_DIR": "/path/to/knowledge_bases",
    "HUGGINGFACE_API_KEY": "YOUR_HUGGINGFACE_API_KEY"
  },
  "description": "Retrieves similar chunks from the knowledge base based on a query."
}