Skip to main content
Glama

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

Related MCP server: MCP RAG with ChromaDB

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

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    A complete MCP server for Retrieval-Augmented Generation with file management and vector memory for agents. Supports multiple document formats (PDF, DOCX, TXT, MD, CSV, JSON) with semantic search using Hugging Face embeddings and ChromaDB for efficient vector storage.
    Last updated
    11
    14
    1
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Provides retrieval-augmented generation (RAG) capabilities by ingesting various document formats into a persistent ChromaDB vector store. It enables semantic search and retrieval using either OpenAI or Ollama embeddings for processing local files, directories, and URLs.
    Last updated
    1
    MIT
  • F
    license
    -
    quality
    B
    maintenance
    Enables any MCP-compatible AI assistant to search, filter, and retrieve information from a local document collection using a hybrid search pipeline with vector, BM25, reranking, and LLM enrichment.
    Last updated
    4
  • A
    license
    A
    quality
    B
    maintenance
    Local-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.
    Last updated
    3
    25
    MIT

View all related MCP servers

Related MCP Connectors

  • Local-first RAG engine with MCP server for AI agent integration.

  • Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LuizDoPc/mcp-rag'

If you have feedback or need assistance with the MCP directory API, please join our Discord server