
olafgeibig/knowledge-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
LightRAGを用いたハイブリッドベクターとグラフRAGエンジンを備えたローカルランニングナレッジベースであるMCPサーバー
概要
専門知識ドメインとAIアシスタントのギャップを埋めるために設計されたMCPサーバーです。 ユーザーは、専用の知識ベースを作成、管理、およびクエリを行い、MCP(Model Context Protocol)サーバーインターフェイスを介してAIエージェントにこの情報にアクセスできるようにします。 コアの考え方は、MCP クライアント (Claude Desktop や Windsurf のような IDE のような) である AI アシスタントをプロアクティブに活用することで、ユーザのプロンプトや広範な Web 検索に対する一般的なセマンティックな検索にのみ頼るのではなく、その推論プロセス(思考のチェーン)中にこれらの専門知識ベースを調べることです。 これにより、特定のドメインを扱う際に、より正確でコンテキスト・アウェアの応答が可能になります。 * 知識ベース(編集、削除、文書の追加/削除、構成、検索)を管理するためのユーザーフレンドリーなコマンドラインインターフェイスを提供します。 * 文書処理、埋め込み、知識グラフ作成、複雑なクエリを処理するのにレバレッジがあります.
概要(AI 翻訳)
#1. 概要とコンセプト
knowledge-mcpは、特殊な知識ドメインとAIアシスタントのギャップを埋めるために設計されたMCPサーバーです。 ユーザーは、専用の知識ベースを作成、管理、およびクエリを行い、MCP(Model Context Protocol)サーバーインターフェイスを介してAIエージェントにこの情報にアクセスできるようにします。
コアの考え方は、MCP クライアント (Claude Desktop や Windsurf のような IDE のような) である AI アシスタントをプロアクティブに活用することで、ユーザのプロンプトや広範な Web 検索に対する一般的なセマンティックな検索にのみ頼るのではなく、その推論プロセス(思考のチェーン)中にこれらの専門知識ベースを調べることです。 これにより、特定のドメインを扱う際に、より正確でコンテキスト・アウェアの応答が可能になります。
主なコンポーネント:
*CLIツール: 知識ベース(編集、削除、文書の追加/削除、構成、検索)を管理するためのユーザーフレンドリーなコマンドラインインターフェイスを提供します。 *Knowledge Base Engine: ドキュメント処理、埋め込み、ナレッジグラフ作成、複雑なクエリ処理を処理します.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
knowledge-mcp: Specialized Knowledge Bases for AI Agents
1. Overview and Concept
knowledge-mcp is a MCP server designed to bridge the gap between specialized knowledge domains and AI assistants. It allows users to create, manage, and query dedicated knowledge bases, making this information accessible to AI agents through an MCP (Model Context Protocol) server interface.
The core idea is to empower AI assistants that are MCP clients (like Claude Desktop or IDEs like Windsurf) to proactively consult these specialized knowledge bases during their reasoning process (Chain of Thought), rather than relying solely on general semantic search against user prompts or broad web searches. This enables more accurate, context-aware responses when dealing with specific domains.
Key components:
- CLI Tool: Provides a user-friendly command-line interface for managing knowledge bases (creating, deleting, adding/removing documents, configuring, searching).
- Knowledge Base Engine: Leverages LightRAG to handle document processing, embedding, knowledge graph creation, and complex querying.
- MCP Server: Exposes the search functionality of the knowledge bases via the FastMCP protocol, allowing compatible AI agents to query them directly.
2. About LightRAG
This project utilizes LightRAG (HKUDS/LightRAG) as its core engine for knowledge base creation and querying. LightRAG is a powerful framework designed to enhance Large Language Models (LLMs) by integrating Retrieval-Augmented Generation (RAG) with knowledge graph techniques.
Key features of LightRAG relevant to this project:
- Document Processing Pipeline: Ingests documents (PDF, Text, Markdown, DOCX), chunks them, extracts entities and relationships using an LLM, and builds both a knowledge graph and vector embeddings.
- Multiple Query Modes: Supports various retrieval strategies (e.g., vector similarity, entity-centric, relationship-focused, hybrid) to find the most relevant context for a given query.
- Flexible Storage: Can use different backends for storing key-value data, vectors, graph information, and document status (this project uses the default file-based storage).
- LLM/Embedding Integration: Supports various providers like OpenAI (used in this project), Ollama, Hugging Face, etc.
By using LightRAG, knowledge-mcp benefits from advanced RAG capabilities that go beyond simple vector search.
3. Installation
Ensure you have Python 3.12 and uv installed.
- Running the Tool: After installing the package (e.g., using
uv pip install -e .), you can run the CLI usinguvx:# General command structure (use either --config or --base) uvx knowledge-mcp --config [arguments...] uvx knowledge-mcp --base [arguments...] # Example: Start interactive shell
インストール
uvx knowledge-mcp --config <absolute-path-to-your-config.yaml> mcp設定
{
"mcpServers": {
"knowledge-mcp": {
"command": "uvx",
"args": [
"knowledge-mcp",
"--config",
"<absolute-path-to-your-config.yaml>",
"mcp"
]
}
}
}