Rag.NET.Mcp
1.8.2
See the version list below for details.
dotnet add package Rag.NET.Mcp --version 1.8.2
NuGet\Install-Package Rag.NET.Mcp -Version 1.8.2
<PackageReference Include="Rag.NET.Mcp" Version="1.8.2" />
<PackageVersion Include="Rag.NET.Mcp" Version="1.8.2" />
<PackageReference Include="Rag.NET.Mcp" />
paket add Rag.NET.Mcp --version 1.8.2
#r "nuget: Rag.NET.Mcp, 1.8.2"
#:package Rag.NET.Mcp@1.8.2
#addin nuget:?package=Rag.NET.Mcp&version=1.8.2
#tool nuget:?package=Rag.NET.Mcp&version=1.8.2
Rag.NET.Mcp
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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.Hosting (>= 10.0.15)
- ModelContextProtocol (>= 2.4.0)
- Rag.NET (>= 1.8.2)
-
net11.0
- Microsoft.Extensions.Hosting (>= 10.0.15)
- ModelContextProtocol (>= 2.4.0)
- Rag.NET (>= 1.8.2)
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 | 43 | 11/19/2026 |
| 1.10.2 | 44 | 11/19/2026 |
| 1.10.1 | 64 | 11/18/2026 |
| 1.10.0 | 78 | 11/18/2026 |
| 1.9.2 | 122 | 11/16/2026 |
| 1.9.1 | 97 | 11/16/2026 |
| 1.9.0 | 97 | 11/15/2026 |
| 1.8.4 | 92 | 11/15/2026 |
| 1.8.3 | 95 | 11/15/2026 |
| 1.8.2 | 94 | 11/14/2026 |
| 1.8.1 | 96 | 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 |