Skip to main content
Glama
dryad-rag-mcp

dryad-rag-mcp

Official
by DryadAI

dryad-rag-mcp

A small Model Context Protocol server that exposes a RAG document-search API as agent-callable tools — rag_health, rag_ingest, and rag_query. It wraps dryad-rag-pipeline, so any MCP client (Claude Code, Claude Desktop, or your own client) can index and search markdown docs through tool calls instead of hand-rolled HTTP glue.

Why this exists

Most MCP server examples are toys that echo a string back. This one wraps a real, separately running HTTP service and is proven against it: the test suite spins up the actual FastAPI RAG service, spawns this server as a subprocess, connects a real MCP client over stdio, and asserts the retrieved chunks are semantically correct — not just that the tool call didn't crash.

Related MCP server: mcp-agentic-rag

Tools

Tool

Description

rag_health

Checks whether the RAG service is reachable.

rag_ingest

Re-indexes the configured document set.

rag_query

Searches the index; returns cited chunks with a similarity score. question (required), top_k (1-20, default 4).

Quickstart

npm install
npm run build

Point it at a running dryad-rag-pipeline instance:

RAG_API_BASE_URL=http://127.0.0.1:8000 npm start

Add to Claude Code

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

Or in .mcp.json:

{
  "mcpServers": {
    "dryad-rag": {
      "command": "node",
      "args": ["/path/to/dryad-rag-mcp/dist/server.js"],
      "env": { "RAG_API_BASE_URL": "http://127.0.0.1:8000" }
    }
  }
}

Running the tests

The test suite needs a checkout of dryad-rag-pipeline as a sibling directory (or set RAG_PIPELINE_DIR), with its Python virtualenv already set up:

git clone https://github.com/DryadAI/dryad-rag-pipeline ../dryad-rag-pipeline
cd ../dryad-rag-pipeline && python3 -m venv .venv && .venv/bin/pip install -r requirements-dev.txt
cd ../dryad-rag-mcp

npm run build
npm test

This starts the real RAG API on a test port, spawns this MCP server as a subprocess, connects an MCP Client over stdio, and exercises all three tools end to end — including asserting that a health question actually retrieves the FAQ/API-reference chunks that answer it, and that an out-of-range top_k is rejected.

Architecture

sequenceDiagram
    participant Agent as MCP Client (e.g. Claude)
    participant Server as dryad-rag-mcp (stdio)
    participant API as dryad-rag-pipeline (HTTP)

    Agent->>Server: callTool("rag_ingest")
    Server->>API: POST /ingest
    API-->>Server: {documents_ingested, chunks_created}
    Server-->>Agent: "Indexed 3 document(s)..."

    Agent->>Server: callTool("rag_query", {question})
    Server->>API: POST /query
    API-->>Server: ranked, cited chunks
    Server-->>Agent: formatted, citable text

License

MIT — see LICENSE.

Available Tools

3 tools
rag_healthRAG service health checkA

Check whether the dryad-rag-pipeline service at https://dryad-rag-pipeline.example.com is reachable.

Inputs: no named parameters.

rag_ingestIngest documents into the RAG indexA

Re-index the configured markdown document set on the RAG service. Call this once before rag_query if the index is empty or the docs changed.

Inputs: no named parameters.

rag_queryQuery the RAG indexA

Ask a question against the indexed documents and get back the most relevant chunks with their source file and a similarity score, for citation.

Inputs: question (required), top_k.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: health check, ingest/re-index, and query. There is no overlap or ambiguity between them.

    Naming Consistency5/5

    All tools follow a consistent 'rag_' prefix with a verb (health, ingest, query), forming a uniform and predictable naming pattern.

    Tool Count5/5

    Three tools is well-scoped for a focused RAG service, covering the core operations of health checking, indexing, and querying without excess.

    Completeness4/5

    The set covers the essential lifecycle for a RAG service: health, ingest, and query. A minor gap is lack of explicit index management (e.g., clear or list documents), but the configured document set makes ingest sufficient for updates.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Exposes document retrieval as an MCP tool, enabling LLMs to search a local vector store of markdown documents. Includes a retrieval evaluation harness to measure hit rate and MRR.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Exposes an existing RAG API as MCP tools, enabling health checks and document-based question answering with source evidence.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables retrieval-augmented generation over a local markdown corpus, allowing grounded, cited answers via an MCP tool or CLI.
      MIT