Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ All notable changes to this project are documented here. The format is based on

## [Unreleased]

## [0.4.0-preview] - 2026-11-28

### Added

- `LintReport.ToHtml()` and `ToolSurfaceDiff.ToHtml()`: a self-contained HTML page (inline CSS, no scripts) with a banner, a summary and, when there are findings or changes, a table. Server text is sanitized and HTML-encoded.
- `mcpprobe lint --report <file>` and `mcpprobe diff --report <file>` also write that page. Stdout and exit codes are unchanged. The file is written on exit 0 and 1, not on a usage or connection error (exit 2).
- GitHub Action and Azure Pipelines template inputs `strict`, `transport`, and `report`. All three are off by default, so existing workflows keep the same CLI invocation. `report` is a directory (`lint.html` and `diff.html`); the job summary is unchanged, and artifact upload is left to the workflow (`actions/upload-artifact` / `PublishPipelineArtifact@1`). `report` requires a CLI that has `--report`; the wrapper fails fast if the installed tool does not.
- Options-first overloads for `McpProbeHost.VerifyToolSnapshotAsync`, `ToolSnapshot.Verify` and `ToolSnapshot.VerifyAsync`, so `VerifyToolSnapshotAsync(new SnapshotOptions { ... })` compiles. The existing path-first signatures are unchanged. The new overloads name their options parameter `snapshotOptions`, so a call that names only `options:` still binds to the path-first overload.

### Fixed

- The README Quickstart now includes a short `WeatherTools` type (with `UseStructuredContent`) and the missing usings, so it compiles and runs as written. The snapshot example shows a real `VerifyToolSnapshotAsync` call with `Log`. Notes were added for `*.received.json` in `.gitignore` and for the CLI's net8.0/net10.0 runtime and `DOTNET_ROOT`.

### Changed

- `lint --strict`: MCPP010 no longer reports the nullable spelling `[T, "null"]` (for example `["integer","null"]`), which the C# and Go SDKs emit for every nullable parameter. Unions of two or more non-null types, and longer unions that include `null`, are still reported, with a shorter message. This differs from Inspector's type-union check.
Expand All @@ -25,6 +23,7 @@ All notable changes to this project are documented here. The format is based on

### Fixed

- The README Quickstart now includes a short `WeatherTools` type (with `UseStructuredContent`) and the missing usings, so it compiles and runs as written. The snapshot example shows a real `VerifyToolSnapshotAsync` call with `Log`. Notes were added for `*.received.json` in `.gitignore` and for the CLI's net8.0/net10.0 runtime and `DOTNET_ROOT`.
- MCPP005 and MCPP006 no longer report "most names are X" when two styles tie. With no majority they report nothing.
- `--timeout N` now stops after about N seconds for a stdio server that does not exit (the SDK waited 5 more seconds before killing it; the grace period is now 500 ms), and the error no longer ends with the runtime's "A task was canceled.". A stdio server that needs more than 500 ms to exit after its stdin closes is now killed instead of waited for.
- HTTP connection errors are short and say what to try. A pinned `--transport sse` or `streamable-http` that gets a 400, 404 or 405 says the URL did not answer as that transport and points at the other one. A 401 shows the server's `WWW-Authenticate` challenge and says to pass `--header 'Authorization: Bearer <token>'`, or that the credentials in `--header` were rejected. Other response bodies are shown as one line of at most 200 characters with HTML tags removed, instead of a whole page. Exit codes are unchanged.
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<PropertyGroup Label="Package metadata">
<VersionPrefix>0.3.0</VersionPrefix>
<VersionPrefix>0.4.0</VersionPrefix>
<VersionSuffix>preview</VersionSuffix>
<Authors>Lior Shmueli</Authors>
<Copyright>Copyright (c) 2026 Lior Shmueli</Copyright>
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Test kit for MCP servers built with the [MCP C# SDK](https://github.com/modelcon

Works with any test framework: failures are plain `McpProbeAssertionException`s. Targets .NET 8 and .NET 10, on ModelContextProtocol 2.4.0.

> Status: 0.3.0-preview on NuGet. The API may change before 1.0.
> Status: 0.4.0-preview on NuGet. The API may change before 1.0.

![mcpprobe CLI: snapshot a server, lint it, then catch a breaking tool-surface change](docs/demo.gif)

Expand Down Expand Up @@ -152,7 +152,7 @@ MCPP013-MCPP016 run by default and use `FailOn` like MCPP001-MCPP007. They are k
Write a snapshot once and commit it, then check it in CI:

```bash
dotnet tool install --global McpProbe.Cli --version 0.3.0-preview
dotnet tool install --global McpProbe.Cli --version 0.4.0-preview

mcpprobe snapshot --stdio "dotnet run --project src/MyServer" --out mcp-tools.json
mcpprobe diff --stdio "dotnet run --project src/MyServer" --baseline mcp-tools.json
Expand All @@ -168,7 +168,7 @@ Exit codes: `0` passed, `1` check failed (breaking change or lint findings), `2`

### HTML report

`lint` and `diff` take `--report <file>` to also write a self-contained HTML page (inline CSS, no scripts): a banner, a one-line summary and, when there are findings or changes, a table. It is not in 0.3.0-preview; it comes with the next release. The text report on stdout and the exit code do not change, the file is written whether the check passed or failed (exit `0` or `1`), and nothing is written on a usage or connection error (exit `2`). In code, use `LintReport.ToHtml()` and `ToolSurfaceDiff.ToHtml()`.
`lint` and `diff` take `--report <file>` to also write a self-contained HTML page (inline CSS, no scripts): a banner, a one-line summary and, when there are findings or changes, a table. The text report on stdout and the exit code do not change, the file is written whether the check passed or failed (exit `0` or `1`), and nothing is written on a usage or connection error (exit `2`). In code, use `LintReport.ToHtml()` and `ToolSurfaceDiff.ToHtml()`.

```bash
mcpprobe lint --stdio "dotnet run --project src/MyServer" --report mcp-lint.html
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
10.0.x
- run: dotnet build -c Release
- name: Check MCP tool surface
uses: ShmueLior/mcpprobe@v0.3.0-preview
uses: ShmueLior/mcpprobe@v0.4.0-preview
with:
stdio: dotnet run --no-build --project src/MyServer -c Release
baseline: mcp-tools.json
Expand All @@ -224,7 +224,7 @@ Inputs follow the CLI: `stdio`, `http`, or `from-file` (exactly one), plus `base

`strict`, `transport`, and `report` are off by default, so an unchanged workflow runs the same commands as before. `strict` is lint-only. `transport` is only used with `http`. `report` is a directory, not a file: the Action writes `lint.html` and/or `diff.html` there (both checks run by default, so a single file path would overwrite one report with the other). The job summary stays the plain-text report. Upload is left to your workflow.

`strict` and `transport` already work against the 0.3.0-preview CLI. `report` needs a CLI that has `--report`, which 0.3.0-preview does not. If you set `report` and the installed tool lacks the flag, the Action fails fast with a message instead of a generic "unrecognized option". Until 0.4 is published, use `uses: ./` with `source:` pointing at a just-packed folder, or pin a later tag that includes these inputs. Do not add these inputs to a workflow that pins `ShmueLior/mcpprobe@v0.3.0-preview`; that tag's wrapper does not have them.
`strict` and `transport` also work against the 0.3.0-preview CLI. `report` needs a CLI that has `--report`, which is 0.4.0-preview or later. If you set `report` and the installed tool lacks the flag, the Action fails fast with a message instead of a generic "unrecognized option". Do not add these inputs to a workflow that pins `ShmueLior/mcpprobe@v0.3.0-preview`; that tag's wrapper does not have them.

```yaml
- name: Check MCP tool surface
Expand Down Expand Up @@ -255,7 +255,7 @@ resources:
type: github
name: ShmueLior/mcpprobe
endpoint: GitHub
ref: refs/tags/v0.3.0-preview
ref: refs/tags/v0.4.0-preview

steps:
- checkout: self
Expand Down Expand Up @@ -288,7 +288,7 @@ If you cannot reference the GitHub repo, install the tool and run the same comma
- script: |
set -euo pipefail
tool_path="$(Agent.TempDirectory)/mcpprobe-cli"
dotnet tool install McpProbe.Cli --tool-path "$tool_path" --version 0.3.0-preview
dotnet tool install McpProbe.Cli --tool-path "$tool_path" --version 0.4.0-preview
export PATH="$tool_path:$PATH"
mcpprobe diff --stdio "dotnet run --no-build --project src/MyServer -c Release" --baseline mcp-tools.json
mcpprobe lint --stdio "dotnet run --no-build --project src/MyServer -c Release"
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ inputs:
Exact McpProbe.Cli version to install. Defaults to the same version as this
repository's package. Do not set this to latest.
required: false
default: '0.3.0-preview'
default: '0.4.0-preview'
source:
description: >-
If set, the only NuGet source used to install McpProbe.Cli (a folder of
Expand Down
2 changes: 1 addition & 1 deletion templates/azure-pipelines/mcpprobe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# type: github
# name: ShmueLior/mcpprobe
# endpoint: GitHub
# ref: refs/tags/v0.3.0-preview
# ref: refs/tags/v0.4.0-preview
#
# steps:
# - checkout: self
Expand Down
Loading