Skip to content

fix(valkey): the MCP Valkey tools take no URL from the model - #2655

Merged
dan-petty merged 5 commits into
mainfrom
fix/2634-valkey-mcp-url
Oct 29, 2026
Merged

dan-petty merged 5 commits into
mainfrom
fix/2634-valkey-mcp-url

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The MCP tools valkey_ping, valkey_stats, valkey_info, valkey_get, valkey_set and valkey_flush published the option url. A model that gave it made devops-cli send valkey.password to any host that it named. valkey_set and valkey_flush also wrote to that host.

The tools now publish only their other options, through _PATH_PARAM_RESTRICTIONS, and use valkey.url. A call that gives url fails at the argument contract and opens no connection. The devops valkey commands keep --url for a person. SECURITY.md records that case under principle 11.

The shared test fake serving_valkey now returns at once when no client connects.

Change: openspec/changes/archive/2026-10-29-2634-valkey-mcp-tools-no-url/

Closes #2634

Plans #2634. The change folder holds the proposal with its feasibility
probe, the design, the spec delta and the tasks.
The tests call each tool through an MCP client with a URL that points to a
loopback listener. The listener must get no connection and no password. The
tools must still reach the configured server with the password.

serving_valkey returns at once when no client connects.
The six valkey_* MCP tools published the option url. A model that gave it
made devops-cli send the Valkey password to any host that it named, and
valkey_set and valkey_flush wrote to that host. The tools now publish only
their other options and use valkey.url. The commands keep --url for a person.

Closes #2634
Principle 11 speaks of MCP tools. A paragraph now names the --url option of
the devops valkey commands as the accepted case: a person types it and no
model gives the URL. One test pins the case, and the change folder says so.
Archives 2634-valkey-mcp-tools-no-url and adds its requirement to the
valkey-endpoint capability.
@dan-petty dan-petty added scope/security Security linters (trivy, bandit, gitleaks, kubeconform) and Vault type/security Type security: a vulnerability or a leak labels Oct 29, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test results from the topic branch, rebased on origin/main f8f1ff6.

  • uv run devops ci test tests/test_valkey.py tests/test_mcp.py tests/test_fastmcp_contracts.py: 360 passed.
  • tests/test_ui_dashboard.py, the other user of serving_valkey: passed in an earlier run of 407 tests.
  • ruff check, ruff format --check and mypy on the changed source modules: no issue.
  • uv run devops openspec check and uv run devops docs check: passed.

Fail-to-pass (uv run devops ci fail-to-pass --base origin/main): 7 failed on base, 116 passed, 0 errored.

  failed on base: tests.test_valkey.TestValkeyToolsTakeNoUrlFromTheModel::test_a_url_argument_is_refused_and_opens_no_connection[valkey_get] (AssertionError: assert (Fals
  failed on base: tests.test_valkey.TestValkeyToolsTakeNoUrlFromTheModel::test_the_tools_publish_no_url_parameter (AssertionError: assert {'valkey_flus... ['url'], ...} =
  failed on base: tests.test_valkey.TestValkeyToolsTakeNoUrlFromTheModel::test_a_url_argument_is_refused_and_opens_no_connection[valkey_flush] (AssertionError: assert (Fa
  failed on base: tests.test_valkey.TestValkeyToolsTakeNoUrlFromTheModel::test_a_url_argument_is_refused_and_opens_no_connection[valkey_stats] (AssertionError: assert (Fa
  failed on base: tests.test_valkey.TestValkeyToolsTakeNoUrlFromTheModel::test_a_url_argument_is_refused_and_opens_no_connection[valkey_ping] (AssertionError: assert (Fal
  failed on base: tests.test_valkey.TestValkeyToolsTakeNoUrlFromTheModel::test_a_url_argument_is_refused_and_opens_no_connection[valkey_set] (AssertionError: assert (Fals
  failed on base: tests.test_valkey.TestValkeyToolsTakeNoUrlFromTheModel::test_a_url_argument_is_refused_and_opens_no_connection[valkey_info] (AssertionError: assert (Fal
7 failed on base (7 failed and 116 passed in tests/test_valkey.py; 0 errored).

@dan-petty
dan-petty marked this pull request as ready for review October 29, 2026 14:51
@dan-petty
dan-petty merged commit 5bb1ed0 into main Oct 29, 2026
17 checks passed
@dan-petty
dan-petty deleted the fix/2634-valkey-mcp-url branch October 29, 2026 14:53
dan-petty-release Bot added a commit that referenced this pull request Oct 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.16.4](v0.16.3...v0.16.4)
(2026-10-29)


### Bug Fixes

* **valkey:** the MCP Valkey tools take no URL from the model
([#2655](#2655))
([5bb1ed0](5bb1ed0)),
closes [#2634](#2634)

---
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: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/security Security linters (trivy, bandit, gitleaks, kubeconform) and Vault type/security Type security: a vulnerability or a leak

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(valkey): a url that an mcp valkey tool gets from the model gets the valkey password

1 participant