Rag.NET.Mcp 1.8.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rag.NET.Mcp --version 1.8.1
                    
NuGet\Install-Package Rag.NET.Mcp -Version 1.8.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rag.NET.Mcp" Version="1.8.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rag.NET.Mcp" Version="1.8.1" />
                    
Directory.Packages.props
<PackageReference Include="Rag.NET.Mcp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Rag.NET.Mcp --version 1.8.1
                    
#r "nuget: Rag.NET.Mcp, 1.8.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Rag.NET.Mcp@1.8.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Rag.NET.Mcp&version=1.8.1
                    
Install as a Cake Addin
#tool nuget:?package=Rag.NET.Mcp&version=1.8.1
                    
Install as a Cake Tool

Rag.NET.Mcp

NuGet Downloads Docs .NET License GitHub Sponsors

Part of Rag.NET — a modular RAG pipeline for .NET built on Microsoft.Extensions.AI. Ships as 74 packages; install only what you call. Documentation · Choosing packages

Model Context Protocol server for Rag.NET: AddRagNetMcpServer() exposes your pipeline to MCP hosts (Claude Desktop, IDEs, agents) as the rag_retrieve, rag_ask and rag_ingest tools, over stdio or HTTP/SSE transports.

Install

dotnet add package Rag.NET.Mcp

Prefer zero code? Rag.NET.Mcp.Tool ships the same server as a dotnet tool.

Setup

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Rag.NET.DependencyInjection;
using Rag.NET.Mcp.DependencyInjection;

var builder = Host.CreateApplicationBuilder(args);

builder.Services.AddRagNet();  // configure your pipeline as usual

builder.Services
    .AddRagNetMcpServer()
    .WithStdioTransport();     // subprocess transport for Claude Desktop

using var host = builder.Build();
// Run the host as usual — the MCP server starts and stops with it.

Example

For multiple concurrent clients, serve HTTP/SSE instead of stdio. Rag.NET.Mcp deliberately does not reference ModelContextProtocol.AspNetCore — taking that dependency would force ASP.NET Core on every consumer hosting MCP tools in a non-web process — so HTTP transport is configured through the IMcpServerBuilder the MCP SDK itself returns, exposed here as McpServerBuilder.Server.

Add ModelContextProtocol.AspNetCore to your own project, then call the SDK's own WithHttpTransport() on .Server, map its endpoints, and supply any authentication as ordinary ASP.NET Core middleware — this package wires the transport and nothing else.

No example is shown here on purpose. Those APIs belong to ASP.NET Core and the SDK's ASP.NET package, neither of which this package ships or depends on, so an example using them could not be checked against what you actually install — and documentation that references APIs a package does not have is this repository's most-repeated defect. A complete, working HTTP host lives in docs/guide/mcp.mdx, and Rag.NET.Mcp.Tool is a runnable one.

Claude Desktop configuration for the stdio variant:

{
  "mcpServers": {
    "ragnet": { "command": "dotnet", "args": ["run", "--project", "path/to/your/host"] }
  }
}

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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Rag.NET.Mcp:

Package Downloads
Rag.NET.Mcp.AspNetCore

ASP.NET Core hosting for the Rag.NET MCP server: a guarded HTTP transport that refuses to serve an unauthenticated write surface. Split out of Rag.NET.Mcp so that package does not force a web framework on stdio consumers.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.10.3 0 11/19/2026
1.10.2 0 11/19/2026
1.10.1 45 11/18/2026
1.10.0 76 11/18/2026
1.9.2 122 11/16/2026
1.9.1 95 11/16/2026
1.9.0 96 11/15/2026
1.8.4 92 11/15/2026
1.8.3 95 11/15/2026
1.8.2 93 11/14/2026
1.8.1 95 11/14/2026
1.8.0 92 11/14/2026
1.6.0 113 11/10/2026
1.5.0 104 11/9/2026
1.4.1 103 11/9/2026
1.4.0 100 11/8/2026
1.3.10 95 11/8/2026
1.3.9 102 11/7/2026
1.3.8 101 11/6/2026
1.3.7 106 11/2/2026
Loading failed