MCP-RAG Server
MCP-RAG: RAG を使用したモデルコンテキストプロトコル 🚀
GroundX と OpenAI を使用し、Modern Context Processing (MCP) で構築された強力かつ効率的な RAG (Retrieval-Augmented Generation) 実装。
🌟 特徴
高度なRAG実装:高精度の文書検索のためにGroundXを活用
モデルコンテキストプロトコル: MCPとのシームレスな統合により、コンテキスト処理が強化されます。
型安全: 堅牢な型チェックと検証のためにPydanticで構築されています
柔軟な構成:環境変数を通じて設定を簡単にカスタマイズできます
ドキュメント取り込み: PDFドキュメントの取り込みと処理のサポート
インテリジェント検索:スコアリング機能を備えたセマンティック検索機能
Related MCP server: Chalee MCP RAG
🛠️ 前提条件
Python 3.12以上
OpenAI APIキー
GroundX APIキー
MCP CLIツール
📦 インストール
リポジトリをクローンします。
git clone <repository-url>
cd mcp-rag仮想環境を作成してアクティブ化します。
uv sync
source .venv/bin/activate # On Windows, use `.venv\Scripts\activate`⚙️ 構成
サンプル環境ファイルをコピーします。
cp .env.example .env.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の使用状況を監視する
🤝 貢献する
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/amazing-feature)変更をコミットします (
git commit -m 'Add some amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Ingest, manage, and retrieve documents for RAG-powered AI applications
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
The Needle MCP server enables semantic search on documents stored in files like PDFs, DOCX, and XLSX by connecting AI applications to external data sources. It provides capabilities to create and manage document collections, perform natural language searches on stored content, and retrieve relevant information without requiring exact keyword matches.
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Related MCP Servers
- FlicenseCqualityDmaintenanceA server that implements Retrieval-Augmented Generation using GroundX and OpenAI, enabling semantic search and document retrieval with Modern Context Processing for enhanced context handling.3-
- AlicenseNot gradedqualityDmaintenanceEnables RAG (Retrieval-Augmented Generation) capabilities with document processing, vector storage, and intelligent Q\&A using OpenAI embeddings and semantic search.MIT
- AlicenseNot gradedqualityDmaintenanceEnables advanced semantic search and document management by integrating the GroundX API with Claude Desktop and GitHub Copilot. It supports local file uploads, website crawling, and Google Drive synchronization for RAG workflows.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for document ingestion and semantic search on Qdrant. Enables ingesting local documents, generating embeddings with OpenAI, and performing vector search with metadata filters.Apache 2.0