Assay.Mcp
0.2.1
dotnet add package Assay.Mcp --version 0.2.1
NuGet\Install-Package Assay.Mcp -Version 0.2.1
<PackageReference Include="Assay.Mcp" Version="0.2.1" />
<PackageVersion Include="Assay.Mcp" Version="0.2.1" />
<PackageReference Include="Assay.Mcp" />
paket add Assay.Mcp --version 0.2.1
#r "nuget: Assay.Mcp, 0.2.1"
#:package Assay.Mcp@0.2.1
#addin nuget:?package=Assay.Mcp&version=0.2.1
#tool nuget:?package=Assay.Mcp&version=0.2.1
Assay
Code analysis for AI agents. A .NET CLI that builds a queryable graph from a C# solution — types, members, packages, dependencies, health signals — and emits structured markdown or JSON sized for LLM context windows.
Built so an AI coding agent can investigate a large C# codebase the way a human would: orient first, then drill down. Equally useful at the terminal for humans triaging an unfamiliar repo.
Install
dotnet tool install -g Assay
Requires the .NET 10 SDK.
Quick start
Run from any directory containing a .sln or .slnx:
assay overview # Solution structure, project table, health summary
assay health # Errors, failing tests, security findings
assay vulns # NuGet vulnerability scan
assay search OrderService # Fuzzy search across the codebase
Auto-detects a single solution file in the current directory. Pass a path explicitly for any other case (assay overview path/to/Solution.slnx).
What it does
Parses a C# solution into an immutable directed graph (CodeGraph) where every code element is a vertex and every relationship is an edge:
.sln/.slnx → structural parse → Roslyn enrichment → CodeGraph → queries → markdown/JSON
Graph contents: solutions, projects, namespaces, types, members, files, assemblies, packages, vulnerabilities, traits — connected by 10 relation types (References, Inherits, Implements, Contains, DependsOn, Tests, UsesPackage, HasVulnerability, Calls, Overrides). Calls/Overrides give a method-level call graph.
Caching: Results are cached by source hash in a per-user cache directory (ASSAY_CACHE_DIR, else $XDG_CACHE_HOME/assay or ~/.cache/assay on Unix/macOS, %LocalAppData%/assay on Windows). Subsequent runs skip Roslyn analysis entirely. --no-cache forces a fresh build.
How it differs from existing tools
dotnet list package/dotnet sln list— flat lists. Assay returns a queryable graph with semantic relations and health signals fused in.- Roslyn analyzers — produce diagnostics at compile time. Assay produces answers on demand: "what depends on this type", "which methods are highest CRAP risk", "what's the dependency path between A and B".
- IDE call hierarchies — interactive only. Assay is scriptable and emits structured output an agent or pipeline can consume.
Commands at a glance
| Command | What it shows |
|---|---|
assay overview |
Solution structure, project table, health summary |
assay health |
Errors, failing tests, security findings dashboard |
assay churn |
Git churn hotspots (most-changed files / types) |
assay crap |
High-risk methods by CRAP score (complexity × coverage) |
assay impact <subject> |
Blast radius of changing a type or member |
assay member <member> |
Member call graph: callers, callees, test reach |
assay path <from> <to> |
Dependency path between two entities |
assay vulns |
Known CVEs in NuGet packages |
assay licenses |
Package license report with policy checking |
assay type detail <type> |
Full type info: members, metrics, health |
assay type usages <type> |
Where a type is used across the solution |
assay type decompile <type> |
Decompile an external / NuGet type to C# |
assay tests gaps |
Types with insufficient test coverage |
assay mcp |
Run a stdio MCP server exposing the tools to agents |
Add --json for machine-readable output. Add --max-tokens N to size output to an LLM token budget. Names resolve by short/partial/full qualification; exit codes 0/2/64/66/70.
Sample output
$ assay vulns
# Vulnerabilities: SampleShop
**Packages scanned:** 5 | **Vulnerable:** 1
## High (1)
| Package | Version | Advisory | Fix Version | Projects |
|---------|---------|----------|-------------|----------|
| Newtonsoft.Json | 11.0.2 | https://github.com/advisories/GHSA-5crp-9r3c-p9vr | 13.0.1 | SampleShop.Infrastructure |
For AI coding agents
Assay is designed as a tool for AI coding agents. It ships three Claude Code Skills — assay-code-analysis, assay-test-coverage, and assay-dependencies — so the agent automatically reaches for assay when navigating a C# codebase:
assay skills install # Install to ~/.claude/skills/
assay skills install --local # Install to ./.claude/skills/
Or wire it in as an MCP server (Claude Code and other MCP clients):
{ "mcpServers": { "assay": { "command": "assay", "args": ["mcp"] } } }
| 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
- Assay.Analysis (>= 0.2.1)
- Assay.Core (>= 0.2.1)
- Assay.Testing (>= 0.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.