🚀 MCP サーバーを使用した Agentic RAG 
✨ 概要

Agentic RAG with MCP Server は、 Agentic RAG (Retrieval-Augmented Generation) アプリケーションを構築するために MCP (Model Context Protocol) サーバーとクライアントを統合する強力なプロジェクトです。
このセットアップにより、次のような高度なツールが RAG システムに導入されます。
🕵️♂️エンティティ抽出
🔍クエリの絞り込み
✅関連性チェック
サーバーはこれらのインテリジェント ツールをホストし、クライアントはそれらをシームレスに接続して活用する方法を示します。
🖥️ サーバー — server.py
mcpライブラリのFastMCPクラスを活用したこのサーバーは、次のような便利なツールを公開します。
ツール名 | 説明 | アイコン |
| 現在の日付と時刻 を返します | ⏰ |
| OpenAI を使用してクエリからエンティティを抽出し、ドキュメント検索の関連性を高めます。 | 🧠 |
| OpenAIを活用した改良 によりユーザークエリの品質を向上 | ✨ |
| LLMでチャンクの関連性をチェックして無関係なコンテンツを除外します | ✅ |
🤝 クライアント — mcp-client.py
クライアントは、MCP サーバーに接続して対話する方法を示します。
mcpライブラリからClientSessionとの接続を確立する利用可能なすべてのサーバーツールを一覧表示する
カスタム引数で任意のツールを呼び出す
OpenAI または Geminiと MCP ツールを連携して活用してクエリを処理する
⚙️ 要件
Python 3.9以上
openaiPythonパッケージmcpライブラリ環境変数管理のための
python-dotenv
🛠️ インストールガイド
🔐 構成
.envファイルを作成する (.env.sampleをテンプレートとして使用).envで OpenAI モデルを設定します。
🚀 使い方
MCP サーバーを起動します。
MCP クライアントを実行します。
📜 ライセンス
このプロジェクトはMIT ライセンスに基づいてライセンスされています。
読んでくれてありがとう🙏
This server cannot be installed
Related Resources
Related MCP Servers
- -securityAlicense-qualityProvides RAG capabilities for semantic document search using Qdrant vector database and Ollama/OpenAI embeddings, allowing users to add, search, list, and delete documentation with metadata support.Last updated -116Apache 2.0
- -securityFlicense-qualityThis server enables AI assistants (CLINE, Cursor, Windsurf, Claude Desktop) to share a common knowledge base through Retrieval Augmented Generation (RAG), providing consistent information access across multiple tools.Last updated -4
Agentsetofficial
AsecurityAlicenseAqualityAn open-source platform for Retrieval-Augmented Generation (RAG). Upload documents and query them ⚡Last updated -12423MIT License- -securityFlicense-qualityImplements Retrieval-Augmented Generation (RAG) using GroundX and OpenAI, allowing users to ingest documents and perform semantic searches with advanced context handling through Modern Context Processing (MCP).Last updated -5