Repository navigation
Serve rails-hyperdrive over stdio so it connects without bin/dev - #58
Merged
Merged
Conversation
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.
The rails-hyperdrive MCP server now connects in every agent session, whether or not
bin/devis running. Before this,.mcp.jsonpointed at the HTTP endpoint on port 3000, so most sessions started with the server failed (ECONNREFUSED). Now each session spawnsbin/hyperdrive-mcp, which boots the app and serves the same tools over stdio. The HTTP engine mount in development stays as it was.Two things in the script look arbitrary but aren't:
$stdoutpointed at stderr and gives stdout back only to the transport. SemanticLogger binds an appender to whatever$stdoutis at boot, and one log line on stdout breaks the protocol.rails/hyperdrive/mcp_serverhas to be required beforemcp/server/transports/stdio_transport. In the other order, loading fails with aNameErroronMCP::Server::Transports::StreamableHTTPTransport::Methods.Validation: I piped
initialize,notifications/initialized,tools/listand arun_sqlcall into the script. Every stdout line was valid JSON-RPC, and all eight hyperdrive tools were listed.claude mcp get rails-hyperdrivereports it as Connected over stdio.