Skip to content

Upgrade to MCP C# SDK v0.6.0-preview.1 #322

@jongalloway

Description

@jongalloway

Overview

Update from ModelContextProtocol v0.5.0-preview.1 to v0.6.0-preview.1 and adopt new SDK features.

Release notes: https://github.com/modelcontextprotocol/csharp-sdk/releases/tag/v0.6.0-preview.1

Sub-Issues

Version Update

  • Update DotNetMcp.csproj package reference from 0.5.0-preview.1 to 0.6.0-preview.1
  • Update doc/sdk-v0.5-compatibility.md to sdk-v0.6-compatibility.md

Key Features to Adopt

1. Fully-Qualified Type Names in Generated Signatures (#1135)

The SDK now uses fully-qualified type names in generated partial method signatures. This should resolve any ambiguity issues we've had with action enums in DotNetMcp.Actions.

  • Review if GlobalUsings.cs with global using DotNetMcp.Actions; is still necessary
  • Verify generator compatibility with our tool methods

2. CS1066 Suppressor for Optional Parameters (#1110)

The SDK now suppresses CS1066 warnings for MCP server methods with optional parameters.

  • Remove any manual suppressions we may have added for this warning
  • Verify our tools with optional parameters compile without warnings

3. Incremental Scope Consent - SEP-835 (#1084)

Support for incremental scope consent in authorization flows.

  • Evaluate if this applies to our server capabilities
  • Document any authorization-related changes

4. Resource Subscribe Improvements (#676)

Resource subscribe is now automatically true if a handler is provided.

  • Review DotNetResources.cs and update resource subscription logic if needed
  • Simplify any explicit subscription configuration

5. Optimized JSON-RPC Deserialization (#1138)

Single-pass parsing optimization for JsonRpcMessage deserialization.

  • Benefit: Improved performance with no code changes required

Testing

  • Run full test suite: dotnet test --solution DotNetMcp.slnx
  • Verify MCP conformance tests pass
  • Test with MCP Inspector
  • Test with Claude Desktop integration

Documentation

  • Update README.md SDK version reference
  • Update any SDK version references in documentation

Breaking Changes Check

Review changelog for any breaking changes:

  • s_additionalProperties removed from McpClientTool (#1080) - verify no impact
  • Session timeout fix (#1106) - may affect long-running operations

Related

Metadata

Metadata

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions