Install
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
Windows / Linux path
%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"io-github-masihmoafi-rag-mcp": {
"command": "uvx",
"args": [
"ragmcp-cli"
],
"env": {
"OPENROUTER_API_KEY": "<YOUR_VALUE>",
"RAG_MCP_RRF_K": "60",
"RAG_MCP_TOP_K": "5",
"RAG_MCP_MAX_DEPTH": "20",
"RAG_MCP_CHUNK_SIZE": "700",
"RAG_MCP_MAX_TOKENS": "2000000",
"RAG_MCP_EMBED_MODEL": "all-MiniLM-L6-v2",
"RAG_MCP_RERANK_TOP_K": "5",
"RAG_MCP_CHUNK_OVERLAP": "100",
"RAG_MCP_EMBED_API_KEY": "<VALUE>",
"RAG_MCP_RERANKER_TYPE": "cross-encoder",
"RAG_MCP_EMBED_BASE_URL": "<VALUE>",
"RAG_MCP_EMBED_PROVIDER": "sentencetransformer",
"RAG_MCP_RERANKER_MODEL": "cross-encoder/ms-marco-MiniLM-L-6-v2",
"RAG_MCP_WORKSPACE_ROOT": "<VALUE>"
}
}
}
}
Restart Claude Desktop to activate the new server.
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
Windows / Linux path
.cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global).cursor/mcp.json (project) or ~/.cursor/mcp.json (global){
"mcpServers": {
"io-github-masihmoafi-rag-mcp": {
"command": "uvx",
"args": [
"ragmcp-cli"
],
"env": {
"OPENROUTER_API_KEY": "<YOUR_VALUE>",
"RAG_MCP_RRF_K": "60",
"RAG_MCP_TOP_K": "5",
"RAG_MCP_MAX_DEPTH": "20",
"RAG_MCP_CHUNK_SIZE": "700",
"RAG_MCP_MAX_TOKENS": "2000000",
"RAG_MCP_EMBED_MODEL": "all-MiniLM-L6-v2",
"RAG_MCP_RERANK_TOP_K": "5",
"RAG_MCP_CHUNK_OVERLAP": "100",
"RAG_MCP_EMBED_API_KEY": "<VALUE>",
"RAG_MCP_RERANKER_TYPE": "cross-encoder",
"RAG_MCP_EMBED_BASE_URL": "<VALUE>",
"RAG_MCP_EMBED_PROVIDER": "sentencetransformer",
"RAG_MCP_RERANKER_MODEL": "cross-encoder/ms-marco-MiniLM-L-6-v2",
"RAG_MCP_WORKSPACE_ROOT": "<VALUE>"
}
}
}
}
Cursor usually picks up config changes automatically; if the server does not appear, reload the window.
Add to .mcp.json (project) or ~/.claude.json (global)
Windows / Linux path
.mcp.json (project) or %USERPROFILE%\.claude.json (global).mcp.json (project) or ~/.claude.json (global){
"mcpServers": {
"io-github-masihmoafi-rag-mcp": {
"command": "uvx",
"args": [
"ragmcp-cli"
],
"env": {
"OPENROUTER_API_KEY": "<YOUR_VALUE>",
"RAG_MCP_RRF_K": "60",
"RAG_MCP_TOP_K": "5",
"RAG_MCP_MAX_DEPTH": "20",
"RAG_MCP_CHUNK_SIZE": "700",
"RAG_MCP_MAX_TOKENS": "2000000",
"RAG_MCP_EMBED_MODEL": "all-MiniLM-L6-v2",
"RAG_MCP_RERANK_TOP_K": "5",
"RAG_MCP_CHUNK_OVERLAP": "100",
"RAG_MCP_EMBED_API_KEY": "<VALUE>",
"RAG_MCP_RERANKER_TYPE": "cross-encoder",
"RAG_MCP_EMBED_BASE_URL": "<VALUE>",
"RAG_MCP_EMBED_PROVIDER": "sentencetransformer",
"RAG_MCP_RERANKER_MODEL": "cross-encoder/ms-marco-MiniLM-L-6-v2",
"RAG_MCP_WORKSPACE_ROOT": "<VALUE>"
}
}
}
}
The server will be available in the next Claude Code session.
Add to .vscode/mcp.json
Windows / Linux path
.vscode\mcp.json.vscode/mcp.json{
"servers": {
"io-github-masihmoafi-rag-mcp": {
"command": "uvx",
"args": [
"ragmcp-cli"
],
"env": {
"OPENROUTER_API_KEY": "<YOUR_VALUE>",
"RAG_MCP_RRF_K": "60",
"RAG_MCP_TOP_K": "5",
"RAG_MCP_MAX_DEPTH": "20",
"RAG_MCP_CHUNK_SIZE": "700",
"RAG_MCP_MAX_TOKENS": "2000000",
"RAG_MCP_EMBED_MODEL": "all-MiniLM-L6-v2",
"RAG_MCP_RERANK_TOP_K": "5",
"RAG_MCP_CHUNK_OVERLAP": "100",
"RAG_MCP_EMBED_API_KEY": "<VALUE>",
"RAG_MCP_RERANKER_TYPE": "cross-encoder",
"RAG_MCP_EMBED_BASE_URL": "<VALUE>",
"RAG_MCP_EMBED_PROVIDER": "sentencetransformer",
"RAG_MCP_RERANKER_MODEL": "cross-encoder/ms-marco-MiniLM-L-6-v2",
"RAG_MCP_WORKSPACE_ROOT": "<VALUE>"
}
}
}
}
Reload the VS Code window to activate.
Add to ~/.codeium/windsurf/mcp_config.json
Windows / Linux path
%USERPROFILE%\.codeium\windsurf\mcp_config.json~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"io-github-masihmoafi-rag-mcp": {
"command": "uvx",
"args": [
"ragmcp-cli"
],
"env": {
"OPENROUTER_API_KEY": "<YOUR_VALUE>",
"RAG_MCP_RRF_K": "60",
"RAG_MCP_TOP_K": "5",
"RAG_MCP_MAX_DEPTH": "20",
"RAG_MCP_CHUNK_SIZE": "700",
"RAG_MCP_MAX_TOKENS": "2000000",
"RAG_MCP_EMBED_MODEL": "all-MiniLM-L6-v2",
"RAG_MCP_RERANK_TOP_K": "5",
"RAG_MCP_CHUNK_OVERLAP": "100",
"RAG_MCP_EMBED_API_KEY": "<VALUE>",
"RAG_MCP_RERANKER_TYPE": "cross-encoder",
"RAG_MCP_EMBED_BASE_URL": "<VALUE>",
"RAG_MCP_EMBED_PROVIDER": "sentencetransformer",
"RAG_MCP_RERANKER_MODEL": "cross-encoder/ms-marco-MiniLM-L-6-v2",
"RAG_MCP_WORKSPACE_ROOT": "<VALUE>"
}
}
}
}
Restart Windsurf (or refresh its MCP servers panel) to activate the new server.
Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.
Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Windows / Linux path
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json{
"mcpServers": {
"io-github-masihmoafi-rag-mcp": {
"command": "uvx",
"args": [
"ragmcp-cli"
],
"env": {
"OPENROUTER_API_KEY": "<YOUR_VALUE>",
"RAG_MCP_RRF_K": "60",
"RAG_MCP_TOP_K": "5",
"RAG_MCP_MAX_DEPTH": "20",
"RAG_MCP_CHUNK_SIZE": "700",
"RAG_MCP_MAX_TOKENS": "2000000",
"RAG_MCP_EMBED_MODEL": "all-MiniLM-L6-v2",
"RAG_MCP_RERANK_TOP_K": "5",
"RAG_MCP_CHUNK_OVERLAP": "100",
"RAG_MCP_EMBED_API_KEY": "<VALUE>",
"RAG_MCP_RERANKER_TYPE": "cross-encoder",
"RAG_MCP_EMBED_BASE_URL": "<VALUE>",
"RAG_MCP_EMBED_PROVIDER": "sentencetransformer",
"RAG_MCP_RERANKER_MODEL": "cross-encoder/ms-marco-MiniLM-L-6-v2",
"RAG_MCP_WORKSPACE_ROOT": "<VALUE>"
}
}
}
}
Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.
Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.
Configuration
Environment variables this server reads. Secrets stay on your machine.
| Name | Required | Description |
|---|---|---|
| OPENROUTER_API_KEY secret | No | OpenRouter key for answer synthesis and hosted reranking; exact-word search works without it |
| RAG_MCP_RRF_K | No | Reciprocal Rank Fusion constant. Default: 60 |
| RAG_MCP_TOP_K | No | Candidates pulled from vector search before fusion. Default: 5 |
| RAG_MCP_MAX_DEPTH | No | Directory-scan depth limit. Default: 20 |
| RAG_MCP_CHUNK_SIZE | No | Characters per chunk before overlap. Default: 700 |
| RAG_MCP_MAX_TOKENS | No | Directory-scan size limit. Default: 2000000 |
| RAG_MCP_EMBED_MODEL | No | Embedding model name, meaning depends on provider. Default: all-MiniLM-L6-v2 |
| RAG_MCP_RERANK_TOP_K | No | Results kept after reranking. Default: 5 |
| RAG_MCP_CHUNK_OVERLAP | No | Characters shared between adjacent chunks. Default: 100 |
| RAG_MCP_EMBED_API_KEY | No | API key, only used by openai_compatible provider. |
| RAG_MCP_RERANKER_TYPE | No | Reranker type: cross-encoder or disabled. Default: cross-encoder |
| RAG_MCP_EMBED_BASE_URL | No | Override endpoint for openai_compatible provider. Defaults to official OpenAI endpoint. |
| RAG_MCP_EMBED_PROVIDER | No | Embedding provider to use: sentencetransformer (local), ollama (local server), or openai_compatible (remote). Default: sentencetransformer |
| RAG_MCP_RERANKER_MODEL | No | Reranker model, used when type is cross-encoder. Default: cross-encoder/ms-marco-MiniLM-L-6-v2 |
| RAG_MCP_WORKSPACE_ROOT | No | The root directory to search by default. Can be overridden with the doc_path parameter. If unset, the server uses the current working directory. |