Integration tests for the GroupDocs.Annotation.Mcp
NuGet package — an MCP server that exposes
GroupDocs.Annotation as AI-callable tools.
This repository validates the published NuGet artifact end-to-end: it
launches the server via dnx, connects as an MCP client, and exercises every
advertised tool. It also doubles as a copy-pasteable set of example configs
and user-facing how-to guides for every deployment channel.
- how-to/ — step-by-step guides for every deployment channel (NuGet, Docker, MCP registry, Claude Desktop, VS Code / Copilot, running the tests).
- examples/ — ready-to-paste
claude-desktop.json,vscode-mcp.json, anddocker-compose.yml. - AGENTS.md — orientation for AI coding agents working in this repo.
- llms.txt — machine-readable summary for LLM tooling.
- changelog/ — one entry per change set (see changelog/README.md for format).
| Area | Covered by |
|---|---|
Package installs and starts via dnx |
McpServerFixture |
| MCP handshake, server info, 10-tool advertisement | ToolDiscoveryTests |
AddAnnotation — add a type + saved-output presence |
AddAnnotationTests |
GetAnnotations — JSON shape (id / type / message / page / box / replies) |
GetAnnotationsTests |
UpdateAnnotation — message / box edit by id |
UpdateAnnotationTests |
RemoveAnnotations — by id list / all |
RemoveAnnotationsTests |
AddReply — reply thread by annotation id |
AddReplyTests |
RemoveReplies — by reply-id list / user / all |
RemoveRepliesTests |
ImportAnnotations — XML / document source |
ImportAnnotationsTests |
ExportAnnotations — XML dump presence |
ExportAnnotationsTests |
GetDocumentInfo — JSON shape + per-format theory |
GetDocumentInfoTests |
GeneratePagesPreview — inline PNG image content blocks |
GeneratePagesPreviewTests |
| Unknown / corrupted files, password parameter | ErrorHandlingTests |
Requires .NET 10 SDK.
dotnet testTest a specific published version:
dotnet test -p:McpPackageVersion=26.7.0
# or
MCP_PACKAGE_VERSION=26.7.0 dotnet testThe first run downloads the NuGet package — subsequent runs are cached.
.github/workflows/integration.yml runs on:
- Every push / PR.
- Nightly cron — catches regressions in nuget.org, the dnx shim, or the .NET runtime.
workflow_dispatchwith apackage_versioninput — manual smoke of any version.repository_dispatch(nuget-published) — fires from the main repo's publish pipeline so every release is smoke-tested against live nuget.org. See Release smoke hook.
Matrix: ubuntu-latest, windows-latest, macos-latest.
To auto-verify each release, add this step to the main repo's publish workflow
after the dotnet nuget push step:
- name: Dispatch smoke tests
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/groupdocs-annotation/GroupDocs.Annotation.Mcp.Tests/dispatches \
-f event_type=nuget-published \
-f 'client_payload[package_version]=${{ steps.version.outputs.version }}'In evaluation mode, the document-writing tools (add_annotation,
update_annotation, remove_annotations, add_reply, remove_replies,
import_annotations) and generate_pages_preview may emit output carrying a
watermark and prefix their response with "[Evaluation mode]". All 10 tools
still function — get_annotations and get_document_info are read-only and
unaffected. Tests pass under both modes; the licensed mode just produces
watermark-free output.
For CI, store a base64-encoded .lic file as repo secret GROUPDOCS_LICENSE
— the workflow decodes it into $RUNNER_TEMP and exports
GROUPDOCS_LICENSE_PATH automatically.
Two kinds of fixtures:
- Synthetic — a blank PDF and a 1×1 JPEG built from byte-arrays in SampleDocuments.cs at test startup. No binaries committed.
- Real samples — minimal PDF / DOCX / XLSX / JPG / PNG copied from the
upstream GroupDocs.Annotation examples repo and committed under
Files/ (see Files/README.md for provenance).
The csproj copies them to the test output and
McpServerFixturestages them into the per-test storage path. Per-format theories skip themselves when a sample is missing.
Copy configs from examples/:
- claude-desktop.json — Claude Desktop MCP server config.
- vscode-mcp.json — VS Code / GitHub Copilot.
- docker-compose.yml — containerized deployment.
MIT — see LICENSE.