From 9b06f58a988671e46be9427e5dac17facfb21eb3 Mon Sep 17 00:00:00 2001 From: Lior Shmueli <48066416+ShmueLior@users.noreply.github.com> Date: Sat, 28 Nov 2026 17:51:55 +0200 Subject: [PATCH 1/2] Set version to 0.4.0-preview --- CHANGELOG.md | 2 ++ Directory.Build.props | 2 +- README.md | 14 +++++++------- action.yml | 2 +- templates/azure-pipelines/mcpprobe.yml | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fd8d98..f4039b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ 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. diff --git a/Directory.Build.props b/Directory.Build.props index eacde82..d57d8d2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ - 0.3.0 + 0.4.0 preview Lior Shmueli Copyright (c) 2026 Lior Shmueli diff --git a/README.md b/README.md index 7d6c407..ed8780b 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 @@ -168,7 +168,7 @@ Exit codes: `0` passed, `1` check failed (breaking change or lint findings), `2` ### HTML report -`lint` and `diff` take `--report ` 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 ` 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 @@ -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 @@ -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 @@ -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 @@ -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" diff --git a/action.yml b/action.yml index a505f86..f7c9e24 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/templates/azure-pipelines/mcpprobe.yml b/templates/azure-pipelines/mcpprobe.yml index 4c6675f..a62a4ff 100644 --- a/templates/azure-pipelines/mcpprobe.yml +++ b/templates/azure-pipelines/mcpprobe.yml @@ -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 From c1f83b45e5aa94fdfd228a40a59aecf7a9b3bdd0 Mon Sep 17 00:00:00 2001 From: Lior Shmueli <48066416+ShmueLior@users.noreply.github.com> Date: Sat, 28 Nov 2026 17:53:10 +0200 Subject: [PATCH 2/2] Merge the 0.4.0-preview Fixed sections --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4039b7..34727ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,10 +14,6 @@ All notable changes to this project are documented here. The format is based on - 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. @@ -27,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 '`, 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.