Skip to content
Back to search

kiri-mcp

MCP server that reports and installs the latest Kiri release on macOS and Linux

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/lightprozz--kiri-mcp/badge.svg)](/listings/lightprozz--kiri-mcp)

HTML

<a href="/listings/lightprozz--kiri-mcp"><img src="/api/listings/lightprozz--kiri-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 169 lines
  1. # kiri-mcp
  2. A local MCP server that reports the latest [Kiri](https://github.com/libracoder/kiri)
  3. release and installs it, on macOS and Linux.
  4. It lets an agent ask the machine it runs on two questions — *what is the
  5. latest Kiri, and is it installed?* — and then *install it*. It does the
  6. install the way the maintainer does it: the release feed's SHA-256, then
  7. Apple's signature and notarization, then the architecture and the version
  8. the feed promised. It never installs anything it has not verified.
  9. ## What it is not
  10. **It is not inside Kiri.** It is a separate tool, so updating Kiri does
  11. not update it and the other way round. Update it with `git pull`.
  12. **It is not issue #74's server.** Kiri's
  13. [issue #74](https://github.com/libracoder/kiri/issues/74) asks for a
  14. built-in `kiri mcp` server that agents use to manage containers, gated
  15. by Settings → AI integrations. That is a different server: inside the
  16. app, in Rust, driving the engine API. This one is a separate tool,
  17. in Python, and manages the Kiri app itself.
  18. Their tool names do not overlap. Issue #74 reserves the `kiri_*`
  19. namespace for engine tools (`kiri_status`, `kiri_list_containers`,
  20. `kiri_stop_container` and the rest); this server's tools are
  21. `kiri_release_status` and `kiri_install_latest`. A client holding both
  22. servers sees four distinct tools.
  23. This server follows #74's conventions for how an MCP server should
  24. behave: annotations on every tool, structured responses with capped
  25. output, diagnostics on stderr, and a timeout on every call.
  26. ## Registering it
  27. There is no virtualenv and no `pip install`: the server is Python 3's
  28. standard library only. Clone it and point your MCP client at `server.py`
  29. with an absolute path:
  30. ```bash
  31. git clone https://github.com/lightprozz/kiri-mcp ~/kiri-mcp
  32. ```
  33. **Cursor** (`~/.cursor/mcp.json`) or **Claude Desktop**:
  34. ```json
  35. "kiri-mcp": {
  36. "command": "/usr/bin/python3",
  37. "args": ["/Users/you/kiri-mcp/server.py"]
  38. }
  39. ```
  40. **Claude Code:** `claude mcp add kiri-mcp -- python3 ~/kiri-mcp/server.py`
  41. **Devin** (custom STDIO server; it clones the repo on first start):
  42. ```bash
  43. /bin/bash -c 'd="$HOME/.kiri-mcp"; [ -f "$d/server.py" ] || git clone -q --depth 1 https://github.com/lightprozz/kiri-mcp "$d" >&2; exec python3 "$d/server.py"'
  44. ```
  45. The key is `kiri-mcp`, not `kiri`, so the `kiri` name stays free for
  46. issue #74's built-in server. Two servers cannot share one key.
  47. ## The tools
  48. | Tool | What it does |
  49. |---|---|
  50. | `kiri_release_status` | Read-only. Reports the installed version and path, the latest release with its notes, artifact URL and SHA-256, and whether an update is available. Changes nothing. |
  51. | `kiri_install_latest` | Installs the latest Kiri, or updates the one that is installed. Takes `mode` (`auto`, `upgrade`, `install`) and `dry_run`. |
  52. `kiri_install_latest` **replaces the app** in `/Applications` (on Linux,
  53. the installed package). The upgrade
  54. restarts the engine, which stops the containers that were running. The
  55. tool is marked `destructiveHint: true` for that reason, and `dry_run`
  56. reports the whole plan without changing anything.
  57. ## What it verifies
  58. **The upgrade path** delegates to `kiri update`, Kiri's own updater.
  59. That path already does every check, and pins the update to the
  60. installed app's own signing identity — so only a genuine Kiri release
  61. is accepted:
  62. - the SHA-256 from the release feed,
  63. - the same designated requirement as the app already installed,
  64. - Apple's notarization (`spctl -a -t exec`),
  65. - the CPU slice the Mac needs,
  66. - the version the feed promised.
  67. **The fresh-install path** is the only place this tool verifies an
  68. artifact itself, and it mirrors the official `install.sh`: the feed's
  69. SHA-256, `codesign --verify --deep --strict`, `spctl -a -t exec`, the
  70. CPU slice, and the version in `Info.plist`.
  71. One difference from the upgrade path, stated plainly: **a fresh install
  72. accepts any valid notarized signature**, not only Kiri's own team
  73. identity — that is what the official installer does, and the anchor is
  74. the SHA-256 in the HTTPS feed. The upgrade path is stricter, because
  75. `kiri update` reads the requirement from the app already installed. Do
  76. not read the fresh-install guarantee as stronger than it is.
  77. **Nothing is written until every check has passed.** A failed check
  78. leaves the machine exactly as it was, and the old app is kept until the
  79. new one is in place.
  80. ## What a fresh install changes
  81. Besides the app itself, `kiri setup --no-domains` writes:
  82. - the LaunchAgent that starts the engine at login,
  83. - the `kiri` and `docker` commands on your shell `PATH`,
  84. - the `kiri` docker context,
  85. - `~/.testcontainers.properties`, for Testcontainers.
  86. The tool's result lists these, so a caller can see what the install
  87. touched.
  88. ## On Linux
  89. The same two tools work on Linux, through Kiri's `.deb` and `.rpm`
  90. packages instead of `Kiri.app`:
  91. - **Release:** Linux has no JSON feed, so the latest version comes from
  92. `https://download.runkiri.com/SHA256SUMS-linux`.
  93. - **Package:** `apt` systems get the `.deb` (`amd64`/`arm64`); `rpm`
  94. systems get the `.rpm` (`x86_64`/`aarch64`) through `dnf`, `yum` or `zypper`.
  95. - **Flavour:** an installed `kiri` or `kiri-lite` is kept. A fresh install
  96. picks `kiri`, or `kiri-lite` (the engine alone) when the system's glibc
  97. is older than the full package needs (`kiri` 0.2.2 needs glibc 2.39).
  98. - **Checks:** the package's SHA-256 must match `SHA256SUMS-linux` *and* the
  99. GitHub release's `SHA256SUMS`, and the package's own name, version and
  100. architecture must match. Linux packages carry no signature, so the two
  101. checksum lists are the only anchors.
  102. - **Root:** installing runs as root, or with passwordless `sudo -n`; the
  103. server never prompts for a password and fails with `needs_root` instead.
  104. - **Setup:** a fresh install runs `kiri host-access $USER`, which enables
  105. `kiri.service` and adds the user to the `kiri` group. That group owns
  106. `/run/kiri/docker.sock`, so membership is root-equivalent, like `docker`.
  107. - **Upgrade:** `kiri update` refuses on Linux, so an upgrade installs the
  108. new package over the old one; the engine restarts.
  109. `KIRI_FLAVOR` (`kiri` or `kiri-lite`) forces a flavour. `KIRI_SUMS_URL` and
  110. `KIRI_GITHUB_SUMS_URL` (`{version}` is substituted)
  111. override the two checksum lists.
  112. ## Environment variables
  113. | Variable | What it does |
  114. |---|---|
  115. | `KIRI_UPDATE_URL` | The feed to read. The same variable `kiri update` reads, so one override steers both paths. |
  116. | `KIRI_APP_DIR` | Where a fresh install lands. Defaults to `/Applications`, or `~/Applications` when the first is not writable. |
  117. | `KIRI_BIN` | The `kiri` binary to use. |
  118. | `KIRI_SOCKET` | The engine's socket, when it is not at `~/.kiri/run/docker.sock`. |
  119. | `KIRI_MCP_TIMEOUT` | Seconds for a network request. Default 30. |
  120. A release must come over HTTPS. The one exception is a loopback
  121. address, which is how the tests serve a feed from `127.0.0.1`; a
  122. plain-HTTP URL to any other host is refused.
  123. ## The tests
  124. ```bash
  125. python3 -m unittest discover -s tests -t .
  126. ```
  127. The macOS tests skip on Linux and the Linux tests skip on macOS.
  128. They never touch `/Applications`, never reach the network, and never
  129. leave a file behind. The round-trip with the official `mcp` client
  130. skips when that package is not installed (`pip install mcp`).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.