MCP-RAG Server

by apatoliya
  • Linux
  • Apple

Integrations

  • Manages environment variables and sensitive configuration through .env files for secure API key storage.

  • Enables version control for contributing features through forking, branching, committing, and pull requests.

  • Supports Jupyter notebook functionality through ipykernel, allowing interactive development and testing.

MCP-RAG: RAG を使用したモデルコンテキストプロトコル 🚀

GroundX と OpenAI を使用し、Modern Context Processing (MCP) で構築された強力かつ効率的な RAG (Retrieval-Augmented Generation) 実装。

🌟 特徴

  • 高度なRAG実装:高精度の文書検索のためにGroundXを活用
  • モデルコンテキストプロトコル: MCPとのシームレスな統合により、コンテキスト処理が強化されます。
  • 型安全: 堅牢な型チェックと検証のためにPydanticで構築されています
  • 柔軟な構成:環境変数を通じて設定を簡単にカスタマイズできます
  • ドキュメント取り込み: PDFドキュメントの取り込みと処理のサポート
  • インテリジェント検索:スコアリング機能を備えたセマンティック検索機能

🛠️ 前提条件

  • Python 3.12以上
  • OpenAI APIキー
  • GroundX APIキー
  • MCP CLIツール

📦 インストール

  1. リポジトリをクローンします。
git clone <repository-url> cd mcp-rag
  1. 仮想環境を作成してアクティブ化します。
uv sync source .venv/bin/activate # On Windows, use `.venv\Scripts\activate`

⚙️ 構成

  1. サンプル環境ファイルをコピーします。
cp .env.example .env
  1. .envで環境変数を設定します。
GROUNDX_API_KEY="your-groundx-api-key" OPENAI_API_KEY="your-openai-api-key" BUCKET_ID="your-bucket-id"

🚀 使用方法

サーバーの起動

次を使用して検査サーバーを実行します。

mcp dev server.py

ドキュメントの取り込み

新しいドキュメントを取り込むには:

from server import ingest_documents result = ingest_documents("path/to/your/document.pdf") print(result)

検索の実行

基本的な検索クエリ:

from server import process_search_query response = process_search_query("your search query here") print(f"Query: {response.query}") print(f"Score: {response.score}") print(f"Result: {response.result}")

カスタム構成の場合:

from server import process_search_query, SearchConfig config = SearchConfig( completion_model="gpt-4", bucket_id="custom-bucket-id" ) response = process_search_query("your query", config)

📚 依存関係

  • groundx (≥2.3.0): コアRAG機能
  • openai (≥1.75.0): OpenAI API 統合
  • mcp[cli] (≥1.6.0): 最新のコンテキスト処理ツール
  • ipykernel (≥6.29.5): Jupyterノートブックのサポート

🔒 セキュリティ

  • APIキーを含む.envファイルをコミットしないでください
  • すべての機密情報に環境変数を使用する
  • APIキーを定期的にローテーションする
  • 不正アクセスがないかAPIの使用状況を監視する

🤝 貢献する

  1. リポジトリをフォークする
  2. 機能ブランチを作成します( git checkout -b feature/amazing-feature
  3. 変更をコミットします ( git commit -m 'Add some amazing feature' )
  4. ブランチにプッシュする ( git push origin feature/amazing-feature )
  5. プルリクエストを開く
-
security - not tested
F
license - not found
-
quality - not tested

GroundX と OpenAI を使用して検索拡張生成を実装し、強化されたコンテキスト処理のための最新のコンテキスト処理によるセマンティック検索とドキュメント検索を可能にするサーバー。

  1. 🌟 特徴
    1. 🛠️ 前提条件
      1. 📦 インストール
        1. ⚙️ 構成
          1. 🚀 使用方法
            1. サーバーの起動
            2. ドキュメントの取り込み
            3. 検索の実行
          2. 📚 依存関係
            1. 🔒 セキュリティ
              1. 🤝 貢献する

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  Enables LLMs to perform semantic search and document management using ChromaDB, supporting natural language queries with intuitive similarity metrics for retrieval augmented generation applications.
                  Last updated -
                  Python
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  Model Context Protocol (MCP) server implementation for semantic search and memory management using TxtAI. This server provides a robust API for storing, retrieving, and managing text-based memories with semantic search capabilities. You can use Claude and Cline AI Also
                  Last updated -
                  4
                  Python
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  A simple Model Context Protocol server that enables searching and retrieving relevant documentation snippets from Langchain, Llama Index, and OpenAI official documentation.
                  Last updated -
                  Python
                  • Apple
                  • Linux
                • A
                  security
                  A
                  license
                  A
                  quality
                  An open-source platform for Retrieval-Augmented Generation (RAG). Upload documents and query them ⚡
                  Last updated -
                  1
                  169
                  JavaScript
                  MIT License

                View all related MCP servers

                ID: 07yenap2of