Repository navigation
feat(mcp): add Secure Parameters support as Toolbox experimental extension - #3394
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for secure parameters in the Model Context Protocol (MCP) server. It updates tool manifest generation to separate standard and secure parameters, filters out tools with secure parameters if the client does not support them, and validates and merges standard and secure arguments during tool execution. The review feedback highlights an issue where authentication parameters for secure parameters are discarded instead of being merged, suggests defensive nil checks to prevent potential nil pointer dereferences when accessing parameters, and recommends returning INVALID_PARAMS instead of METHOD_NOT_FOUND when a client lacks the secure-params capability to comply with the JSON-RPC specification.
5759027 to
8c17b6c
Compare
8c17b6c to
faf9d6b
Compare
3dedb3f to
1e25e1e
Compare
kurtisvg
left a comment
There was a problem hiding this comment.
- Behavior with URL Params
PR description says:
server validates that sensitive arguments are exclusively passed via secureArguments rather than standard arguments or URL-bound parameters.
Are we confident that's the case? I'm not sure the logic in the current PR supports this.
-
Should we gate this extension behind a flag? We haven't properly defined it yet, are we confident it won't change before we need to?
-
DevX on failure case. If I specify "secure: true", should we throw an error unless the extension is enabled?
d93c493 to
dbb7b33
Compare
|
🧨 Preview deployments removed. Cloudflare Pages environments for |
…experimental extension (#3394) Adds support for secure parameters as part of the Toolbox experimental extension. Tools can now mark parameters as secure (secure: true), and the server validates that sensitive arguments are exclusively passed via secureArguments. - **Legacy Protocols (< v2026-07-28)**: Secure tools are completely hidden. Attempting to call them results in a non-existent tool (`INVALID_PARAMS`: "tool not found"). - **Latest Protocol (v2026-07-28)**: Calling a secure tool without declaring the `com.google.cloud/toolbox.v1` extension explicitly blocks execution and returns a `400 Bad Request` (`MISSING_REQUIRED_CLIENT_CAPABILITY`).
Restore url param tests and secure param error handling test from merge error in this PR: #3394
🤖 I have created a release *beep* *boop* --- ## [1.10.0](v1.9.0...v1.10.0) (2026-08-27) ### Features * **falkordb:** Add FalkorDB source and tools ([#3692](#3692)) ([a94702c](a94702c)) * **firestore-mongodb:** Add firestore-execute-mql and firestore-get-… ([#3826](#3826)) ([4a85d75](4a85d75)) * **mcp:** Add Secure Parameters support as Toolbox experimental extension ([#3394](#3394)) ([9750d2d](9750d2d)) * **server/mcp:** Support com.google.cloud/toolbox.v1 extension in v20260728 ([#3801](#3801)) ([f4f7da6](f4f7da6)) * **skill:** Add fix-failing-tests skill for mcp-toolbox ([#3821](#3821)) ([168e69c](168e69c)) * **sources:** Support native read-only mode and dynamic tool annotations ([#3872](#3872)) ([c257022](c257022)), refs [#3615](#3615) [#3816](#3816) [#3618](#3618) [#3851](#3851) [#3619](#3619) [#3617](#3617) * **tool/mongodb:** Allow collection to be specified at runtime ([#3715](#3715)) ([7626eaf](7626eaf)) ### Bug Fixes * **cloud-storage:** Resolve symlinks when enforcing local path boundaries ([#3810](#3810)) ([c2ada64](c2ada64)) * **config:** Compare env var offsets in rune space when skipping comments ([#3856](#3856)) ([2e76934](2e76934)) * Merge prebuilt tools when reloading custom config ([#3864](#3864)) ([5a6d865](5a6d865)) * Normalize postgres UUIDs to strings ([#3806](#3806)) ([3b02f1d](3b02f1d)) * **postgres:** Filter background processes in postgres-list-active-queries ([#3885](#3885)) ([3d9e62a](3d9e62a)) * **test/alloydbainl:** Use explicit SQL alias prompts to stabilize AI… ([#3877](#3877)) ([50e45ed](50e45ed)) * **tests:** Prevent resource leaks by using context.WithoutCancel ([#3849](#3849)) ([f97a4f9](f97a4f9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.10.0](v1.9.0...v1.10.0) (2026-08-27) ### Features * **falkordb:** Add FalkorDB source and tools ([#3692](#3692)) ([a94702c](a94702c)) * **firestore-mongodb:** Add firestore-execute-mql and firestore-get-… ([#3826](#3826)) ([4a85d75](4a85d75)) * **mcp:** Add Secure Parameters support as Toolbox experimental extension ([#3394](#3394)) ([9750d2d](9750d2d)) * **server/mcp:** Support com.google.cloud/toolbox.v1 extension in v20260728 ([#3801](#3801)) ([f4f7da6](f4f7da6)) * **skill:** Add fix-failing-tests skill for mcp-toolbox ([#3821](#3821)) ([168e69c](168e69c)) * **sources:** Support native read-only mode and dynamic tool annotations ([#3872](#3872)) ([c257022](c257022)), refs [#3615](#3615) [#3816](#3816) [#3618](#3618) [#3851](#3851) [#3619](#3619) [#3617](#3617) * **tool/mongodb:** Allow collection to be specified at runtime ([#3715](#3715)) ([7626eaf](7626eaf)) ### Bug Fixes * **cloud-storage:** Resolve symlinks when enforcing local path boundaries ([#3810](#3810)) ([c2ada64](c2ada64)) * **config:** Compare env var offsets in rune space when skipping comments ([#3856](#3856)) ([2e76934](2e76934)) * Merge prebuilt tools when reloading custom config ([#3864](#3864)) ([5a6d865](5a6d865)) * Normalize postgres UUIDs to strings ([#3806](#3806)) ([3b02f1d](3b02f1d)) * **postgres:** Filter background processes in postgres-list-active-queries ([#3885](#3885)) ([3d9e62a](3d9e62a)) * **test/alloydbainl:** Use explicit SQL alias prompts to stabilize AI… ([#3877](#3877)) ([50e45ed](50e45ed)) * **tests:** Prevent resource leaks by using context.WithoutCancel ([#3849](#3849)) ([f97a4f9](f97a4f9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <[email protected]>
…3914) ## Description #3670 made `groups/list` and `groups/get` unreachable everywhere, because shipping them ungated and gating them later would have been a breaking change. This re-enables them on `2026-07-28` only, behind the `com.google.cloud/toolbox.v1` extension, following the secure-parameters pattern from #3394. `groups/get` returns the group's `ttlMs` and `cacheScope` alongside its tools and prompts, so a client that discovers tools through it gets the same cache hints `tools/list` returns for that group. `groups/list` carries no cache hint of its own — it spans groups that may each set a different `ttlMs` — and is unpaginated, since a server configures a bounded set of groups. --------- Co-authored-by: Yuan Teoh <[email protected]>
…lbox extension (#3914) ## Description #3670 made `groups/list` and `groups/get` unreachable everywhere, because shipping them ungated and gating them later would have been a breaking change. This re-enables them on `2026-07-28` only, behind the `com.google.cloud/toolbox.v1` extension, following the secure-parameters pattern from #3394. `groups/get` returns the group's `ttlMs` and `cacheScope` alongside its tools and prompts, so a client that discovers tools through it gets the same cache hints `tools/list` returns for that group. `groups/list` carries no cache hint of its own — it spans groups that may each set a different `ttlMs` — and is unpaginated, since a server configures a bounded set of groups. --------- Co-authored-by: Yuan Teoh <[email protected]>
…lbox extension (googleapis#3914) ## Description googleapis#3670 made `groups/list` and `groups/get` unreachable everywhere, because shipping them ungated and gating them later would have been a breaking change. This re-enables them on `2026-07-28` only, behind the `com.google.cloud/toolbox.v1` extension, following the secure-parameters pattern from googleapis#3394. `groups/get` returns the group's `ttlMs` and `cacheScope` alongside its tools and prompts, so a client that discovers tools through it gets the same cache hints `tools/list` returns for that group. `groups/list` carries no cache hint of its own — it spans groups that may each set a different `ttlMs` — and is unpaginated, since a server configures a bounded set of groups. --------- Co-authored-by: Yuan Teoh <[email protected]>
…lbox extension (googleapis#3914) ## Description googleapis#3670 made `groups/list` and `groups/get` unreachable everywhere, because shipping them ungated and gating them later would have been a breaking change. This re-enables them on `2026-07-28` only, behind the `com.google.cloud/toolbox.v1` extension, following the secure-parameters pattern from googleapis#3394. `groups/get` returns the group's `ttlMs` and `cacheScope` alongside its tools and prompts, so a client that discovers tools through it gets the same cache hints `tools/list` returns for that group. `groups/list` carries no cache hint of its own — it spans groups that may each set a different `ttlMs` — and is unpaginated, since a server configures a bounded set of groups. --------- Co-authored-by: Yuan Teoh <[email protected]>
mcp-toolbox 1.10.0 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## [1.10.0](googleapis/mcp-toolbox@v1.9.0...v1.10.0) (2026-08-27) ### Features * **falkordb:** Add FalkorDB source and tools ([#3692](googleapis/mcp-toolbox#3692)) ([a94702c](googleapis/mcp-toolbox@a94702c)) * **mcp:** Add Secure Parameters support as Toolbox experimental extension ([#3394](googleapis/mcp-toolbox#3394)) ([9750d2d](googleapis/mcp-toolbox@9750d2d)) * **server/mcp:** Support com.google.cloud/toolbox.v1 extension in v20260728 ([#3801](googleapis/mcp-toolbox#3801)) ([f4f7da6](googleapis/mcp-toolbox@f4f7da6)) * **skill:** Add fix-failing-tests skill for mcp-toolbox ([#3821](googleapis/mcp-toolbox#3821)) ([168e69c](googleapis/mcp-toolbox@168e69c)) * **sources:** Support native read-only mode and dynamic tool annotations ([#3872](googleapis/mcp-toolbox#3872)) ([c257022](googleapis/mcp-toolbox@c257022)), refs [#3615](googleapis/mcp-toolbox#3615) [#3816](googleapis/mcp-toolbox#3816) [#3618](googleapis/mcp-toolbox#3618) [#3851](googleapis/mcp-toolbox#3851) [#3619](googleapis/mcp-toolbox#3619) [#3617](googleapis/mcp-toolbox#3617) * **tools/firestore-mongodb:** Add tools for execute mql and get schema ([#3826](googleapis/mcp-toolbox#3826)) ([4a85d75](googleapis/mcp-toolbox@4a85d75)) * **tool/mongodb:** Allow collection to be specified at runtime ([#3715](googleapis/mcp-toolbox#3715)) ([7626eaf](googleapis/mcp-toolbox@7626eaf)) ### Bug Fixes * **cloud-storage:** Resolve symlinks when enforcing local path boundaries ([#3810](googleapis/mcp-toolbox#3810)) ([c2ada64](googleapis/mcp-toolbox@c2ada64)) * **config:** Compare env var offsets in rune space when skipping comments ([#3856](googleapis/mcp-toolbox#3856)) ([2e76934](googleapis/mcp-toolbox@2e76934)) * Merge prebuilt tools when reloading custom config ([#3864](googleapis/mcp-toolbox#3864)) ([5a6d865](googleapis/mcp-toolbox@5a6d865)) * Normalize postgres UUIDs to strings ([#3806](googleapis/mcp-toolbox#3806)) ([3b02f1d](googleapis/mcp-toolbox@3b02f1d)) * **postgres:** Filter background processes in postgres-list-active-queries ([#3885](googleapis/mcp-toolbox#3885)) ([3d9e62a](googleapis/mcp-toolbox@3d9e62a)) | **OS/Architecture** | **Description** | **SHA256 Hash** | | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- | | [linux/amd64](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/linux/amd64/toolbox) ([Signature](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/linux/amd64/toolbox.asc)) | For **Linux** systems running on **Intel/AMD 64-bit processors**. | 7e15dba09e6f957f64ce5924a0aa06b12cdf83ab26119813b0fa40edab566dd4 | | [darwin/arm64](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/darwin/arm64/toolbox) | For **macOS** systems running on **Apple Silicon** (M1, M2, M3, etc.) processors. | c994f06781462abba4171cb4844776c45605e391c57dc96adb3e130c81b53825 | | [darwin/amd64](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/darwin/amd64/toolbox) | For **macOS** systems running on **Intel processors**. | 12ebf78d9d05e8f3fe90c5d02ae14f2ccd96cf036f3dfba430bc32e3cfeadfd4 | | [windows/amd64](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/windows/amd64/toolbox.exe) | For **Windows** systems running on **Intel/AMD 64-bit processors**. | 734783941cb5864c0e5d4d78be625f8b12be23b01d94781d7fa7db9b3c25aac6 | | [windows/arm64](https://storage.googleapis.com/mcp-toolbox-for-databases/v1.10.0/windows/arm64/toolbox.exe) | For **Windows** systems running on **ARM 64-bit processors**. | d9be7c2ce1d2e29c20f2974cbac4cde857adad836cee565d2584f3fbcc97f096 |</pre> <p>View the full release notes at <a href="https://github.com/googleapis/mcp-toolbox/releases/tag/v1.10.0">https://github.com/googleapis/mcp-toolbox/releases/tag/v1.10.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!17982
Adds support for secure parameters as part of the Toolbox experimental extension. Tools can now mark parameters as secure (secure: true), and the server validates that sensitive arguments are exclusively passed via secureArguments.
INVALID_PARAMS: "tool not found").com.google.cloud/toolbox.v1extension explicitly blocks execution and returns a400 Bad Request(MISSING_REQUIRED_CLIENT_CAPABILITY).