setup-mcp

A setup command guide for connecting the RAG Retriever MCP server to Claude Code or another AI assistant. MCP is a way for an assistant to call an external tool through a configured server.

In plain words
What is it for?
Use it to install RAG Retriever, initialize its settings, add the server to Claude Code, or configure compatible assistants such as Windsurf or Cursor.
Why use it?
It explains the required installation, configuration, API key, and full executable path so the assistant can access RAG Retriever.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/codingthefuturewithai/rag-retriever/setup-mcp
Clone the repo
git clone --depth 1 https://github.com/codingthefuturewithai/rag-retriever

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 635 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00635
Opus 5 $0.00000 $0.00318
Sonnet 5 $0.00000 $0.00127
Haiku 4.5 $0.00000 $0.00064

Measured 2d ago against content hash 4c13e56c630e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup-mcp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/setup-mcp.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Setup RAG Retriever MCP Server

Configure the RAG Retriever MCP server for use with Claude Code commands.

Prerequisites

  • RAG Retriever installed via pipx install rag-retriever or local development setup
  • Claude Code with MCP support
  • OpenAI API key configured

Setup Steps

1. Install RAG Retriever

pipx install rag-retriever

2. Initialize Configuration

rag-retriever --init

3. Configure API Key

Edit your config file (location shown by init command):

api:
  openai_api_key: sk-your-api-key-here

4. Add MCP Server to Claude Code

First get your home directory:

echo $HOME

Add the MCP server using the FULL path. For example, if your home directory is /Users/timkitchens:

claude mcp add-json -s user rag-retriever '{"type":"stdio","command":"/Users/timkitchens/.local/bin/mcp-rag-retriever"}'

Important: Replace /Users/timkitchens with your actual home directory from the echo command above.

For Other AI Assistants (Windsurf, Cursor, etc.): Add this JSON configuration (replace with your actual home directory):

"rag-retriever": {
  "command": "/Users/yourusername/.local/bin/mcp-rag-retriever"
}

Windows users: Check pipx list for the exact path and use that full path in both cases.

5. Verify Setup

Run a Claude Code command to test:

/list-collections

6. Test with Real Content

Index Claude Code documentation to verify full functionality:

/index-website "https://docs.anthropic.com/en/docs/claude-code/overview 3 claude_code_docs"

Wait 1-2 minutes for crawling, then test search:

/search-knowledge "MCP server setup claude_code_docs"

Available MCP Tools

Once configured, you have access to:

  • list_collections() - Discover available collections
  • vector_search(query, collection_name, limit, score_threshold) - Search collections
  • crawl_and_index_url(url, max_depth, collection_name) - Index websites

Troubleshooting

  • Ensure OpenAI API key is valid and has credits
  • Check that Python can import rag_retriever.mcp
  • Verify MCP server is running with python -m rag_retriever.mcp --help
  • Check Claude Code logs for MCP connection issues

Read the full file on GitHub · 88 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 88 lines · 0 tokens per session scan A 4c13e56c630e

Subscribe to this mod's changes

setup-mcp is a command published in the GitHub repository codingthefuturewithai/rag-retriever (27 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 635 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.