rag-mcp-selfhosted
v1.4.0
Published
MCP server for RAG, an open-source platform for Retrieval-Augmented Generation. Designed for developers who want to build intelligent, document-based applications quickly and efficiently.
Maintainers
Readme
RAG MCP
MCP server for RAG, an open-source platform for Retrieval-Augmented Generation. Designed for developers who want to build intelligent, document-based applications quickly and efficiently.
Installation
using npm:
RAG_API_KEY=your-api-key npx @rag/mcp --ns your-namespace-idusing yarn:
RAG_API_KEY=your-api-key yarn dlx @rag/mcp --ns your-namespace-idusing pnpm:
RAG_API_KEY=your-api-key pnpm dlx @rag/mcp --ns your-namespace-idAdding to Claude
{
"mcpServers": {
"rag": {
"command": "npx",
"args": ["-y", "@rag/mcp@latest"],
"env": {
"RAG_API_KEY": "rag_xxx",
"RAG_NAMESPACE_ID": "ns_xxx"
}
}
}
}Tips
Passing namespace id as an environment variable
RAG_API_KEY=your-api-key RAG_NAMESPACE_ID=your-namespace-id npx @rag/mcpPassing a custom tool description
RAG_API_KEY=your-api-key npx @rag/mcp --ns your-namespace-id -d "Your custom tool description"Passing a tenant id:
RAG_API_KEY=your-api-key npx @rag/mcp --ns your-namespace-id -t your-tenant-idSelf-hosted RAG
If you're running a self-hosted RAG deployment, you can use this package which includes support for custom base URLs and insecure TLS (for self-signed certificates).
Installation:
npx rag-mcp-selfhosted@latestUsage with CLI flags:
RAG_API_KEY=rag_xxx npx rag-mcp-selfhosted \
--ns ns_xxx \
--base-url https://rag.your-company.com \
--insecure # only if using self-signed certsUsage with environment variables:
RAG_API_KEY=rag_xxx \
RAG_NAMESPACE_ID=ns_xxx \
RAG_BASE_URL=https://rag.your-company.com \
RAG_INSECURE_TLS=true \
npx rag-mcp-selfhostedIn Claude Desktop configuration:
{
"mcpServers": {
"rag": {
"command": "npx",
"args": ["-y", "rag-mcp-selfhosted@latest"],
"env": {
"RAG_API_KEY": "rag_xxx",
"RAG_NAMESPACE_ID": "ns_xxx",
"RAG_BASE_URL": "https://rag.your-company.com",
"RAG_INSECURE_TLS": "true"
}
}
}
}⚠️ Security Note: --insecure/RAG_INSECURE_TLS disables TLS certificate verification and should only be used with trusted endpoints (e.g., local dev with self-signed certs).
Package Info:
- npm: https://www.npmjs.com/package/rag-mcp-selfhosted
- Adds support for custom RAG base URLs
- Handles self-signed certificates for local/private deployments
API Reference
Visit the full documentation for more details.
