npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

file-rag-mcp

v1.0.42

Published

RAG Search MCP Server for document retrieval

Downloads

84

Readme

File RAG MCP Server

A Model Context Protocol (MCP) server for file-based Retrieval-Augmented Generation (RAG) search.

Introduction

This project implements a RAG-based server for document and information retrieval. It integrates with AI models using the Model Context Protocol, providing efficient document search and information extraction capabilities.

Key Features

  • Text file-based RAG search
  • MCP (Model Context Protocol) support
  • Embedding-based document retrieval
  • Real-time document processing

Supported File Types

The server supports the following text-based file formats:

  • .txt (Text files)
  • .md (Markdown)
  • .json (JSON)
  • .js (JavaScript)
  • .ts (TypeScript)
  • .html (HTML)
  • .css (CSS)
  • .csv (CSV)
  • .xml (XML)
  • .yaml/.yml (YAML)
  • Other plain text files

System Requirements

  • Node.js 18.0.0 or higher
  • npm or yarn package manager

Installation

Global Installation (Recommended)

npm install -g file-rag-mcp

Local Installation

  1. Clone the repository
git clone [repository-url]
cd file-rag-mcp
  1. Install dependencies
./install.sh
# or
npm install

Usage

Environment Variables

The server requires the following environment variable:

  • RAG_ALLOWED_DIRECTORIES: Comma-separated list of directories to allow access to
    # Example
    export RAG_ALLOWED_DIRECTORIES=/path/to/dir1,/path/to/dir2

Using npx (No Installation Required)

RAG_ALLOWED_DIRECTORIES=/path/to/documents npx file-rag-mcp

After Global Installation

RAG_ALLOWED_DIRECTORIES=/path/to/documents file-rag-mcp

Local Development

# Set environment variable
export RAG_ALLOWED_DIRECTORIES=/path/to/documents

# Then start the server
npm start

MCP Configuration Example

{
  "mcpServers": {
    "file-rag-mcp": {
      "command": "npx",
      "args": [
        "file-rag-mcp"
      ],
      "env": {
        "RAG_ALLOWED_DIRECTORIES": "/path/to/documents,/another/path"
      }
    }
  }
}

Project Structure

file-rag-mcp/
├── file-rag-mcp.js     # Main server application
├── embedding-module.js  # Embedding processing module
├── install.sh          # Installation script
└── package.json        # Project configuration and dependencies

Dependencies

  • @modelcontextprotocol/sdk: ^1.8.0 - SDK for MCP integration
  • zod: ^3.24.2 - Schema validation
  • zod-to-json-schema: ^3.24.5 - Convert Zod schemas to JSON schemas

License

Distributed under the MIT License. See LICENSE file for more information.

Author

Lee Jong Yun

Keywords

  • RAG (Retrieval-Augmented Generation)
  • MCP (Model Context Protocol)
  • Search
  • AI
  • LLM (Large Language Model)

Contributing

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Support

If you encounter any issues or have suggestions, please create an issue in the repository.