feat: answer server/discover for connection-less capability discovery - #235
Open
sideeffffect wants to merge 1 commit into
Open
feat: answer server/discover for connection-less capability discovery#235sideeffffect wants to merge 1 commit into
sideeffffect wants to merge 1 commit into
Conversation
The chimp server is already stateless: it stores no session, issues no Mcp-Session-Id, and does not require an initialize handshake before other methods. Add support for the `server/discover` method so a client or proxy can learn the server's capabilities up front without negotiating a session; it returns the same serverInfo, capabilities and protocol version as initialize. This aligns with the 2026-07-28 stateless architecture direction. Tracks softwaremill#163. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sideeffffect
marked this pull request as ready for review
August 31, 2026 17:08
Author
|
Hello @kubinio123 , what do you think about this PR? Could I ask you for a review? 🙏 |
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.
Part of the MCP roadmap's HTTP-native / stateless direction. Relates to #163.
Context
chimp's server is already stateless:
McpHandlerhandles each JSON-RPC request on its own, stores no session, issues noMcp-Session-Id, and doesn't require aninitializehandshake before other methods. So the 2026-07-28 "stateless architecture" is largely chimp's existing model — a request can land on any instance behind a plain round-robin load balancer.The one concrete primitive it was missing is the discovery entry point.
What
Handle the
server/discovermethod: a client or proxy can learn the server's capabilities up front, without negotiating a session, before doing any real work. It returns the sameserverInfo,capabilitiesandprotocolVersionpayload asinitialize(the initialize capability computation is refactored into a shareddiscoveryResulthelper, so the two can't drift).Additive — an extra method the server answers — so it doesn't affect the
2025-11-25conformance suite or existing clients.Tests
McpHandlerSpecgets a case assertingserver/discoverreturns the server info + capabilities with no priorinitialize.sbt scalafmtCheckAll compile Test/compile compileDocsand the fullMcpHandlerSpec(33 cases) pass locally.Notes
The exact
server/discoverresult shape in the 2026-07-28 RC isn't fully pinned down publicly yet; mirroring theinitializeresult (capabilities + serverInfo + protocolVersion + instructions) is the natural, forward-compatible choice. Happy to adjust to the final schema. Documented under server capabilities. Draft/WIP.🤖 Generated with Claude Code