接入你的智能体
從發布者安裝。不是 PlugMCP 端點。
遠端 URL 還是本機指令? 兩種安裝方式的差異
A Model Context Protocol (MCP) server that enables Retrieval Augmented Generation (RAG). It indexes your documents and serves relevant context to Large Language Models via the MCP protocol.
{
"mcpServers": {
"rag": {
"command": "npx",
"args": ["-y", "mcp-rag-server"],
"env": {
"BASE_LLM_API": "http://localhost:11434/v1",
"EMBEDDING_MODEL": "nomic-embed-text",
"VECTOR_STORE_PATH": "./vector_store",
"CHUNK_SIZE": "500"
}
}
}
}
# Index documents
>> tool:embedding_documents {"path":"./docs"}
# Check status
>> resource:embedding-status
<< rag://embedding/status
Current Path: ./docs/file1.md
Completed: 10
Failed: 0
Total chunks: 15
Failed Reason:
.txt, .md, .json, .jsonl, and .csv formatsnpm install -g mcp-rag-server
git clone https://github.com/kwanLeeFrmVi/mcp-rag-server.git
cd mcp-rag-server
npm install
npm run build
npm start
export BASE_LLM_API=http://localhost:11434/v1
export EMBEDDING_MODEL=granite-embedding-278m-multilingual-Q6_K-1743674737397:latest
export VECTOR_STORE_PATH=./vector_store
export CHUNK_SIZE=500
# Run (global install)
mcp-rag-server
# Or via npx
npx mcp-rag-server
💡 Tip: We recommend using Ollama for embedding. Install and pull the
nomic-embed-textmodel:
ollama pull nomic-embed-text
export EMBEDDING_MODEL=nomic-embed-text
💡 Recommendation: Use Ollama embedding models like
nomic-embed-textfor best performance.
Once running, the server exposes these tools via MCP:
embedding_documents(path: string): Index documents under the given pathquery_documents(query: string, k?: number): Retrieve top k chunks (default 15)remove_document(path: string): Remove a specific documentremove_all_documents(confirm: boolean): Clear the entire index (confirm=true)list_documents(): List all indexed document pathsClients can also read resources via URIs:
rag://documents — List all document URIsrag://document/{path} — Fetch full content of a documentrag://query-document/{numberOfChunks}/{query} — Query documents as a resourcerag://embedding/status — Check current indexing status (completed, failed, total)CHUNK_SIZE, and queues them for embedding.npm install
npm run build # Compile TypeScript
npm start # Run server
npm run watch # Watch for changes
Contributions are welcome! Please open issues or pull requests on GitHub.
MIT 2025 Quan Le
mcp-rag-server is a Model Context Protocol (MCP) server that enables Retrieval Augmented Generation (RAG) capabilities. It empowers Large Language Models (LLMs) to answer questions based on your docum
總覽
mcp-rag-server is a Model Context Protocol (MCP) server that enables Retrieval Augmented Generation (RAG) capabilities. It empowers Large Language Models (LLMs) to answer questions based on your document content by indexing and retrieving relevant information efficiently.
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
MCP Rag Server 透過 stdio 在本機執行。
上次檢查時間:2026-10-28。 mcp-rag-server is a Model Context Protocol (MCP) server that enables Retrieval Augmented Generation (RAG) capabilities. It empowers Large Language Models (LLMs) to answer questions based on your document content by indexing and retrieving relevant information efficiently.