MCP RAG Server

by karaage0703

71 stars
509 downloads
Not rated
GitHub Website

About

# MCP RAG Server MCP RAG Serverは、Model Context Protocol (MCP)に準拠したRAG(Retrieval-Augmented Generation)機能を持つPythonサーバーです。マークダウン、テキスト、パワーポイント、PDFなど複数の形式のドキュメントをデータソースとして、multilingual-e5-largeモデルを使用してインデックス化し、ベクトル検索によって関連情報を取得する機能を提供します。 ## 概要…

Details

Author
karaage0703
GitHub stars
71
Downloads
509
Categories
Developer Tools, Knowledge Base, Other

- Supports multiple document formats (Markdown, text, PowerPoint, Word, PDF)
- Embedding model configurable (default: multilingual-e5-large)
- Vector search with PostgreSQL and pgvector
- Differential indexing (processes only new or modified files)
- Context chunk and full document retrieval
- CLI tools for index management and document count

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP RAG Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install dependencies with uv sync, set up PostgreSQL 14+ with the pgvector extension, and configure environment variables in .env. Start the MCP server with uv run python -m src.main or use CLI commands like python -m src.cli index to index documents. MCP hosts (e.g., Claude Desktop, Cline, Cursor) can integrate the server via a JSON configuration entry specifying command and args.

embedding_documents

Add documents from directory path or file path for RAG embedding and store to DB. Supported file types: .json, .jsonl, .txt, .md, .csv

query_documents

Query indexed documents using RAG

remove_document

Remove a specific document from the index by file path

remove_all_documents

Remove all documents from the index

list_documents

List all document paths in the index

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp rag server": {
            "mcp-rag-server": {
                "command": "uv",
                "args": [
                    "sync"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-rag-server": {
        "command": "uv",
        "args": [
            "sync"
        ]
    }
}

MCP RAG Server

MCP RAG Serverは、Model Context Protocol (MCP)に準拠したRAG(Retrieval-Augmented Generation)機能を持つPythonサーバーです。マークダウン、テキスト、パワーポイント、PDFなど複数の形式のドキュメントをデータソースとして、multilingual-e5-largeモデルを使用してインデックス化し、ベクトル検索によって関連情報を取得する機能を提供します。

概要

このプロジェクトは、MCPサーバーの基本的な実装に加えて、RAG機能を提供します。複数形式のドキュメントをインデックス化し、自然言語クエリに基づいて関連情報を検索することができます。

機能

- MCPサーバーの基本実装
- JSON-RPC over stdioベースで動作
- ツールの登録と実行のためのメカニズム
- エラーハンドリングとロギング

- RAG機能
- 複数形式のドキュメント(マークダウン、テキスト、パワーポイント、PDF)の読み込みと解析
- 階層構造を持つソースディレクトリに対応
- markitdownライブラリを使用したパワーポイントやPDFからのマークダウン変換
- 選択可能なエンベディングモデル(multilingual-e5-large、ruriなど)を使用したエンベディング生成
- PostgreSQLのpgvectorを使用したベクトルデータベース
- ベクトル検索による関連情報の取得
- 前後のチャンク取得機能(コンテキストの連続性を確保)
- ドキュメント全文取得機能(完全なコンテキストを提供)
- 差分インデックス化機能(新規・変更ファイルのみを処理)

- ツール
- ベクトル検索ツール(MCP)
- ドキュメント数取得ツール(MCP)
- インデックス管理ツール(CLI)

前提条件

- Python 3.10以上
- PostgreSQL 14以上(pgvectorエクステンション付き)

インストール

依存関係のインストール

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.