You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): repair tools cache thrashing and add negative caching
The bare mcp-cli-ent invocation re-discovered tools from every server on
each call because the cache gate required all enabled servers present. One
failing server made the cache unusable, costing 20-30s per invocation.
The discovery path now serves valid cache hits instantly and only contacts
servers that are missing, expired, or past their negative-cache window.
Failed servers are cached for five minutes and surfaced on stderr instead
of vanishing silently. The cache map is merged in place rather than
overwritten, so a transient failure on one server no longer evicts good
entries for the rest. Each discovery worker gets its own timeout that
prefers serverConfig.Timeout and falls back to the global flag.
Bumps VERSION to 1.3.0.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,20 @@
2
2
3
3
All notable changes to MCP CLI-Ent will be documented in this file.
4
4
5
+
<!-- RELEASE:START 1.3.0 -->
6
+
## [1.3.0] - 2026-07-08
7
+
8
+
### Fixed
9
+
10
+
-**Tools cache no longer thrashes on every invocation.** Bare `mcp-cli-ent` was re-discovering tools from all servers on every call (20-30s per invocation) because the cache gate required every enabled server to be present. A single failing server made the whole cache unusable. The discovery path now serves valid cache hits instantly and only contacts servers that are missing, expired, or past their negative-cache window.
11
+
-**Negative caching with visibility.** Servers that fail to connect are cached as failed for 5 minutes so they stop forcing full re-discovery. They are no longer dropped silently: a stderr line (`<server>: (skipped: recently failed; retry in <duration> or use --refresh)`) reports their status instead of letting them vanish from the output.
12
+
-**Cache is now merged, not overwritten.** Previously `SaveToolsToCache` wrote only the current run's successes, evicting previously-good entries on any transient failure (the cache shrank over time). The cache map is now updated in place, so a sibling failure never drops a good entry for another server.
13
+
-**`--clear-cache` / `--refresh` no longer delete the cache file.** They force live discovery for enabled servers, whose fresh results overwrite only their own keys. Cached entries for dormant or disabled servers are preserved.
14
+
-**Per-worker discovery timeout now honors server config.** Each discovery worker gets a `context.WithTimeout` that prefers `serverConfig.Timeout` and falls back to the global `--timeout` flag, so one hanging server can no longer stall the whole invocation up to the 30s transport default.
15
+
-**Cache write failures surface under `--verbose`.** A failed `SaveToolsToCache` previously failed silently, causing mysterious perpetual slowness; it now logs a warning.
0 commit comments