Repository navigation
Move the MCP server to ModelContextProtocol 2.4 - #4836
Merged
Merged
Conversation
Curb 0.14 formats XML with the editorconfig indent. The 16 project files and the solution file change in whitespace only. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Snapshots 0.11, Argh and Make.Fs 0.29, Proc 0.22, Cdp 0.11, Mermaider 0.17, curb 0.14 and the release-notes tool. The 0.11 snapshot engine keeps whitespace inside pre, so those verified files now show the real markup, and the MCP event stream snapshot lists the JSON of each event. ScopedFileSystem stays on 0.6.0, Snapshots on 0.11.0 and Pagefind.Net on 0.5.0. The newer releases need System.IO.Abstractions 23, whose Testably interface adds IFile.CreateHardLink, and ScopedFileSystem 0.7.1 does not implement it. Docker targets now fail up front when docker is missing (needsTool). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…an.Snapshots The snapshot library now pretty-prints event-stream bodies itself, so the SSE scrubber is a no-op and the prose mask no longer matched. Mask the prose in the new format and regenerate the verified file. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
AWSSDK 4.1, Elastic.Clients.Elasticsearch 9.5, Elastic.Transport 1.1, Elastic.Ingest 0.56, HtmlSanitizer 11, AngleSharp 1.10, Markdig 1.6, OpenTelemetry 1.21, TUnit 1.83, WireMock 2, Spectre.Console 0.57, Slugify 5, MinVer 8, husky and the other packages that had a newer release. Slugify 5 no longer takes a null, so Slugify() passes an empty string for one. Four stay behind. RazorSlices 0.12 writes empty attributes, which changes the HTML of 77 snapshots. ModelContextProtocol 2 changes the tool annotations and input schemas that the MCP server returns. Elastic.OpenTelemetry 1.7 ships a ReadOnlyMemoryStream that collides with the one in the net11 BCL. Elastic.Transport 8 breaks the client code that uses JsonResponse. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Slugify 5 rejects a null argument and Slugify() takes a nullable string. A null-coalescing workaround would hide a behaviour change, so the package stays until the repo has its own slug method. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… the API tests Elastic.OpenTelemetry 1.7 ships a public System.IO.ReadOnlyMemoryStream in its netstandard2.1 asset. The net11 runtime has a type of that name too, so the API test projects, which reference the package, fail with CS0433. The tests read a byte array, so a read-only MemoryStream does the same job. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
RazorSlices 0.12 writes an attribute bound to an empty string as name="", where 0.11 left it out. The tab and applies-switch radios bound checked to "checked" or "", so every radio would have been checked. The templates now bind null instead, through NullIfEmpty and JoinOrNull, so the HTML stays the same and no snapshot changes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Slugify.Core 4.0.1 throws a NullReferenceException for null although Slugify() takes a string?. The guard lives in our method, so it holds for any version of the package or a replacement (see the issue about our own slug method). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The six tools, their descriptions, input schemas and annotations are the same. tools/list now returns them in a different order and no longer advertises execution.taskSupport. Both handshake snapshots follow. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The server pinned ProtocolVersion to 2025-11-25, which refuses clients on the 2026-07-28 protocol and overrides the version older clients ask for. Leaving it null makes the server dual-era: initialize clients get the version they ask for and 2026-07-28 clients are served through server/discover. A new http test pins the three behaviours. The handshake tests now send 2025-11-25, which is what clients send today. Co-authored-by: Claude Sonnet 5.5 <[email protected]>
# Conflicts: # Directory.Packages.props
Main took the nullean bumps (#4833) and some of the same package updates from Dependabot. Where both changed a version, this branch has the newer one. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The protocol versions test sent server/discover and tools/list on 2026-07-28 but no call that runs a tool. A get_document_by_url call with an empty URL now goes through the per-request path and snapshots the tool result. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The tools/call request in the protocol versions test still reached Elasticsearch: the gateway searches even for an empty URL. The test host now replaces IDocumentGateway with one that echoes the URL, so the test does not depend on a cluster and its snapshot shows that the argument arrived. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4836/ |
Main took ScopedFileSystem, Snapshots and System.IO.Abstractions in #4864. This branch keeps main's versions and its own ModelContextProtocol 2.4. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
With two .http files the cases run in parallel, and each sets and restores the process-wide MCP_SERVER_PROFILE, so one could restore it while the other host starts. They now share a NotInParallel key. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the remote MCP server from ModelContextProtocol 1.4 to 2.4 and lets it offer every protocol version. None of the 2.x breaking changes reaches our code. A client on the
initializehandshake sees the same six tools with the same schemas, in a different order, without theexecution.taskSupportfield. A client on the 2026-07-28 protocol is now served too.Affects: MCP
Prompt summary: Take the ModelContextProtocol 2 release as its own change, list its breaking changes, and say which ones affect us.
Why
The major release was held out of the dependency bump in #4834 because it changes the
tools/listresponse. This PR takes it alone, with the difference measured and the upstream breaking changes checked against our code.What
What a client sees
I compared the
tools/listresponse of the two versions field by field, ignoring order.search_docs,find_related_docs,get_document_by_url,analyze_document_structure,check_docs_coherence,find_docs_inconsistencies), every description, every input schema and every annotation. Theinitializeresult is the same too.tools/listreturns the tools in another order. The old order started withfind_docs_inconsistenciesand ended withanalyze_document_structure. The new one starts withsearch_docsand ends withfind_docs_inconsistencies. Our code declares no order. A client that picks the first tool, or shows the tools in list order, sees the change."execution": { "taskSupport": "optional" }. Tasks moved out of the core package (breaking change 3 below), and we do not register the extension. Under the 2025-11-25 spec a tool without the field isforbiddenfor task-augmented calls. A client that ran these tools as tasks would stop. Normaltools/callis unaffected.The breaking changes of 2.x and whether they affect us
The 2.0.0 release notes list ten. 2.3.0 adds one. 2.1, 2.2, 2.3.1 and 2.4 list none.
server/discoverfirstProgram.csalready setsStateless = true. The probe is now served, because the protocol pin is gone (see Protocol versions).MCP9005)MCP9xxxwarning.ModelContextProtocol.Extensions.TaskstaskSupportfield above. We never registered tasks.UseStructuredContent.Tool.inputSchemais required when aToolis deserializedTool. The tests read the raw JSON.S256must be advertised in OAuth metadataapplication_typeMcpClientand no SSE client.McpClient.ServerInfois nullableMcpClient.Protocol versions
Program.csno longer pinsProtocolVersionto2025-11-25; #4837 made the change in this branch. With the pin, a 2026-07-28 client got a400and an older client got2025-11-25whatever it asked for. Without it, the server is dual-era as the spec describes:initializeclients keep working, and 2026-07-28 clients are served throughserver/discover.initializeasking for2025-11-252025-11-25initializeasking for2024-11-052025-11-252024-11-05server/discover,tools/listandtools/callon 2026-07-28400,-32022200mcp-protocol-versions.httppins these behaviours. Theserver/discoverresult has atoolscapability and nologgingcapability, and the results carry no caching hints.Risk: an older client now negotiates the version it asks for. I did not check how a real old client behaves without the 2025-11-25 features. Try Claude Desktop and VS Code against the preview before merging.
Snapshots
Both handshake transcripts,
Mcp.Remote.Testsand the journeys project, take the change. The journeys transcript only loses the sixexecutionblocks.Verify
Stack: on top of #4834.