Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PackageVersion Include="Anthropic" Version="12.53.0" />
<PackageVersion Include="Microsoft.Extensions.AI" Version="10.10.0" />
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="10.10.1" />
<PackageVersion Include="ModelContextProtocol" Version="1.2.0" />
<PackageVersion Include="ModelContextProtocol" Version="2.2.0" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This major bump breaks build-and-test (ubuntu-latest): 4 tests in SharpClaw.Code.UnitTests.Mcp.ParallelSearchExampleTests fail with InvalidOperationException: Unexpected MCP method: server/discover (e.g. DeniedAllowlistPreventsRemoteToolCall, RemoteToolErrorRemainsFailure). The macOS and Windows jobs were cancelled, not run to completion.

In 2.x, McpClient.ConnectAsync sends server/discover before initialize. The fake McpHandler in tests/SharpClaw.Code.UnitTests/Mcp/ParallelSearchExampleTests.cs throws on any method it doesn't recognise. This PR needs a test-side fix before it can merge: reply to unknown methods with a JSON-RPC -32601 Method not found error (or handle server/discover explicitly) instead of throwing. That also tells you whether the client falls back to initialize against older servers.

Before merging, also check that SdkMcpProcessSupervisor and the McpToolAgent example still connect to real 1.x/2025-era servers that don't implement server/discover.


Generated by Claude Code

<PackageVersion Include="ModelContextProtocol.AspNetCore" Version="1.2.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.9.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.9.0" />
Expand Down
1 change: 1 addition & 0 deletions src/SharpClaw.Code.Runtime/SharpClaw.Code.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<PackageReference Include="Microsoft.Data.Sqlite" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" />
<PackageReference Include="ModelContextProtocol" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Runtime doesn't use the MCP SDK directly. It already gets ModelContextProtocol transitively through its SharpClaw.Code.Mcp project reference, and the only using ModelContextProtocol in src/ is in SharpClaw.Code.Mcp. A direct package reference here weakens the Runtime → Mcp seam (see the backlog in ARCHITECTURE-NOTES), because it makes it easy to start using SDK types in Runtime. Unless restore fails without it, I'd drop this line and keep the change to Directory.Packages.props.


Generated by Claude Code

</ItemGroup>

<ItemGroup>
Expand Down