Skip to content

Conversation

@mikekistler
Copy link
Contributor

Motivation and Context

This PR adds the initial set of client conformance tests which are required for Tier 1 SDKs. All tests are passing.

How Has This Been Tested?

All tests build and pass.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@mikekistler mikekistler requested a review from halter73 December 15, 2025 16:11
@mikekistler mikekistler force-pushed the mdk/conformance-client branch from da7ca68 to 014be50 Compare January 7, 2026 20:55
var exeSuffix = OperatingSystem.IsWindows() ? ".exe" : "";
var conformanceClientPath = Path.GetFullPath($"./ModelContextProtocol.ConformanceClient{exeSuffix}");
// Replace AspNetCore.Tests with ConformanceClient in the path
conformanceClientPath = conformanceClientPath.Replace("AspNetCore.Tests", "ConformanceClient");
Copy link
Contributor

@halter73 halter73 Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's too bad that we need to use an actual path for this since it's invoked from node rather than directly from C#, but I wonder if we can do more to make sure the client is at this path even if the entire solution hasn't been built. We could use, dotnet publish, but I understand not wanting to slow down the test if it's already built.

I think it would be a good idea to add a project reference in ModelContextProtocol.AspNetCore.Tests.csproj to ModelContextProtocol.ConformanceClient similar to what we do for ModelContextProtocol.ConformanceServer, so the ConformanceClient gets rebuilt automatically when the test project is rebuilt even if you don't rebuild the entire solution.

    <ProjectReference Include="..\ModelContextProtocol.ConformanceClient\ModelContextProtocol.ConformanceClient.csproj" />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had a project reference in ModelContextProtocol.AspNetCore.Tests.csproj previously but it was not helpful, because it trimmed dlls required by the client but not visible to MSBuild because the client was never invoked directly. I wasted a day debugging the obscure errors that resulted. I don't think we should go down that path again.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was about to argue against this, but I see you did include the ProjectReference in f047c47#diff-c331a50438b507f3674e24b92de8e2e4d6c4ccc9c4f8347e4f86907b8515ce04

Since we're not publishing, I believe the trimming only happens at the assembly level, so we just need to add a dummy reference to any class in the ConformanceClient if we want to completely avoid the possiblity of trimming, but I think this is fine as long as it works which it appears to.

mikekistler and others added 2 commits January 7, 2026 21:05
Co-authored-by: Stephen Halter <halter73@gmail.com>
@mikekistler mikekistler requested a review from halter73 January 8, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants