jongalloway / jongalloway/dotnet-mcp

Upgrade to MCP C# SDK 2.0 (2026-07-28 spec)

Open
#481 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
36
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Summary

Adopt the MCP C# SDK 2.0 (modelcontextprotocol/csharp-sdk v2.0.x), aligned with the 2026-07-28 MCP specification. This is a tracking issue for the upgrade from ModelContextProtocol 1.4.0 → 2.0.x.

SDK 2.0 is backward-compatible at the protocol level (clients/servers auto-negotiate down to the legacy initialize handshake). API-surface breaks are limited to (1) capabilities deprecated by the new spec and (2) experimental APIs whose contracts changed ΓÇö both of which this server uses.

Upstream references:

Current usage that's affected

  • ModelContextProtocol 1.4.0 in DotNetMcp/DotNetMcp.csproj and DotNetMcp.Tests/DotNetMcp.Tests.csproj
  • Microsoft.AgentGovernance.Extensions.ModelContextProtocol 4.0.0 (third-party, pinned to 1.x SDK)
  • stdio transport only
  • Experimental Tasks API (IMcpTaskStore / InMemoryMcpTaskStore)
  • Roots (WorkspaceDiscovery), Sampling (AI error interpretation), Logging notifications (SendMcpLogAsync), Elicitation (destructive-op confirmation)
  • Custom McpErrorCodes (uses -32002)
  • MCP Apps resources

Work items

Required (to compile/run on 2.0)
  • #482 ΓÇö Gating: confirm a 2.0-compatible Microsoft.AgentGovernance.Extensions.ModelContextProtocol
  • #483 ΓÇö Bump ModelContextProtocol 1.4.0 ΓåÆ 2.0.x in both projects
  • #484 ΓÇö Rewrite Tasks integration (remove IMcpTaskStore/InMemoryMcpTaskStore; adopt SEP-2663 Tasks extension)
  • #485 ΓÇö Address Roots/Sampling/Logging deprecations (MCP9005)
  • #486 ΓÇö Migrate Elicitation to MRTR and verify legacy back-compat
  • #487 ΓÇö Review error codes (-32002 deprecation, renumbered protocol codes)
  • #488 ΓÇö Fix tests (removed Tasks types, required Tool.InputSchema, error-code assertions)
  • #489 ΓÇö Update documentation
Opportunities (spec-aligned improvements)
  • #490 ΓÇö TTL for list results (SEP-2549) using existing caching infrastructure
  • #491 ΓÇö JSON Schema 2020-12 output schemas (SEP-2106)
  • #492 ΓÇö First-class MCP Apps APIs (McpApps.ExtensionId, [McpAppUi])
  • #493 ΓÇö OpenTelemetry trace-context propagation (SEP-414)

Timing

Preview 1 only; the spec finalizes 2026-07-28 and open spec PR modelcontextprotocol/modelcontextprotocol#2776 may still shift behavior. Plan: prototype on a branch now (Tasks rewrite + governance-package compatibility), hold the version bump until a stable 2.0 and a 2.0-ready governance package are available.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with DotNetMcp/DotNetMcp.csproj and DotNetMcp.Tests/DotNetMcp.Tests.csproj, then read the SDK 2.0 spec-compliance tracker and preview release notes. Review child issues #482–#493, especially the Tasks and governance-package work, before changing the version. Done means the required migration work is complete, tests pass, and a stable 2.0 SDK and compatible governance package are available.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.