McpLense 0.17.1

dotnet add package McpLense --version 0.17.1
                    
NuGet\Install-Package McpLense -Version 0.17.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="McpLense" Version="0.17.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="McpLense" Version="0.17.1" />
                    
Directory.Packages.props
<PackageReference Include="McpLense" />
                    
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 McpLense --version 0.17.1
                    
#r "nuget: McpLense, 0.17.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 McpLense@0.17.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=McpLense&version=0.17.1
                    
Install as a Cake Addin
#tool nuget:?package=McpLense&version=0.17.1
                    
Install as a Cake Tool

McpLense

A .NET CLI and library for exploring, debugging, and security-scanning Model Context Protocol (MCP) servers. Inspect what a server exposes, classify its auth, audit its TLS/OAuth posture, turn the facts into severity-rated security findings (with a CI gate and SARIF output), generate example calls, triage "why won't it connect?", trace the JSON-RPC wire, and even run McpLense itself as an MCP server so an agent can audit other MCPs.

The scan pipeline is deliberately fact-only (it extracts data, never labels it); the opt-in analyze layer is a separate consumer that classifies those facts into findings.

Quick start

McpLense ships as the McpLense.Cli .NET tool (command: mcplense). On .NET 10 you can run it without installing anything using dnx:

dnx McpLense.Cli inspect https://mcp.context7.com/mcp          # list tools / resources / prompts
dnx McpLense.Cli analyze https://your-server/mcp --fail-on high # security findings (CI gate)
dnx McpLense.Cli explain https://your-server/mcp               # plain-language "what is this MCP"
dnx McpLense.Cli doctor  https://your-server/mcp               # "why won't it connect?" triage

Prefer a persistent install? Install once and use the mcplense command:

dotnet tool install -g McpLense.Cli
mcplense inspect https://mcp.context7.com/mcp

For a stdio MCP server, pass the command after --:

dnx McpLense.Cli inspect -- npx -y @modelcontextprotocol/server-everything

What it does

  • Exploreinspect / tools / resources / prompts; call / read / prompt to invoke; call <tool> --example generates a ready-to-edit --args template; explain narrates a server in plain language; mcplense tui is an interactive explorer.
  • Securescan runs the fact-only check pipeline; analyze turns it into severity-rated findings (prompt-injection signals, anonymous destructive tools, weak CORS, TLS posture, rug-pull detection, …). --fail-on <severity> is a CI gate; --format sarif uploads to GitHub code scanning; --approve/--since snapshot and detect tool changes.
  • Debugdoctor walks DNS → TCP → TLS → MCP initialize → auth with fix-it hints; --trace logs the JSON-RPC wire traffic; --watch <seconds> re-runs on an interval and flags changes.
  • Embed — reference the McpLense library to run scans in your own tooling or add custom IScanCheck / finding rules.
  • Servemcplense serve runs McpLense as a stdio MCP server, exposing mcplense_inspect / mcplense_scan / mcplense_analyze / mcplense_explain as tools.
// Library: run the scan pipeline in-process
using McpLense.Scanning;
using McpLense.Analysis;

var report   = await ScanCommandDispatcher.RunAsync(target, timeout, null, null, ct);
var findings = new FindingsAnalyzer().Analyze(report);

Documentation

  • Agent Skillskills/mcplense/ is a portable Agent Skill; its references/ cover every command, auth, config, checks, and classification recipes.
  • Findings & CIdocs/analysis-rules.md (built-in rules, analysis config block, SARIF, rug-pull).
  • Scan checksdocs/scan-checks.md (every IScanCheck and its output).
  • Roadmapnext.md.

License

Unlicense — public domain.

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.

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
0.17.1 92 6/18/2026
0.17.0 98 6/18/2026
0.16.0 93 6/18/2026
0.15.0 94 6/18/2026
0.14.0 88 6/17/2026
0.13.0 91 6/17/2026
0.12.0 94 6/17/2026
0.11.0 94 6/17/2026
0.10.0 92 6/17/2026
0.9.0 95 6/14/2026
0.8.0 98 6/14/2026
0.7.0 94 6/13/2026
0.6.0 107 5/20/2026
0.5.0 98 5/20/2026
0.4.0 110 5/19/2026
0.3.0 112 5/18/2026
0.2.1 100 5/18/2026
0.2.0 95 5/18/2026
0.1.0 111 5/9/2026