Rag.NET.Mcp.Tool 1.0.0

dotnet tool install --global Rag.NET.Mcp.Tool --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Rag.NET.Mcp.Tool --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Rag.NET.Mcp.Tool&version=1.0.0
                    
nuke :add-package Rag.NET.Mcp.Tool --version 1.0.0
                    

Rag.NET.Mcp.Tool

A self-contained Model Context Protocol server for Rag.NET, packaged as a .NET global tool (ragnet-mcp) — run a RAG-backed MCP server from configuration alone, no C# project required.

Install

dotnet tool install -g Rag.NET.Mcp.Tool

Configure

The tool wires its pipeline — chat client, embedding generator, vector store — from an appsettings.json next to its working directory, or from environment variables (using __ as the section separator, e.g. RagNet__ChatClient__ApiKey) — the standard .NET configuration layering WebApplication.CreateBuilder(args) already provides. A sample appsettings.sample.json, showing every supported VectorStore:Kind, ships alongside the installed binaries; copy it to appsettings.json and fill in real values.

{
  "RagNet": {
    "ChatClient": {
      "Endpoint": "https://api.openai.com/v1",
      "ApiKey": "…",
      "Model": "gpt-4o-mini"
    },
    "Embeddings": {
      "Endpoint": "https://api.openai.com/v1",
      "ApiKey": "…",
      "Model": "text-embedding-3-small",
      "VectorDimensions": 1536
    },
    "VectorStore": {
      "Kind": "InMemory | Qdrant | PgVector",
      "Qdrant": { "Host": "…", "Port": 6334, "CollectionName": "…" },
      "PgVector": { "ConnectionString": "…" }
    }
  }
}

The chat client and embedding generator both go through one OpenAI-compatible endpoint — that covers OpenAI, Azure OpenAI, OpenRouter, Ollama, and LM Studio, since they all speak the same wire API. The vector store is one of three kinds: InMemory (the default, zero setup, but every ingested document is lost when the process exits — a warning is logged at startup), Qdrant, or PgVector.

A misconfigured setting — an unrecognised Kind, a missing Endpoint/Model, an absent or non-positive VectorDimensions — fails at startup with a message naming both the setting and the configuration key that fixes it, rather than failing the first time an MCP client calls a tool.

Need a provider outside that set — Weaviate, Pinecone, Chroma, Azure AI Search, ONNX embeddings, or a bespoke IChatClient? Host the Rag.NET.Mcp library directly in your own application and register whatever you like; this tool covers the bounded, OpenAI-compatible set above and nothing wider.

Run

# stdio transport (Claude Desktop subprocess)
ragnet-mcp

# HTTP/SSE on port 5050 with API-key auth
ragnet-mcp --transport http --port 5050 --api-key your-secret

# Behind a gateway that already authenticates — has to be said out loud
ragnet-mcp --transport http --port 5050 --allow-anonymous

The HTTP transport refuses to start without an authentication decision. It exposes ingest, retrieve and ask, and binds every interface rather than loopback — so --transport http with neither --api-key (or RAGNET_MCP_API_KEY) nor --allow-anonymous exits with a message naming both ways out, rather than serving your store to the network. --allow-anonymous starts and logs a warning each run.

--allow-anonymous never weakens a key you did configure: supply both and the key still decides, so a stray flag in a script cannot quietly disable authentication.

Claude Desktop configuration for the stdio variant:

{
  "mcpServers": {
    "ragnet": { "command": "ragnet-mcp" }
  }
}

The server exposes the rag_retrieve, rag_ask and rag_ingest tools to the MCP host. Hosting the server inside your own application instead? Use the Rag.NET.Mcp library package.

Full guide

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.0 90 9/15/2026
0.1.0 115 8/11/2026