CSharpEssentials.LoggerHelper.MCP 5.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package CSharpEssentials.LoggerHelper.MCP --version 5.2.1
                    
NuGet\Install-Package CSharpEssentials.LoggerHelper.MCP -Version 5.2.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="CSharpEssentials.LoggerHelper.MCP" Version="5.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CSharpEssentials.LoggerHelper.MCP" Version="5.2.1" />
                    
Directory.Packages.props
<PackageReference Include="CSharpEssentials.LoggerHelper.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 CSharpEssentials.LoggerHelper.MCP --version 5.2.1
                    
#r "nuget: CSharpEssentials.LoggerHelper.MCP, 5.2.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 CSharpEssentials.LoggerHelper.MCP@5.2.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=CSharpEssentials.LoggerHelper.MCP&version=5.2.1
                    
Install as a Cake Addin
#tool nuget:?package=CSharpEssentials.LoggerHelper.MCP&version=5.2.1
                    
Install as a Cake Tool

CSharpEssentials.LoggerHelper.MCP

Give your AI assistant eyes into your logs.

CSharpEssentials.LoggerHelper.MCP adds a zero-dependency Model Context Protocol (MCP) server to any ASP.NET Core application that uses LoggerHelper. Point Claude, Cursor, GitHub Copilot, or any MCP-compatible client at /mcp and ask questions like:

  • "Are all sinks healthy?"
  • "Show me the last 10 logging errors"
  • "What levels does the Email sink receive?"

No dashboard to stand up. No extra infrastructure. Just one POST endpoint and four tools.


Install

dotnet add package CSharpEssentials.LoggerHelper.MCP

Requires: CSharpEssentials.LoggerHelper ≥ 5.1.0


Wire up (Program.cs)

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddLoggerHelper(builder.Configuration);
builder.Services.AddLoggerHelperMcp();   // ← register MCP tools

var app = builder.Build();
app.UseLoggerHelper();
app.MapLoggerHelperMcp("/mcp");          // ← expose POST /mcp

app.Run();

Available MCP Tools

Tool Description
loggerhelper_get_health Overall status: OK / WARNING / CRITICAL, sink count, error count
loggerhelper_get_errors Recent sink errors (accepts optional count parameter)
loggerhelper_get_sinks All configured sinks with ACTIVE/FAILED status and log levels
loggerhelper_get_config App name, routing rules, and masking settings

Example: Call via curl

# List available tools
curl -X POST http://localhost:5000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

# Get health status
curl -X POST http://localhost:5000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"loggerhelper_get_health","arguments":{}}}'

# Get last 5 errors
curl -X POST http://localhost:5000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"loggerhelper_get_errors","arguments":{"count":5}}}'

Connect to Claude Desktop / Cursor

Add to your MCP client config:

{
  "mcpServers": {
    "loggerhelper": {
      "url": "http://localhost:5000/mcp",
      "transport": "http"
    }
  }
}

Then ask Claude: "Check my LoggerHelper sink health" — and it will call loggerhelper_get_health and return a natural-language summary.


Why this matters

Serilog and NLog have no built-in AI tooling. With LoggerHelper MCP:

  • AI assistants can diagnose logging issues without reading log files
  • Zero additional infrastructure (no Seq, no Kibana, no dashboard)
  • Works with any MCP client (Claude, Cursor, VS Code Copilot, custom agents)
  • Zero external dependencies — pure System.Text.Json + ASP.NET Core

Transport

The MCP server implements the Streamable HTTP transport (MCP spec 2024-11-05):

  • POST /mcp → JSON-RPC 2.0 request/response

Supported JSON-RPC methods: initialize, tools/list, tools/call.


Docs

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.2.2 94 6/30/2026
5.2.1 90 6/30/2026
5.2.0 95 6/29/2026
5.1.0 101 6/16/2026