Knowledge Base MCP Server
by jeanibarz
This MCP server provides tools for listing and retrieving content from different knowledge bases. It allows users to perform semantic searches and retrieve relevant information from various knowledge sources.
Last updated: N/A
What is Knowledge Base MCP Server?
The Knowledge Base MCP Server is a tool designed to list and retrieve content from multiple knowledge bases. It leverages semantic search using FAISS and Hugging Face embeddings to find relevant information based on a query.
How to use Knowledge Base MCP Server?
To use the server, first set up the environment variables, build the server, and add it to the MCP settings. Then, create knowledge base directories with text files containing the content. The server exposes two tools: list_knowledge_bases
to list available knowledge bases and retrieve_knowledge
to retrieve similar chunks from the knowledge base based on a query, accessible through the MCP interface.
Key features of Knowledge Base MCP Server
Lists available knowledge bases
Retrieves similar chunks from knowledge bases based on a query
Uses FAISS index for efficient semantic search
Automatically updates the FAISS index when knowledge base files are modified
Supports multiple knowledge bases
Uses Hugging Face embeddings for semantic similarity
Provides a threshold parameter to filter results based on similarity score
Use cases of Knowledge Base MCP Server
Quickly find relevant information from company documentation
Provide IT support by searching through IT knowledge bases
Onboard new employees by retrieving relevant onboarding documents
Centralized knowledge retrieval from various sources
FAQ from Knowledge Base MCP Server
What is the purpose of the HUGGINGFACE_API_KEY environment variable?
What is the purpose of the HUGGINGFACE_API_KEY environment variable?
The HUGGINGFACE_API_KEY is used to authenticate with the Hugging Face Inference API, which is used to generate embeddings for the knowledge base content.
Where should I store my knowledge base files?
Where should I store my knowledge base files?
Knowledge base files should be stored in subdirectories within the directory specified by the KNOWLEDGE_BASES_ROOT_DIR environment variable.
How does the server determine if a knowledge base file has been modified?
How does the server determine if a knowledge base file has been modified?
The server calculates the SHA256 hash of each file and stores it in a hidden .index subdirectory. If the hash changes, the file is considered modified.
What is the default Hugging Face model used for generating embeddings?
What is the default Hugging Face model used for generating embeddings?
The default Hugging Face model is sentence-transformers/all-MiniLM-L6-v2.
How can I filter the results returned by the retrieve_knowledge tool?
How can I filter the results returned by the retrieve_knowledge tool?
You can use the threshold parameter to filter the results based on the similarity score. Lower thresholds return more results, but they may be less relevant.