Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"mcp-rag-server": {
"args": [
"run",
"--directory",
"/path/to/mcp-rag-server",
"python",
"-m",
"src.main"
],
"command": "uv"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MCP RAG Serverは、Model Context Protocol (MCP)に準拠したRAG(Retrieval-Augmented Generation)機能を持つPythonサーバーです。マークダウン、テキスト、パワーポイント、PDFなど複数の形式のドキュメントをデータソースとして、multilingual-e5-largeモデルを使用してインデックス化し、ベクトル検索によって関連情報を取得する機能を提供します。
This server supports HTTP transport. Be the first to test it — help the community know if it works.
Five weighted categories — click any category to see the underlying evidence.
uv is vulnerable to arbitrary file write through entry point names
### Impact In versions of uv prior to 0.11.15, when installing a distribution containing an entry point specification (under `console_scripts` or `gui_scripts`), uv would place the generated entry point according to the given name even if doing so resulted in a path outside of the environment's scripts directory. A malicious wheel could use this to place an executable outside of the intended environment, including in a directory already present on the user's `PATH`. This could shadow or overwr
uv vulnerable to arbitrary file deletion through RECORD entries
## Impact Wheel RECORD entries can contain relative paths that traverse outside of the wheel’s installation prefix. In versions 0.11.5 and earlier of uv, these wheels were not rejected on installation and the RECORD was respected without validation on uninstall. uv uses the RECORD to determine files to remove on uninstall. Consequently, a malicious or malformed wheel could induce deletion of arbitrary files outside of the wheel’s installation prefix on uninstall. uv does not use the RECORD fi
uv allows ZIP payload obfuscation through parsing differentials
### Impact In versions 0.9.5 and earlier of uv, ZIP archives were handled in a manner that enabled two parsing differentials against other components of the Python packaging ecosystem: 1. Central directory entries in a ZIP archive can contain comment fields. However, uv would assume that these fields were not present, since they aren't widely used. Consequently, a ZIP archive could be constructed where uv would interpret the contents of a central directory comment field as ZIP control structur
uv has differential in tar extraction with PAX headers
### Impact In versions 0.9.4 and earlier of uv, tar archives containing PAX headers with file size overrides were not handled properly. As a result, an attacker could contrive a source distribution (as a tar archive) that would extract differently when installed via uv versus other Python package installers. The underlying parsing differential here originates with astral-tokio-tar, which disclosed this vulnerability as CVE-2025-62518. In practice, the impact of this vulnerability is **low**:
uv allows ZIP payload obfuscation through parsing differentials
## Impact In versions 0.8.5 and earlier of uv, remote ZIP archives were handled in a streamwise fashion, and file entries were not reconciled against the archive's central directory. This enabled two parser differentials against other Python package installers: 1. An attacker could contrive a ZIP archive that would extract with legitimate contents on some package installers, and malicious contents on others due to multiple local file entries. The attacker could choose which installer to target
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml
Persistent memory using a knowledge graph
Dynamic problem-solving through sequential thought chains
An autonomous agent that conducts deep research on any data using any LLM providers
Self-hosted URL- and file-to-Markdown service for humans and AI agents - web pages, documents, images, audio, YouTube. PWA + REST + MCP + Claude Code skill, Reddit-aware, refreshable share links.
MCP Security Weekly
Get CVE alerts and security updates for Mcp Rag Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
MCP RAG Serverは、Model Context Protocol (MCP)に準拠したRAG(Retrieval-Augmented Generation)機能を持つPythonサーバーです。マークダウン、テキスト、パワーポイント、PDFなど複数の形式のドキュメントをデータソースとして、multilingual-e5-largeモデルを使用してインデックス化し、ベクトル検索によって関連情報を取得する機能を提供します。
このプロジェクトは、MCPサーバーの基本的な実装に加えて、RAG機能を提供します。複数形式のドキュメントをインデックス化し、自然言語クエリに基づいて関連情報を検索することができます。
MCPサーバーの基本実装
RAG機能
ツール
# uvがインストールされていない場合は先にインストール
# pip install uv
# 依存関係のインストール
uv sync
# pgvectorを含むPostgreSQLコンテナを起動
docker run --name postgres-pgvector -e POSTGRES_PASSWORD=password -p 5432:5432 -d pgvector/pgvector:pg17
PostgreSQLコンテナを起動した後、以下のコマンドでデータベースを作成します:
# ragdbデータベースの作成
docker exec -it postgres-pgvector psql -U postgres -c "CREATE DATABASE ragdb;"
-- pgvectorエクステンションをインストール
CREATE EXTENSION vector;
.envファイルを作成し、以下の環境変数を設定します:
# PostgreSQL接続情報
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
POSTGRES_DB=ragdb
# ドキュメントディレクトリ
SOURCE_DIR=./data/source
PROCESSED_DIR=./data/processed
# エンベディングモデル設定
EMBEDDING_MODEL=intfloat/multilingual-e5-large
EMBEDDING_DIM=1024
EMBEDDING_PREFIX_QUERY="query: "
EMBEDDING_PREFIX_EMBEDDING="passage: "
このサーバーでは、環境変数でエンベディングモデルを選択できます。
EMBEDDING_MODEL=intfloat/multilingual-e5-large
EMBEDDING_DIM=1024
EMBEDDING_PREFIX_QUERY="query: "
EMBEDDING_PREFIX_EMBEDDING="passage: "
EMBEDDING_MODEL=cl-nagoya/ruri-v3-30m
EMBEDDING_DIM=256
EMBEDDING_PREFIX_QUERY="検索クエリ: "
EMBEDDING_PREFIX_EMBEDDING="検索文書: "
多くのエンベディングモデル(特にE5系)では、テキストの種類に応じてプレフィックスを付けることで性能が向上します:
EMBEDDING_PREFIX_QUERY - ユーザーの検索クエリに自動で追加EMBEDDING_PREFIX_EMBEDDING - インデックス化される文書に自動で追加プレフィックスは自動で処理されるため、MCPクライアントは意識する必要がありません。
エンベディングモデルを変更した場合は、ベクトル次元が変わる可能性があるため、既存のインデックスをクリアして再作成してください:
python -m src.cli clear
python -m src.cli index
uv run python -m src.main
オプションを指定する場合:
uv run python -m src.main --name "my-rag-server" --version "1.0.0" --description "My RAG Server"
python -m src.main
インデックスのクリアとインデックス化を行うためのコマンドラインツールが用意されています。
python -m src.cli --help
python -m src.cli clear
# デフォルト設定でインデックス化(./data/source ディレクトリ)
python -m src.cli index
# 特定のディレクトリをインデックス化
python -m src.cli index --directory ./path/to/documents
# チャンクサイズとオーバーラップを指定してインデックス化
python -m src.cli index --directory ./data/source --chunk-size 300 --chunk-overlap 50
# または短い形式で
python -m src.cli index -d ./data/source -s 300 -o 50
# 差分インデックス化(新規・変更ファイルのみを処理)
python -m src.cli index --incremental
# または短い形式で
python -m src.cli index -i
python -m src.cli count
MCPホスト(Claude Desktop、Cline、Cursorなど)でこのサーバーを使用するには、以下のような設定を行います。設定するjsonファイルについては、各MCPホストの ドキュメントを参照してください。
{
"mcpServers": {
"mcp-rag-server": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/mcp-rag-server",
"python",
... [View full README on GitHub](https://github.com/karaage0703/mcp-rag-server#readme)