DotNetRepoInspector.Mcp 1.4.0

There is a newer version of this package available.
See the version list below for details.
{
  "inputs": [
    {
      "type": "promptString",
      "id": "root",
      "description": "Existing repository directory to inspect."
    }
  ],
  "servers": {
    "DotNetRepoInspector.Mcp": {
      "type": "stdio",
      "command": "dnx",
      "args": ["DotNetRepoInspector.Mcp@1.4.0", "--yes", "--", "--root", "${input:root}"]
    }
  }
}
                    
This package contains an MCP Server. The server can be used in VS Code by copying the generated JSON to your VS Code workspace's .vscode/mcp.json settings file.
dotnet tool install --global DotNetRepoInspector.Mcp --version 1.4.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local DotNetRepoInspector.Mcp --version 1.4.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=DotNetRepoInspector.Mcp&version=1.4.0
                    
nuke :add-package DotNetRepoInspector.Mcp --version 1.4.0
                    

DotNetRepoInspector

Languages: English | Português (Brasil)

Build & Tests Quality Gate Status NuGet .NET Coverage License: MIT GitHub Marketplace

Inspect and classify .NET projects using evaluated MSBuild metadata for CI/CD, automation, architecture governance, and optional historical evidence.

Status: v1.0.0 stable baseline. The public v1 contract is defined and validated in CI. Official artifacts are published only through the protected Release workflow.

What v1 does

DotNetRepoInspector produces one deterministic, machine-readable view of a .NET repository without requiring source-code analysis or an external database.

The v1 surface includes:

  • discovery of SDK-style .NET projects;
  • evaluated MSBuild facts such as SDKs, target frameworks, output type, test metadata, packability, runtime identifiers, and ProjectReference edges;
  • global.json and resolved SDK metadata;
  • Git repository, commit, branch, remote, and dirty-state metadata when available;
  • deterministic base classification: Web, Worker, Console, Library, Test, and Unknown;
  • versioned inspection JSON (schemaVersion 1.3 for v1.0.0);
  • optional repository configuration for exclusions and explicit classification overrides;
  • CLI/.NET Tool and reusable Composite GitHub Action;
  • optional HTTP/webhook snapshot persistence with provenance and idempotency;
  • structured diagnostics, cancellation, cross-platform compatibility checks, security hardening, performance guardrails, and validation against pinned public repositories.

Application subtypes and the optional policy engine are post-v1 work and are not part of the v1.0.0 compatibility promise.

Design principles

  • MSBuild is the source of truth. Effective evaluated properties take precedence over raw project XML heuristics.
  • Zero configuration by default. A useful inspection requires only a repository path.
  • Automation first. Output is deterministic, machine-readable, and suitable for CI/CD.
  • No source-code collection. The Inspector focuses on project/repository metadata.
  • Persistence is optional. Inspection works without a database, HTTP endpoint, or cloud account.
  • Provider agnostic. GitHub Actions is a delivery integration, not the core architecture.
  • Versioned public contracts. Product, Action, CLI, and JSON compatibility rules are documented and release-gated.

JSON contract

The v1.0.0 release baseline uses inspection schema 1.3. A representative payload is:

{
  "schemaVersion": "1.3",
  "repository": {
    "name": "sample-service",
    "commitSha": "0123456789abcdef0123456789abcdef01234567",
    "branch": "main",
    "remoteUrl": "https://github.com/example/sample-service.git",
    "isDirty": false
  },
  "dotNetSdk": {
    "globalJsonPath": "global.json",
    "configured": {
      "version": "10.0.100",
      "rollForward": "latestFeature",
      "allowPrerelease": false
    },
    "resolvedVersion": "10.0.100"
  },
  "projects": [
    {
      "path": "src/App/App.csproj",
      "name": "App",
      "resolvedSdkVersion": "10.0.100",
      "sdks": [
        { "name": "Microsoft.NET.Sdk.Web" }
      ],
      "targetFrameworks": ["net10.0"],
      "outputType": "Exe",
      "isTestProject": false,
      "isPackable": false,
      "runtimeIdentifiers": [],
      "classification": {
        "kind": "web",
        "confidence": "high",
        "signals": ["sdk:Microsoft.NET.Sdk.Web"]
      },
      "references": [],
      "diagnostics": []
    }
  ],
  "diagnostics": []
}

The canonical example and full contract are maintained in docs/en/schema/. Additive schema changes remain inside major 1; a breaking schema change requires a new schema and product major and must not move the v1 Action alias.

Install as a .NET Tool

Package ID: DotNetRepoInspector
Tool command: dotnet-repo-inspect
Supported public invocation: dotnet repo-inspect

The package targets .NET 10 and requires a compatible .NET runtime/SDK to execute.

The CLI package is published on NuGet.org. Version 1.1.0 is the latest verified public release at the time of this documentation update; pin exact versions for reproducible automation.

Install the current documented public version:

dotnet tool install --global DotNetRepoInspector --version 1.1.0
dotnet repo-inspect --version
dotnet repo-inspect .

A repository can also pin the tool in a local tool manifest:

dotnet new tool-manifest
dotnet tool install DotNetRepoInspector --version 1.1.0
dotnet repo-inspect .

Contributors can build and install an unpublished local package. See docs/en/cli.md.

CLI usage

Inspect the current repository and emit JSON to stdout:

dotnet repo-inspect .

Write the report to a file:

dotnet repo-inspect . --output artifacts/inspection.json

Use optional exclusions/classification overrides:

dotnet repo-inspect . \
  --exclude generated \
  --classify src/App/App.csproj=web

The default .dotnetrepoinspector.json file is optional. See docs/en/configuration.md for its versioned format and precedence rules.

The CLI keeps machine data on stdout/output files and operational logs on stderr. Documented exit codes distinguish report errors, invalid arguments, fatal inspection, output failure, fatal persistence failure, and cancellation. See docs/en/cli.md.

MCP server

DotNetRepoInspector.Mcp exposes the same deterministic Engine facts to local MCP clients through six read-only tools over stdio. The server is an additional delivery adapter; the CLI, inspection JSON, and the product's primary repository-inspection purpose remain unchanged.

The current development build is started with an explicit repository boundary:

dotnet src/DotNetRepoInspector.Mcp/bin/Release/net10.0/DotNetRepoInspector.Mcp.dll \
  --root /absolute/path/to/repository

The server does not call an LLM or include provider SDKs. OpenAI Codex CLI has completed a real client smoke test; Claude Code and Gemini CLI configurations are documented but remain unvalidated in this project environment.

DotNetRepoInspector.Mcp is packaged as a framework-dependent .NET Tool and NuGet McpServer, with command dotnet-repo-inspector-mcp and an embedded .mcp/server.json. The planned first stable package version is 1.2.0. It has passed controlled-feed packaging and protocol gates, but it is not published to NuGet.org and GA remains blocked by the protected publication and release-approval gates. Additional Claude Code and Gemini CLI validation is tracked as non-blocking interoperability evidence. After a protected publication, the exact stable version can be launched with:

dnx DotNetRepoInspector.Mcp@1.2.0 --yes -- --root /absolute/path/to/repository

See the MCP user guide for setup, client configuration, tool schemas, examples, security boundaries, and troubleshooting. The client compatibility matrix records the evidence and pending validations; GA readiness is the source of truth for publication status.

GitHub Action

Available on GitHub Marketplace: DotNetRepoInspector. Use @v1 to follow compatible v1 releases or pin an immutable tag such as @v1.1.0 for maximum reproducibility.

The repository contains a reusable Composite Action that runs the exact .NET Tool version pinned by the Action revision:

- name: Checkout
  uses: actions/checkout@v7

- name: Inspect .NET repository
  id: inspect
  uses: rodri-oliveira-dev/DotNetRepoInspector@v1
  with:
    path: .
    output: artifacts/inspection.json

Outputs include report-path, schema-version, inspector-version, and exit-code. The Action does not require write permissions or a GitHub token for inspection of an already checked-out repository.

The public @v1 alias is available for direct use in GitHub Actions. Immutable version tags such as @v1.0.0 and @v1.1.0 can be used when exact reproducibility is preferred. See docs/en/github-action.md.

Optional HTTP snapshot persistence

Persistence is disabled unless a sink is selected. The built-in HTTP/webhook sink sends the canonical InspectionSnapshot to a consumer-owned endpoint and includes the snapshot idempotency key in the Idempotency-Key header.

dotnet repo-inspect . \
  --sink http \
  --sink-url https://evidence.example/api/snapshots

Bearer credentials are supplied only through the environment, not a CLI argument:

export DOTNET_REPO_INSPECTOR_HTTP_TOKEN="<secret>"
dotnet repo-inspect . \
  --sink http \
  --sink-url https://evidence.example/api/snapshots \
  --sink-failure-mode fatal

Persistence is non-fatal by default. In fatal mode, a delivery failure returns exit code 5 after the inspection report has already been produced. See docs/en/persistence.md.

Compatibility and trust boundary

The Inspector itself targets .NET 10. CI validates target repositories using .NET 8 and .NET 10 SDKs side-by-side on Ubuntu, Windows, and macOS.

MSBuild evaluation is not a sandbox. Untrusted repositories should be inspected only in isolated, ephemeral, non-privileged environments without credentials or sensitive data. See SECURITY.md and docs/en/security.md.

Release readiness

The v1.0.0 baseline is machine-readable in .github/release-readiness-v1.json and enforced by repository tests. It locks together the product version, schema version, Action major alias, NuGet/.NET Tool metadata, canonical schema example, and required governance/security files.

The first-publication checklist, external GitHub/NuGet prerequisites, safe dry-run procedure, and post-publication verification are documented in docs/en/v1-release-readiness.md. General SemVer, release artifacts, tags, provenance, and recovery rules are in docs/en/releases.md.

This PR/repository preparation does not itself publish a package, tag, or GitHub Release. Official publication is an explicit protected workflow action.

Documentation

Architecture

Repository
    |
    v
Inspection Engine ----> InspectionReport ----> JSON output
                           |
                           | optional
                           v
                 Snapshot Persistence
                           |
                           v
                    HTTP/webhook

Delivery hosts: CLI / .NET Tool and GitHub Action
Post-v1 adapters: additional sinks, policy/reporting, richer subtypes

DotNetRepoInspector.Core owns normalized contracts/classification. MSBuild and Git collection remain adapters. DotNetRepoInspector.Persistence owns provider-neutral snapshot/provenance contracts, and DotNetRepoInspector.Persistence.Http is the first concrete sink. Core and Engine remain independent from HTTP/database providers and credentials.

Contributing

External contributions are supported. Start with CONTRIBUTING.md, follow the CODE_OF_CONDUCT.md, and use SECURITY.md for vulnerability reporting rather than public issues.

Classification changes require reproducible synthetic fixtures and evaluated evidence; public repositories may reveal a bug but do not replace a permanent local regression fixture.

Roadmap after v1.0.0

The v1 foundation is complete in code and release automation. Publication itself remains an explicit protected operation. Post-v1 work includes richer application subtypes, additional persistence adapters when justified, and an optional policy layer over the normalized contract.

See tracking issue #30 for the first-public-release roadmap and the dedicated post-MVP issues for further evolution.

License

DotNetRepoInspector is licensed under the MIT License.

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.

This package has no dependencies.

Version Downloads Last Updated
1.6.5 103 10/2/2026
1.6.0 107 9/29/2026
1.5.2 116 9/21/2026
1.5.1 94 9/21/2026
1.4.0 98 9/21/2026