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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mcpflow.io/mcp-ragdocs-mcp-server

v1.0.1

Published

基于 RAG 的文档搜索和管理的 MCP 服务器

Readme

RagDocs MCP Server

此包由 MCPFlow 打包并发布到npm仓库。

基于 RAG 的文档搜索和管理的 MCP 服务器

安装与使用

直接使用npx运行:

npx @mcpflow.io/mcp-ragdocs-mcp-server

或者先安装后使用:

# 安装
npm install @mcpflow.io/mcp-ragdocs-mcp-server

# 使用
npx @mcpflow.io/mcp-ragdocs-mcp-server

使用方法

Installation

npm install -g @mcpservers/ragdocs

工具函数

initBrowser

Initializes the browser for web scraping operations.

参数:

  • none: No parameters required.

cleanup

Closes the browser instance.

参数:

  • none: No parameters required.

getEmbeddings

Generates embeddings for a given text.

参数:

  • text: The text for which embeddings are to be generated.

initCollection

Initializes the Qdrant collection with the specified name and vector size.

参数:

  • collectionName: The name of the Qdrant collection to initialize.

createCollection

Creates a new Qdrant collection with the specified name and vector size.

参数:

  • vectorSize: The size of the vectors to be used in the collection.
  • collectionName: The name of the Qdrant collection to create.

recreateCollection

Deletes an existing Qdrant collection and creates a new one with the specified name and vector size.

参数:

  • vectorSize: The size of the vectors to be used in the collection.
  • collectionName: The name of the Qdrant collection to recreate.

isHealthy

Checks if the Qdrant client is healthy.

参数:

  • none: No parameters required.

addDocument

Adds a document to the Qdrant collection.

参数:

  • doc: The document to add.

deleteDocument

Deletes a document from the Qdrant collection.

参数:

  • url: The URL of the document to delete.

generateEmbeddings

Generates embeddings for a given text.

参数:

  • text: The text for which embeddings are to be generated.

addDocumentation

Adds a document to the RAG system.

参数:

  • url: URL of the document to add.
  • content: Content of the document to add.
  • metadata: Metadata of the document.

fetchContent

Fetches and processes content from a URL.

参数:

  • url: URL to fetch content from.

chunkText

Chunks a given text into smaller pieces.

参数:

  • text: The text to chunk.
  • maxChunkSize: The maximum size of each chunk.

generateEmbeddings

Generates embeddings for text chunks.

参数:

  • chunks: Array of text chunks.

原始信息

原始README

RagDocs MCP Server

A Model Context Protocol (MCP) server that provides RAG (Retrieval-Augmented Generation) capabilities using Qdrant vector database and Ollama/OpenAI embeddings. This server enables semantic search and management of documentation through vector similarity.

Features

  • Add documentation with metadata
  • Semantic search through documents
  • List and organize documentation
  • Delete documents
  • Support for both Ollama (free) and OpenAI (paid) embeddings
  • Automatic text chunking and embedding generation
  • Vector storage with Qdrant

Prerequisites

  • Node.js 16 or higher
  • One of the following Qdrant setups:
    • Local instance using Docker (free)
    • Qdrant Cloud account with API key (managed service)
  • One of the following for embeddings:
    • Ollama running locally (default, free)
    • OpenAI API key (optional, paid)

Available Tools

1. add_document

Add a document to the RAG system.

Parameters:

  • url (required): Document URL/identifier
  • content (required): Document content
  • metadata (optional): Document metadata
    • title: Document title
    • contentType: Content type (e.g., "text/markdown")

2. search_documents

Search through stored documents using semantic similarity.

Parameters:

  • query (required): Natural language search query
  • options (optional):
    • limit: Maximum number of results (1-20, default: 5)
    • scoreThreshold: Minimum similarity score (0-1, default: 0.7)
    • filters:
      • domain: Filter by domain
      • hasCode: Filter for documents containing code
      • after: Filter for documents after date (ISO format)
      • before: Filter for documents before date (ISO format)

3. list_documents

List all stored documents with pagination and grouping options.

Parameters (all optional):

  • page: Page number (default: 1)
  • pageSize: Number of documents per page (1-100, default: 20)
  • groupByDomain: Group documents by domain (default: false)
  • sortBy: Sort field ("timestamp", "title", or "domain")
  • sortOrder: Sort order ("asc" or "desc")

4. delete_document

Delete a document from the RAG system.

Parameters:

  • url (required): URL of the document to delete

Installation

npm install -g @mcpservers/ragdocs

MCP Server Configuration

{
  "mcpServers": {
    "ragdocs": {
      "command": "node",
      "args": ["@mcpservers/ragdocs"],
      "env": {
        "QDRANT_URL": "http://127.0.0.1:6333",
        "EMBEDDING_PROVIDER": "ollama"
      }
    }
  }
}

Using Qdrant Cloud:

{
  "mcpServers": {
    "ragdocs": {
      "command": "node",
      "args": ["@mcpservers/ragdocs"],
      "env": {
        "QDRANT_URL": "https://your-cluster-url.qdrant.tech",
        "QDRANT_API_KEY": "your-qdrant-api-key",
        "EMBEDDING_PROVIDER": "ollama"
      }
    }
  }
}

Using OpenAI:

{
  "mcpServers": {
    "ragdocs": {
      "command": "node",
      "args": ["@mcpservers/ragdocs"],
      "env": {
        "QDRANT_URL": "http://127.0.0.1:6333",
        "EMBEDDING_PROVIDER": "openai",
        "OPENAI_API_KEY": "your-api-key"
      }
    }
  }
}

Local Qdrant with Docker

docker run -d --name qdrant -p 6333:6333 -p 6334:6334 qdrant/qdrant

Environment Variables

  • QDRANT_URL: URL of your Qdrant instance
    • For local: "http://127.0.0.1:6333" (default)
    • For cloud: "https://your-cluster-url.qdrant.tech"
  • QDRANT_API_KEY: API key for Qdrant Cloud (required when using cloud instance)
  • EMBEDDING_PROVIDER: Choice of embedding provider ("ollama" or "openai", default: "ollama")
  • OPENAI_API_KEY: OpenAI API key (required if using OpenAI)
  • EMBEDDING_MODEL: Model to use for embeddings
    • For Ollama: defaults to "nomic-embed-text"
    • For OpenAI: defaults to "text-embedding-3-small"

License

Apache License 2.0