Bring up to 0.1.13 conformance#1254
Bring up to 0.1.13 conformance#1254stephentoub wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the SDK and its conformance harness to align with the MCP conformance suite around v0.1.13, focusing on elicitation default handling, additional conformance scenarios, and OAuth/token-endpoint behavior.
Changes:
- Apply elicitation schema defaults defensively on both client and server (and add targeted tests to verify behavior).
- Extend conformance server/client to cover additional scenarios (JSON Schema 2020-12 tool, SSE polling/retry, OAuth scenarios).
- Update OAuth token endpoint request construction to support different token endpoint auth methods.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/ModelContextProtocol.Tests/Protocol/ElicitationServerDefaultsTests.cs | Adds server-side defense-in-depth tests for applying schema defaults to elicitation results. |
| tests/ModelContextProtocol.Tests/Protocol/ElicitationClientDefaultsTests.cs | Adds client-side tests to ensure defaults are applied before sending elicitation responses. |
| tests/ModelContextProtocol.ConformanceServer/Tools/ConformanceTools.cs | Adds a JSON Schema 2020-12 tool and an SSE reconnection test tool. |
| tests/ModelContextProtocol.ConformanceServer/Program.cs | Enables SSE resumability via an in-memory distributed cache store and wires reconnection/polling behavior. |
| tests/ModelContextProtocol.ConformanceClient/Program.cs | Adds elicitation handler defaults + new conformance scenarios + pre-registered OAuth credential support. |
| tests/ModelContextProtocol.AspNetCore.Tests/ServerConformanceTests.cs | Runs additional pending server conformance scenarios via explicit scenario args. |
| tests/ModelContextProtocol.AspNetCore.Tests/ClientConformanceTests.cs | Expands the set of client conformance scenarios executed. |
| src/ModelContextProtocol.Core/Server/McpServer.Methods.cs | Applies defaults to elicitation results returned to server callers. |
| src/ModelContextProtocol.Core/Protocol/ElicitResult.cs | Introduces default-application helper for elicitation results. |
| src/ModelContextProtocol.Core/Protocol/ElicitRequestParams.cs | Adds schema helper to materialize default values as JsonElement. |
| src/ModelContextProtocol.Core/Client/McpClientImpl.cs | Applies schema defaults to elicitation handler results before serialization/return. |
| src/ModelContextProtocol.Core/Authentication/ClientOAuthProvider.cs | Adjusts token request creation to support basic/post/none token endpoint auth methods. |
tests/ModelContextProtocol.Tests/Protocol/ElicitationServerDefaultsTests.cs
Outdated
Show resolved
Hide resolved
tests/ModelContextProtocol.Tests/Protocol/ElicitationClientDefaultsTests.cs
Outdated
Show resolved
Hide resolved
tests/ModelContextProtocol.Tests/Protocol/ElicitationClientDefaultsTests.cs
Outdated
Show resolved
Hide resolved
7edc188 to
bbc6c3d
Compare
| var runTask = server.RunAsync(TestContext.Current.CancellationToken); | ||
| await transport.InitializeAsync(); | ||
|
|
||
| var result = await server.ElicitAsync(new ElicitRequestParams |
There was a problem hiding this comment.
Should we add tests for ElicitAsync<T>? I think it should work, but it might be worth covering.
|
I remember the earlier version of this PR made changes to the client to support multiple auth scope step ups given repeated 403s. I guess Copilot added that unnecessarily before? It did seem odd that the conformance tests required the client support repeated step ups. Testing it doesn't get stuck in an infinite loop makes more sense. |
Wasn't that in support for some of the tests that are no longer required? (or am I misremembering) |
|
I don't think so. My suspicion is that Copilot thought that it was necessary for the |
No description provided.