MCP server/ai-tools

MCP RAG Server MCP Server

Local RAG functionality using Ollama and Chroma vector database.

★ 1LuizDoPc/mcp-rag ↗by LuizDoPcupdated
Manual setup required. The maintainer's config contains paths only you know - edit the placeholders below before adding it to Claude Code.
1

Prepare the server locally

Run this once before adding it to Claude Code.

git clone https://github.com/LuizDoPc/mcp-rag
cd mcp-rag

Then follow the repository README for any remaining dependency or build steps.

2

Register it in Claude Code

claude mcp add mcp-rag -- node /path/to/dist/index.js

Replace any placeholder paths in the command with the real path on your machine.

3

Make your agent remember this setup

mcp-rag's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • Local processing with no external API costs
  • Supports PDF, Markdown, and TXT file formats
  • Configurable chunk size and overlap for context optimization
  • Semantic search using nomic-embed-text model via Ollama
  • Seamless integration with MCP-compatible clients like Cursor

Tools 4

ingest_docsIngest documents from a directory
searchSearch for relevant document chunks
get_chunkRetrieve a specific chunk by ID
refresh_indexClear and refresh the entire index

Try it

Search for information about project requirements in my local documents.
Ingest all new files from the ./docs folder into the vector database.
Find the most relevant chunks for the query 'how to configure the server'.
Refresh the document index to include recent changes.
Original README from LuizDoPc/mcp-rag

MCP RAG Server

A Model Context Protocol (MCP) server that provides RAG (Retrieval-Augmented Generation) functionality using local embeddings via Ollama and Chroma vector database.

Presentation link

Features

  • Local Processing: No external API costs - runs entirely locally
  • Multiple Formats: Supports PDF, Markdown, and TXT files
  • Smart Chunking: Configurable chunk size with overlap for better context
  • Vector Search: Semantic search using nomic-embed-text model via Ollama
  • MCP Integration: Works seamlessly with Cursor and other MCP clients

Prerequisites

  • Node.js (v18 or higher)
  • Docker (for ChromaDB)
  • Homebrew (for Ollama on macOS)

🚀 Quick Start

Setup (one time)

npm run setup

This will:

  • Start Ollama and install nomic-embed-text model
  • Start ChromaDB with Docker
  • Build the project
  • Ingest documents from ./docs

Development

# Start MCP server
npm run dev

# Ingest new documents
npm run ingest

Stop Services

npm run stop

Configuration

The server uses a config.json file for configuration:

{
  "documentsPath": "./docs",
  "chunkSize": 1000,
  "chunkOverlap": 200,
  "ollamaUrl": "http://localhost:11434",
  "embeddingModel": "nomic-embed-text",
  "chromaUrl": "http://localhost:8001",
  "collectionName": "rag_documents",
  "mcpServer": {
    "name": "mcp-rag-server",
    "version": "1.0.0"
  }
}

MCP Tools

  • ingest_docs({path?}) - Ingest documents from a directory
  • search({query, k?}) - Search for relevant document chunks
  • get_chunk({id}) - Retrieve a specific chunk by ID
  • refresh_index() - Clear and refresh the entire index

MCP Resources

  • rag://collection/summary - Collection statistics and metadata
  • rag://doc/<filename>#<chunk_id> - Individual document chunks

Configure in Cursor

Add to your Cursor MCP settings:

{
  "mcpServers": {
    "rag-server": {
      "command": "node",
      "args": ["/Users/luizsoares/Documents/buildaz/mcp_rag/dist/index.js"],
      "env": {}
    }
  }
}

Available Scripts

  • npm run setup - Complete setup (Ollama + ChromaDB + build + ingest)
  • npm run dev - Start MCP server in development mode
  • npm run ingest - Ingest documents
  • npm run build - Build the project
  • npm run test - Run tests
  • npm run stop - Stop all services

Troubleshooting

  1. Ollama Connection Issues: Ensure Ollama is running on the configured URL
  2. Model Not Found: Run ollama pull nomic-embed-text to install the embedding model
  3. Docker Issues: Ensure Docker is running and accessible

Frequently Asked Questions

What are the key features of MCP RAG Server?

Local processing with no external API costs. Supports PDF, Markdown, and TXT file formats. Configurable chunk size and overlap for context optimization. Semantic search using nomic-embed-text model via Ollama. Seamless integration with MCP-compatible clients like Cursor.

What can I use MCP RAG Server for?

Querying local technical documentation or project notes. Searching through large collections of research papers or PDFs. Building a private knowledge base that stays on your machine. Retrieving specific context from local text files for AI-assisted coding.

How do I install MCP RAG Server?

Install MCP RAG Server by running: npm run setup

What MCP clients work with MCP RAG Server?

MCP RAG Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep MCP RAG Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest