diff --git a/Aliases/mcp-toolbox b/Aliases/mcp-toolbox deleted file mode 120000 index 19de5d494baa..000000000000 --- a/Aliases/mcp-toolbox +++ /dev/null @@ -1 +0,0 @@ -../Formula/g/genai-toolbox.rb \ No newline at end of file diff --git a/Formula/g/genai-toolbox.rb b/Formula/g/genai-toolbox.rb deleted file mode 100644 index f09acd8225be..000000000000 --- a/Formula/g/genai-toolbox.rb +++ /dev/null @@ -1,49 +0,0 @@ -class GenaiToolbox < Formula - desc "MCP Toolbox for Databases, an open source MCP server for databases" - homepage "https://github.com/googleapis/genai-toolbox" - url "https://github.com/googleapis/genai-toolbox/archive/refs/tags/v0.9.0.tar.gz" - sha256 "a18dd9e173ac008f725d7111b8d70b2053dfe99049795d73a74f38ac18227b21" - license "Apache-2.0" - - livecheck do - url :stable - strategy :github_latest - end - - bottle do - sha256 cellar: :any_skip_relocation, arm64_sequoia: "19f6dc79592239860bf263acf6415305d3b1bc4084dc823a543a353888e735ed" - sha256 cellar: :any_skip_relocation, arm64_sonoma: "19f6dc79592239860bf263acf6415305d3b1bc4084dc823a543a353888e735ed" - sha256 cellar: :any_skip_relocation, arm64_ventura: "19f6dc79592239860bf263acf6415305d3b1bc4084dc823a543a353888e735ed" - sha256 cellar: :any_skip_relocation, sonoma: "d3c6681281d19afedc28753085b6fa2ef3bc1802300dae995a237b7f22bf4faa" - sha256 cellar: :any_skip_relocation, ventura: "d3c6681281d19afedc28753085b6fa2ef3bc1802300dae995a237b7f22bf4faa" - sha256 cellar: :any_skip_relocation, x86_64_linux: "d7d83f9bbb5d627cdca667f903b5712de59e31057b0dbd978e9327d1557dccfd" - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"toolbox") - end - - test do - (testpath/"tools.yaml").write <<~EOS - sources: - my-sqlite-memory-db: - kind: "sqlite" - database: ":memory:" - EOS - - port = free_port - pid = fork { exec bin/"toolbox", "--tools-file", testpath/"tools.yaml", "--port", port.to_s } - - sleep 5 - - begin - output = shell_output("curl -s -i http://localhost:#{port} 2>&1") - assert_match "HTTP/1.1 200 OK", output, "Expected HTTP/1.1 200 OK response" - ensure - Process.kill("TERM", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/m/mcp-toolbox.rb b/Formula/m/mcp-toolbox.rb new file mode 100644 index 000000000000..304c064cd530 --- /dev/null +++ b/Formula/m/mcp-toolbox.rb @@ -0,0 +1,50 @@ +class McpToolbox < Formula + desc "MCP server for databases" + homepage "https://github.com/googleapis/genai-toolbox" + url "https://github.com/googleapis/genai-toolbox/archive/refs/tags/v0.9.0.tar.gz" + sha256 "a18dd9e173ac008f725d7111b8d70b2053dfe99049795d73a74f38ac18227b21" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "652d5e51a9f0b8691b7a7cd039f406bb7e5b9514253468bd3e6bfa7f47a0a7f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "652d5e51a9f0b8691b7a7cd039f406bb7e5b9514253468bd3e6bfa7f47a0a7f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "652d5e51a9f0b8691b7a7cd039f406bb7e5b9514253468bd3e6bfa7f47a0a7f8" + sha256 cellar: :any_skip_relocation, sonoma: "66e1b40e82706e8228b1ab4e7d39109555a2be276cb04abee04fe27599b908b3" + sha256 cellar: :any_skip_relocation, ventura: "66e1b40e82706e8228b1ab4e7d39109555a2be276cb04abee04fe27599b908b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07d6df579fcb595e20cd7810f935d113690664c75854e346e74b73f9f2c0bd11" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/googleapis/genai-toolbox/cmd.buildType=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"toolbox") + end + + test do + assert_match version.to_s, shell_output("#{bin}/toolbox --version") + + (testpath/"tools.yaml").write <<~EOS + sources: + my-sqlite-memory-db: + kind: "sqlite" + database: ":memory:" + EOS + + port = free_port + pid = fork { exec bin/"toolbox", "--tools-file", testpath/"tools.yaml", "--port", port.to_s } + + sleep 5 + + begin + output = shell_output("curl -s -i http://localhost:#{port} 2>&1") + assert_match "HTTP/1.1 200 OK", output, "Expected HTTP/1.1 200 OK response" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/formula_renames.json b/formula_renames.json index 435bacdc8fbd..12e0bf41632c 100644 --- a/formula_renames.json +++ b/formula_renames.json @@ -37,6 +37,7 @@ "fcct": "butane", "ffmpeg28": "ffmpeg@2.8", "findbugs": "spotbugs", + "genai-toolbox": "mcp-toolbox", "geode": "apache-geode", "geth": "ethereum", "gitlab-ci-multi-runner": "gitlab-runner",