Skip to content

Commit f7632d3

Browse files
authored
chore: run toolbox via npx instead of the bundled binary (#104)
1 parent a98397a commit f7632d3

7 files changed

Lines changed: 22 additions & 160 deletions

File tree

.github/renovate.json5

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,20 @@
2121
pinDigests: true,
2222
},
2323
{
24-
matchPackageNames: ['googleapis/mcp-toolbox'],
25-
'semanticCommitType': 'feat'
24+
matchPackageNames: ['@toolbox-sdk/server'],
25+
// Group the toolbox update under a stable branch name (renovate/toolbox).
26+
groupName: 'toolbox',
27+
semanticCommitType: 'feat',
2628
}
2729
],
2830
customManagers: [
2931
{
32+
// Track the npm toolbox server pinned in the extension's MCP command.
3033
customType: "regex",
31-
managerFilePatterns: ["/toolbox_version\\.txt$/"],
32-
matchStrings: ["(?<currentValue>[\\d\\.]+)"],
33-
datasourceTemplate: "github-releases",
34-
packageNameTemplate: "googleapis/mcp-toolbox",
35-
extractVersionTemplate: "^v(?<version>.*)$",
34+
managerFilePatterns: ["/gemini-extension\\.json$/"],
35+
matchStrings: ["@toolbox-sdk/server@(?<currentValue>[\\d\\.]+)"],
36+
datasourceTemplate: "npm",
37+
depNameTemplate: "@toolbox-sdk/server",
3638
}
3739
]
3840
}

.github/workflows/mirror-changelog.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
name: Mirror Toolbox Changelog
1616

1717
on:
18-
pull_request_target:
18+
pull_request:
1919
types: [opened, edited]
2020

2121
jobs:
2222
add-release-notes:
23-
if: github.actor == 'renovate-bot' && startsWith(github.head_ref, 'renovate/googleapis-mcp-toolbox')
23+
# Renovate groups the npm toolbox update under groupName 'toolbox' (see
24+
# renovate.json5), so its branch is renovate/toolbox. Release notes still come
25+
# from googleapis/mcp-toolbox (same source repo), so the markers below are unchanged.
26+
if: github.actor == 'renovate-bot' && startsWith(github.head_ref, 'renovate/toolbox')
2427
runs-on: ubuntu-latest
2528
permissions:
2629
pull-requests: write

.github/workflows/package-and-upload-assets.yml

Lines changed: 0 additions & 140 deletions
This file was deleted.

.github/workflows/presubmit-tests.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,15 @@ on:
2020
jobs:
2121
run-presubmit-tests:
2222
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
2325
steps:
2426
- name: Check out code
25-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2628

2729
- name: Install Gemini CLI
2830
run: npm install @google/gemini-cli
2931

30-
- name: Install toolbox binary
31-
run: |
32-
VERSION=$(cat toolbox_version.txt)
33-
curl -L -o toolbox "https://storage.googleapis.com/mcp-toolbox-for-databases/v${VERSION}/linux/amd64/toolbox"
34-
chmod +x toolbox
35-
3632
- name: Install Extension
3733
run: npx gemini extensions validate .
3834
env:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,5 @@ Use `gemini --debug` to enable debugging.
137137
Common issues:
138138

139139
* "✖ Error during discovery for server: MCP error -32000: Connection closed": The database connection has not been established. Ensure your configuration is set via environment variables.
140-
* "✖ MCP ERROR: Error: spawn /Users/USER/.gemini/extensions/postgres/toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using Gemini CLI v0.6.0+.
141-
* "cannot execute binary file": The Toolbox binary did not download correctly. Ensure the correct binary for your OS/Architecture has been downloaded. See [Installing the server](https://mcp-toolbox.dev/documentation/introduction/#install-toolbox) for more information.
140+
* "✖ MCP ERROR: Error: spawn npx ENOENT": Node.js/`npx` is not installed or not on your `PATH`. Install Node.js (which provides `npx`).
141+
* "npm error"/network failures on first run: `npx` fetches `@toolbox-sdk/server` on first launch, so it needs network access. Retry once connectivity is available.

gemini-extension.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
"description": "Connect and interact with a PostgreSQL database and data",
55
"mcpServers": {
66
"postgresql": {
7-
"command": "${extensionPath}${/}toolbox",
7+
"command": "npx",
88
"args": [
9+
"-y",
10+
"@toolbox-sdk/server@1.8.0",
911
"--prebuilt",
1012
"postgres",
1113
"--stdio"

toolbox_version.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)