Skip to content

Commit 52b14e1

Browse files
committed
docs: install-channel detection and per-channel update commands (Spec 079 US2)
rest-api.md documents the additive update.install_channel/update_command fields; version-updates.md gains 'How the Install Channel Is Detected' plus the per-channel command/guidance table.
1 parent 00f24c0 commit 52b14e1

2 files changed

Lines changed: 55 additions & 2 deletions

File tree

docs/api/rest-api.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,9 @@ Get application info, version, and update availability.
837837
"latest_version": "v1.3.0",
838838
"release_url": "https://github.com/smart-mcp-proxy/mcpproxy-go/releases/tag/v1.3.0",
839839
"checked_at": "2025-01-15T10:30:00Z",
840-
"is_prerelease": false
840+
"is_prerelease": false,
841+
"install_channel": "homebrew",
842+
"update_command": "brew upgrade mcpproxy"
841843
}
842844
}
843845
}
@@ -859,6 +861,8 @@ Get application info, version, and update availability.
859861
| `update.checked_at` | string | ISO 8601 timestamp of last update check |
860862
| `update.is_prerelease` | boolean | Whether the latest version is a prerelease |
861863
| `update.check_error` | string | Error message if update check failed |
864+
| `update.install_channel` | string | Detected install channel: `homebrew`, `dmg`, `deb`, `rpm`, `docker`, `go-install`, `windows-installer`, `tarball`, or `unknown`. Always present once detected, even when no update is available. See [Version Updates](/features/version-updates) for how detection works. |
865+
| `update.update_command` | string | Exact one-line update command for the detected channel. Only present when an update is available **and** the channel has a safe command (`homebrew`, `deb`, `rpm`, `go-install`); omitted for `dmg`/`windows-installer`/`tarball`/`docker`/`unknown` so a possibly-wrong command is never suggested. |
862866

863867
:::tip Update Checking
864868
MCPProxy automatically checks for updates every 4 hours. The update information is exposed via this endpoint and used by the tray application and web UI to show update notifications. Use `?refresh=true` to force an immediate re-check. Checking is controlled by the `update_check` config block (`enabled`, `channel`) — see [Version Updates](/features/version-updates); when disabled, `?refresh=true` performs no check and the `update` object is omitted.

docs/features/version-updates.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,63 @@ Response includes an `update` field when version information is available:
153153
"latest_version": "v1.3.0",
154154
"release_url": "https://github.com/smart-mcp-proxy/mcpproxy-go/releases/tag/v1.3.0",
155155
"checked_at": "2025-01-15T10:30:00Z",
156-
"is_prerelease": false
156+
"is_prerelease": false,
157+
"install_channel": "homebrew",
158+
"update_command": "brew upgrade mcpproxy"
157159
}
158160
}
159161
}
160162
```
161163

162164
See [REST API Documentation](../api/rest-api.md#get-apiv1info) for complete details.
163165

166+
## How the Install Channel Is Detected
167+
168+
MCPProxy identifies how it was installed so it can show the right update
169+
instruction for your setup (`install_channel` in `/api/v1/info`, plus the
170+
guided command in `mcpproxy status`, `mcpproxy doctor`, and the Web UI
171+
banner).
172+
173+
Detection prefers a **build-time channel marker** stamped into
174+
single-channel artifacts at packaging time (the Docker image and the Windows
175+
installer). When no marker is present — the release archives feed the
176+
tarball, Homebrew, and DMG channels from one binary — runtime heuristics run
177+
in decreasing confidence order:
178+
179+
1. **Homebrew**: the (symlink-resolved) executable path lives under a
180+
Homebrew prefix (`/opt/homebrew/`, a `Cellar/` path, or
181+
`/home/linuxbrew/.linuxbrew`).
182+
2. **Docker**: `/.dockerenv` exists.
183+
3. **deb / rpm**: on Linux, the executable is exactly `/usr/bin/mcpproxy`
184+
**and** the owning package manager's database confirms it
185+
(`/var/lib/dpkg/info/mcpproxy.list` for deb; an rpm database for rpm).
186+
Both signals are required — a binary merely copied to `/usr/bin` (e.g. an
187+
AUR or manual install) stays `unknown`.
188+
4. **DMG**: on macOS, the executable runs from an `.app/Contents/MacOS`
189+
bundle.
190+
5. **go install**: the Go toolchain stamped a real module version into the
191+
binary's build info while no release version was stamped via ldflags.
192+
6. Otherwise the channel is **`unknown`**.
193+
194+
Ambiguity always resolves to `unknown`: MCPProxy never guesses a channel,
195+
because a wrong update command is worse than a generic instruction.
196+
197+
### Update Commands per Channel
198+
199+
| Channel | `update_command` | Guidance shown instead |
200+
|---------|------------------|------------------------|
201+
| `homebrew` | `brew upgrade mcpproxy` ||
202+
| `deb` | `sudo apt update && sudo apt install --only-upgrade mcpproxy` ||
203+
| `rpm` | `sudo dnf upgrade mcpproxy` ||
204+
| `go-install` | `go install github.com/smart-mcp-proxy/mcpproxy-go/cmd/mcpproxy@latest` ||
205+
| `dmg` || Download the latest DMG (release page is deep-linked) |
206+
| `windows-installer` || Download the latest Windows installer |
207+
| `docker` || Pull or rebuild the newer image for your deployment |
208+
| `tarball` / `unknown` || Download the latest release from the releases page |
209+
210+
Every surface always deep-links the release notes for the latest version,
211+
whether or not a command is available.
212+
164213
## Updating MCPProxy
165214

166215
### Homebrew (macOS/Linux)

0 commit comments

Comments
 (0)