Skip to content
Open
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
31 changes: 31 additions & 0 deletions Formula/m/mcp-reasoner.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
class McpReasoner < Formula
desc "MCP server for beam search and thought evaluation"
homepage "https://github.com/Jacck/mcp-reasoner"
url "https://registry.npmjs.org/@mseep/mcp-reasoner/-/mcp-reasoner-2.0.0.tgz"
sha256 "cf03037abee12121e720fa38bf04983d3729c1f01af525a555aba3c21fa86084"
license "MIT"

depends_on "node"

def install
system "npm", "install", *std_npm_args

(bin/"mcp-reasoner").write <<~SH
#!/bin/bash
exec "#{Formula["node"].opt_bin}/node" \
"#{libexec}/lib/node_modules/@mseep/mcp-reasoner/dist/index.js" "$@"
SH
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

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

The wrapper script written to bin/"mcp-reasoner" is created via Pathname#write, which does not set the executable bit. As a result, the installed mcp-reasoner entrypoint will typically be non-executable (mode 0644) and the formula’s test/runtime invocation will fail. Make the script executable (e.g., chmod it) or use a Homebrew helper that writes an executable wrapper.

Suggested change
SH
SH
(bin/"mcp-reasoner").chmod 0o755

Copilot uses AI. Check for mistakes.
end

test do
json = <<~JSON
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"homebrew","version":"1.0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
JSON

output = pipe_output(bin/"mcp-reasoner", json, 0)
assert_match "\"name\":\"mcp-reasoner\"", output
assert_match "\"strategyType\"", output
end
end
Loading