McpLense 0.17.1
dotnet add package McpLense --version 0.17.1
NuGet\Install-Package McpLense -Version 0.17.1
<PackageReference Include="McpLense" Version="0.17.1" />
<PackageVersion Include="McpLense" Version="0.17.1" />
<PackageReference Include="McpLense" />
paket add McpLense --version 0.17.1
#r "nuget: McpLense, 0.17.1"
#:package McpLense@0.17.1
#addin nuget:?package=McpLense&version=0.17.1
#tool nuget:?package=McpLense&version=0.17.1
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
- Explore —
inspect/tools/resources/prompts;call/read/promptto invoke;call <tool> --examplegenerates a ready-to-edit--argstemplate;explainnarrates a server in plain language;mcplense tuiis an interactive explorer. - Secure —
scanruns the fact-only check pipeline;analyzeturns 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 sarifuploads to GitHub code scanning;--approve/--sincesnapshot and detect tool changes. - Debug —
doctorwalks DNS → TCP → TLS → MCP initialize → auth with fix-it hints;--tracelogs the JSON-RPC wire traffic;--watch <seconds>re-runs on an interval and flags changes. - Embed — reference the
McpLenselibrary to run scans in your own tooling or add customIScanCheck/ finding rules. - Serve —
mcplense serveruns McpLense as a stdio MCP server, exposingmcplense_inspect/mcplense_scan/mcplense_analyze/mcplense_explainas 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 Skill —
skills/mcplense/is a portable Agent Skill; itsreferences/cover every command, auth, config, checks, and classification recipes. - Findings & CI —
docs/analysis-rules.md(built-in rules,analysisconfig block, SARIF, rug-pull). - Scan checks —
docs/scan-checks.md(everyIScanCheckand its output). - Roadmap —
next.md.
License
Unlicense — public domain.
| 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. |
-
net10.0
- Azure.Identity (>= 1.13.2)
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Http (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Identity.Client (>= 4.82.1)
- Microsoft.Identity.Client.Extensions.Msal (>= 4.82.1)
- ModelContextProtocol (>= 1.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.
| 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 |