CSharpEssentials.LoggerHelper.MCP
5.2.0
See the version list below for details.
dotnet add package CSharpEssentials.LoggerHelper.MCP --version 5.2.0
NuGet\Install-Package CSharpEssentials.LoggerHelper.MCP -Version 5.2.0
<PackageReference Include="CSharpEssentials.LoggerHelper.MCP" Version="5.2.0" />
<PackageVersion Include="CSharpEssentials.LoggerHelper.MCP" Version="5.2.0" />
<PackageReference Include="CSharpEssentials.LoggerHelper.MCP" />
paket add CSharpEssentials.LoggerHelper.MCP --version 5.2.0
#r "nuget: CSharpEssentials.LoggerHelper.MCP, 5.2.0"
#:package CSharpEssentials.LoggerHelper.MCP@5.2.0
#addin nuget:?package=CSharpEssentials.LoggerHelper.MCP&version=5.2.0
#tool nuget:?package=CSharpEssentials.LoggerHelper.MCP&version=5.2.0
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 | Versions 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. |
-
net10.0
- CSharpEssentials.LoggerHelper (>= 5.2.0)
-
net8.0
- CSharpEssentials.LoggerHelper (>= 5.2.0)
-
net9.0
- CSharpEssentials.LoggerHelper (>= 5.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.