mcp-server-omv
by SDNick484
README.md
# mcp-server-omv
[](https://github.com/SDNick484/mcp-server-omv/actions/workflows/ci.yml)
An [MCP](https://modelcontextprotocol.io) server for [OpenMediaVault](https://www.openmediavault.org/) (OMV) 7
and 8. It runs `omv-rpc` on the NAS over SSH, so an MCP client such as Claude can read storage health, list
shares, and stage changes that you review and apply. There is no web-UI scraping and no agent on the NAS: the
only thing it can run there is `omv-rpc`.
> **Status: v1 feature-complete, run once on a real NAS.** Every tool below exists. The first hardware run
> (2026-12-01 and 2026-12-02: one OpenMediaVault NAS in a virtual machine, OMV 8.2.7 and then 8.8.1) checked the 31
> OMV details the code then depended on (see [Verification status](#verification-status)). With the 11 added since
> for the tools that came after v1, 11 of the 42 held (6 of them after the claim was corrected), 0 did not, and
> 31 are not confirmed yet, mostly because that NAS had no md plugin, no SMART data, one NFS export, and no
> external drive, and the 11 new ones came after the run. Five did not hold at first; they are filed as
> issues [#36](https://github.com/SDNick484/mcp-server-omv/issues/36) to
> [#40](https://github.com/SDNick484/mcp-server-omv/issues/40), are fixed in the code, and wait for a hardware
> re-check, and two of them (`O-NFS-SET` and `O-CATALOG`) are back to not confirmed. Of the run's other findings,
> [#41](https://github.com/SDNick484/mcp-server-omv/issues/41) to
> [#44](https://github.com/SDNick484/mcp-server-omv/issues/44), #41, #43, and #44 are fixed (the SMART tools say when a
> disk has no SMART data instead of reporting it as failing, `omv_list_updates` shows the installed version, and
> `omv_create_shared_folder` answers `unchanged` for an identical folder) and wait for a hardware re-check, and #42 (the
> fixtures still differ from a real NAS) needs fixtures recorded on one. Each detail of how OMV answers is a named assumption, and
> [HARDWARE_VALIDATION.md](https://github.com/SDNick484/mcp-server-omv/blob/main/HARDWARE_VALIDATION.md) is the
> checklist and the record of that run. If you have a NAS, a
> [hardware report](https://github.com/SDNick484/mcp-server-omv/issues/new?template=hardware_report.yml) of what
> worked on yours is the most useful thing you can send.
Not affiliated with the OpenMediaVault project.
## Design
- **Two phases.** OMV stages configuration changes and applies them separately, and so does this server: write
tools stage, a person reviews the pending changes, and a separate tool applies them.
- **Writes are off by default.** `OMV_ALLOW_WRITES=1` turns the write tier on.
- **One narrow transport.** The only remote command the server will build is an `omv-rpc` call. There is no
shell tool, no file transfer, and no port forwarding.
- **Curated tools first.** Storage health, shares, services, updates, and background jobs each have a tool with
checked arguments. `omv_rpc` is an escape hatch for the rest, and it is narrower than the tools (see
[Safety design](#safety-design)).
## Safety design
Three layers, and one limit you should know before you create the NAS account.
1. **The NAS account.** A dedicated non-root user, key-only SSH, and a sudoers entry for `/usr/sbin/omv-rpc` and
nothing else (setup below). This stops a root shell and anything outside OMV.
2. **The call policy (`policy.py`), always on.** Every call, from a curated tool or from `omv_rpc`, is decided
there before the runner sees it. Reads are allowed. Anything else, including a method the policy does not
know, is a write and needs `OMV_ALLOW_WRITES=1`. A deny list refuses, in every mode, what v1 does not offer
(commands, packages, accounts and keys, destroying data, taking the NAS offline, `extraoptions`) and the reads
that return secrets. The one exception is NFS's subtree choice (see [NFS share options](#nfs-share-options)).
Package upgrades (`Apt.upgrade` and `Apt.install`) are granted to `omv_install_updates` alone, with writes on;
the deny list still refuses them to `omv_rpc` and every other tool.
3. **Authorization tiers** for remote callers: `read`, `everyday`, and `costly`, from the shared `remote.py`
(see [Who may call what](#who-may-call-what)).
**The honest limit of the NAS account.** The sudoers entry is root-equivalent inside OMV. It stops a shell on the
NAS, and nothing else. `omv-rpc` run as root can schedule arbitrary commands (`Cron.set` and `Cron.execute`),
write any configuration object (`Config.set`), and manage users and keys, and any of those is root on the NAS. So
the account is **not a sandbox**, and the sudoers entry does not limit what OMV itself can do. What narrows this
server is the Python policy and its deny list, which run in the same process that holds the SSH key. Anyone who
gets that key, or who can run `ssh` with it, is not bound by the policy. Treat the key and the machine that holds
it as the trust boundary: keep the key readable by the service user only, use it for nothing else, and restrict it
to that machine's address in `authorized_keys`. A NAS-side allow-list wrapper, which would move the narrowing onto
the NAS, is tracked in [#18](https://github.com/SDNick484/mcp-server-omv/issues/18).
More that holds in every mode:
- **One remote command.** The runner (`runner.py`) can only build
`sudo -n /usr/sbin/omv-rpc -u admin <service> <method> <params>`, every part quoted, with service and method
names of letters and digits only. It runs the system `ssh` without a local shell, with stdin closed, and with
forwarding, agent, X11, and TTY requests off. One call at a time, each under `OMV_TIMEOUT`.
- **A narrower escape hatch.** Calls the model names through `omv_rpc` get two more limits. It reads only core
OpenMediaVault services (`RPC_READS` in `policy.py`), never a plugin's, because plugin reads can carry
secrets such as remote mount or LDAP bind passwords. With writes on, it writes only to SMB, NFS, shared
folders, SMART, and the rsync server (`RPC_WRITES`), and the deny list still applies inside them; every other
service's writes, plugins included, are refused as not in v1. The curated tools are not limited by these lists.
- **Secrets are redacted from every answer.** Whatever a call returns, for every tool, passes through a redactor
that replaces the value of any key that looks like a secret (`password`, `secret`, `psk`, `bindpw`, `token`,
and the like, or a key ending in `password` or `secret`) with `"[redacted]"`. An empty value stays empty, so
"no password set" is still visible. This is a second line behind the deny list, which refuses the reads known
to return secrets: log files, rsync jobs, rsync server modules, and wireless settings. (The rsync job tools
read the job list through a grant of their own and return allow-listed fields only; see Rsync jobs below.)
- **Nothing the NAS says is an instruction.** Share comments, job output, and RPC results are returned as data
fields, and the server instructions tell the model to treat them that way.
- **Apply and running an rsync job are the `costly` tools.** Over HTTP a person confirms each first. Apply
applies every pending change, including ones made in the OMV web interface; an rsync job runs rsync as root, and
one with `--delete` removes files at its destination.
## Install
Not on PyPI yet (the release workflow is in place; see CONTRIBUTING.md). From source:
```sh
git clone https://github.com/SDNick484/mcp-server-omv.git && cd mcp-server-omv
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]" && pytest
```
Requires Python 3.12+ and an OpenSSH client (`ssh`) on the machine that runs the server.
## Set up the NAS account
Do this once, as root on the NAS (the OMV web terminal, or `ssh` as `admin` and `su -`). Examples use
`nas.example.com` for the NAS and `192.0.2.10` for the machine that runs this server; use your own. The account
must be called `omv-mcp`, or set `OMV_SSH_USER`.
1. **Create the user, with a locked password.** On the NAS's Debian:
```sh
adduser --disabled-password --gecos "" omv-mcp
usermod -aG _ssh omv-mcp
```
The second line matters: OMV's SSH daemon only admits members of the groups its `AllowGroups` setting names
(`root` and `_ssh` on the NAS this was checked on). Without it the daemon refuses the key and the client falls
back to a password prompt that can never succeed. `sshd -T | grep -i allowgroups` shows the groups on your NAS;
if it lists `ssh` and not `_ssh`, use that.
There is then no password to guess or reuse. Check that the second field is `*` or starts with `!`:
`getent shadow omv-mcp | cut -d: -f2`. (If you would rather create the user on OMV's own Users page, see the
note after step 4.)
2. **Install the server's public key.** The key is the one the machine running this server logs in with: the
Alpine installer creates it and prints it (`/var/lib/mcp-server-omv/id_ed25519.pub`); anywhere else,
`ssh-keygen -t ed25519 -N '' -C mcp-server-omv -f /path/to/key` makes one, and you keep the private half off
the NAS. On the NAS:
```sh
install -d -m 0700 -o omv-mcp -g omv-mcp /home/omv-mcp/.ssh
vim /home/omv-mcp/.ssh/authorized_keys
chown omv-mcp:omv-mcp /home/omv-mcp/.ssh/authorized_keys && chmod 0600 /home/omv-mcp/.ssh/authorized_keys
```
The file holds one line: the public key with restrictive options in front.
```
restrict,from="192.0.2.10" ssh-ed25519 AAAA... mcp-server-omv
```
`restrict` turns off port, agent, and X11 forwarding, the pty, and `~/.ssh/rc`. `from=` limits the key to the
machine that runs this server (drop it, or give a pattern, if that address changes). This does not stop the
key running a command: the server sends one, so the login shell has to run it. That is what step 3 is for.
3. **Allow exactly one command through sudo.** Create `/etc/sudoers.d/omv-mcp` with `visudo`, never by hand:
```sh
EDITOR=vim visudo -f /etc/sudoers.d/omv-mcp
```
containing the one line
```
omv-mcp ALL=(root) NOPASSWD: /usr/sbin/omv-rpc
```
then check it, and that sudo reads it back as you meant:
```sh
visudo -cf /etc/sudoers.d/omv-mcp
sudo -l -U omv-mcp
```
The entry names the program and allows any arguments, because `omv-rpc` takes its method and parameters as
arguments. That is why it is root-equivalent inside OMV (see [Safety design](#safety-design)).
4. **First contact, from the machine that runs the server.** First by hand, to see ssh's own messages (this is
close to the command the runner builds):
```sh
ssh -i /path/to/key omv-mcp@nas.example.com -- sudo -n /usr/sbin/omv-rpc -u admin System noop '{}'
```
It should print a JSON value and exit 0. Then the server's own check, which says what the NAS is:
```sh
OMV_HOST=nas.example.com OMV_SSH_KEY=/path/to/key mcp-server-omv check
# OMV 7.x.y (major 7); services present: MdMgmt, SMB, ...
```
If it fails, `mcp-server-omv doctor` checks each layer and says which one (see
[Troubleshooting](#troubleshooting)). The server trusts the NAS's SSH host key the first time it sees it
(`StrictHostKeyChecking=accept-new`) and refuses a changed one after that. To avoid trusting the first sight,
compare `ssh-keygen -l -f /etc/ssh/ssh_host_ed25519_key.pub` on the NAS with the fingerprint in the
`known_hosts` file you connected from.
**Without sudo.** Instead of step 3 and the sudoers file, add the user to the `openmediavault-engined` group
(`usermod -aG openmediavault-engined omv-mcp`) and set `OMV_SUDO=0`. This is **equally powerful**: a member of
that group can call the same OMV RPC methods as root, with no program name to restrict, so everything under
[Safety design](#safety-design) applies unchanged. Choose it if you would rather not manage a sudoers file.
**OMV may regenerate SSH or user settings (unverified).** OMV generates its SSH daemon configuration and its
users' SSH settings from its own database. It limits SSH logins to members of a group (`_ssh`, step 1; seen in one
NAS's `sshd -T` output), and as far as I know it can write users' public keys from the user page. The rest has
not been checked on a real NAS. So, when you
can, create `omv-mcp` on OMV's Users page instead of with `adduser` (add it to the `_ssh` group, and paste the
public key into its public keys field; whether that field accepts options such as `restrict` is also unverified),
and run `mcp-server-omv check` again after every OMV update and after any change on the SSH, Users, or Apply
pages. If `check` starts to fail with "refused the SSH login" after an update, this is the first place to look.
## First contact
```sh
mcp-server-omv --version
mcp-server-omv check # the NAS's version and services, in one line
mcp-server-omv doctor # each layer, and which one failed
mcp-server-omv call omv_get_status # what the model sees first
```
With no NAS configured the status tool still answers, and says what to set.
## Use it with an MCP client
Local (stdio): Claude Code and Claude Desktop launch it themselves. With [uv](https://docs.astral.sh/uv/)
installed, `uvx` fetches and runs the published package, so there is no venv to manage (this works once the
package is on PyPI; until then, point `command` at the venv's `mcp-server-omv` as the second snippet does). In
Claude Desktop's `claude_desktop_config.json`:
```json
{
"mcpServers": {
"omv": {
"command": "uvx",
"args": ["mcp-server-omv"],
"env": { "OMV_HOST": "nas.example.com", "OMV_SSH_KEY": "/path/to/key" }
}
}
}
```
From a source install, use the full path to the venv's script instead:
```json
{
"mcpServers": {
"omv": {
"command": "/path/to/venv/bin/mcp-server-omv",
"env": { "OMV_HOST": "nas.example.com", "OMV_SSH_KEY": "/path/to/key" }
}
}
}
```
For Claude Code:
```sh
claude mcp add omv --env OMV_HOST=nas.example.com --env OMV_SSH_KEY=/path/to/key -- uvx mcp-server-omv
```
Claude Desktop does not see your shell's `PATH`, so if it cannot start `uvx`, give its full path (`which uvx`; on
Windows, `where uvx` in a Command Prompt). The server starts without `OMV_ALLOW_WRITES`, so a client can read
everything and change nothing until you add `"OMV_ALLOW_WRITES": "1"` to `env`.
Things you can ask:
- *"Is the NAS healthy? Check the disks and the filesystems."*
- *"Which shares let guests in?"*
- *"Create a read-only SMB share called retro-roms for my arcade cabinet, and show me what is pending."*
- *"Refresh the package index and tell me what is upgradable."*
### As a service (Streamable HTTP)
To share one instance between clients through a Cloudflare Tunnel with Cloudflare Access in front:
```sh
CF_ACCESS_TEAM_DOMAIN=example.cloudflareaccess.com CF_ACCESS_AUD=<aud tag> \
mcp-server-omv serve --http --public-host mcp.example.com # 127.0.0.1:8710/omv/mcp
```
`GET /healthz` and `GET /omv/mcp/healthz` answer 200 while the process is up, and 503 while the NAS is known to be
unreachable. Every other request must carry a valid Access JWT (`Cf-Access-Jwt-Assertion`); the checks and the
flags are documented in `src/omv_mcp/remote.py`.
### Remote access behind Cloudflare Access
The server listens on loopback and `cloudflared` publishes it; Access decides who gets in. With placeholders:
1. In Cloudflare Zero Trust, add a self-hosted Access application for `mcp.example.com` with a policy that allows
only you (for example, your email by one-time PIN). Copy its **Application Audience (AUD) tag** (`<aud tag>`);
your team domain is `example.cloudflareaccess.com`.
2. Route the tunnel's public hostname `mcp.example.com` to `http://127.0.0.1:8710` (run `cloudflared` on the same
host so the server can stay on loopback).
3. Give the server the team domain, the AUD tag, and the public host (the Alpine file below has the lines).
4. In your MCP client, add a remote server at `https://mcp.example.com/omv/mcp`.
A person's Access login may use every tool; apply still asks them to confirm. An Access service token (an
automated job) is refused unless listed in `MCP_ALLOWED_SERVICE_TOKENS`, and then gets only the tiers in
`MCP_AUTOMATION_TIERS` (default `read,power-off`, of which only `read` exists in this server); never give it
`costly`. The server verifies the Access JWT itself, so it
does not trust a request just because it came through the tunnel.
### As an OpenRC service on Alpine (a Proxmox LXC, say)
`deploy/alpine/install.sh` installs it as an OpenRC service: a venv in `/opt/mcp-server-omv`, a `mcp-omv` system
user, settings in `/etc/mcp-server-omv/env` (mode 0640), the SSH key and `known_hosts` in
`/var/lib/mcp-server-omv` (mode 0700, the service user's own), logs in `/var/log/mcp-server-omv/server.log`, and
`supervise-daemon` restarting it if it exits. It listens on port 8710. The LXC needs TCP to the NAS's SSH port.
```sh
git clone https://github.com/SDNick484/mcp-server-omv.git && cd mcp-server-omv
sh deploy/alpine/install.sh # as root; prints the public key for the NAS account (step 2)
vim /etc/mcp-server-omv/env # OMV_HOST, MCP_PUBLIC_HOSTS, CF_ACCESS_TEAM_DOMAIN, CF_ACCESS_AUD
su -s /bin/sh mcp-omv -c 'set -a; . /etc/mcp-server-omv/env; set +a; \
OMV_SSH_KNOWN_HOSTS=/var/lib/mcp-server-omv/known_hosts /opt/mcp-server-omv/venv/bin/mcp-server-omv check'
rc-update add mcp-server-omv default && rc-service mcp-server-omv start
curl http://127.0.0.1:8710/omv/mcp/healthz
```
Re-running `install.sh` upgrades the code and keeps the settings, the key, and `known_hosts`. To turn writes on,
set `OMV_ALLOW_WRITES=1` in the env file and `rc-service mcp-server-omv restart`. CI runs
`deploy/alpine/smoke-test.sh` in a stock `python:3.12-alpine` container (install, upgrade without clobbering,
`/healthz`, and one MCP call over HTTP). The service has run once against a real NAS, behind Cloudflare Access
(HARDWARE_VALIDATION.md steps 10 and 11); the upgrade check was not run there.
#### Deployed on every merge (optional)
`deploy/app.toml` is the manifest for [ha-deploy](https://github.com/SDNick484/ha-deploy)'s release
mode, which deploys every merge to `main` whose checks passed and puts the previous release back if
the new one does not come up reporting its commit on `/healthz`. It builds each commit as an
unprivileged user with `deploy/release/build.sh` (a venv and `run.sh`, nothing else), installs it as
`/opt/mcp-server-omv/releases/<sha>`, and points `/opt/mcp-server-omv/current` at it. The OpenRC
script uses `current` when it exists and the plain install otherwise, so one host can move from
`install.sh` to release mode without a reinstall: the settings in `/etc/mcp-server-omv/env`, and the
SSH key and `known_hosts` in `/var/lib/mcp-server-omv`, are never touched (the state directory is
snapshotted before each deploy and put back on a rollback). On the deploy host, once:
```sh
# as root, after `sh deploy/alpine/install.sh` has been run at some point (user, key, settings, service)
vim /etc/ha-deploy/projects.conf # this server's line: mode=release repo=... user=mcp-omv health=...
rc-service ha-deploy reload
su -s /bin/sh deploy -c 'git -C /srv/mcp/mcp-server-omv pull --ff-only'
su -s /bin/sh deploy -c 'ha-deploy adopt mcp-omv --sha "$(git -C /srv/mcp/mcp-server-omv rev-parse HEAD)"'
rc-update add mcp-server-omv default
```
The CI `release` job (`deploy/release/rehearse.sh`) runs that adoption with the real deployer in an
`alpine:3.24` container, with no NAS configured, then a deploy of a second commit, and a deploy of a
commit that cannot start, which must end with the previous release running again. The settings, the
SSH key, and a state file must come through all three unchanged.
### In a container (optional)
`deploy/docker/Dockerfile` builds a non-root image (user 10001) that carries the system `ssh` the server runs.
Everything it keeps is in the `/data` volume: the SSH private key, `known_hosts`, and `config.json`
(`OMV_SSH_KEY`, `OMV_SSH_KNOWN_HOSTS`, and `OMV_CONFIG_DIR` point there):
```sh
docker build -f deploy/docker/Dockerfile -t mcp-server-omv .
docker run --rm -v omv-data:/data --entrypoint ssh-keygen mcp-server-omv \
-t ed25519 -N '' -C mcp-server-omv -f /data/id_ed25519 # once; put /data/id_ed25519.pub on the NAS account (step 2)
docker run --rm -v omv-data:/data -e OMV_HOST=nas.example.com mcp-server-omv check # once: records the NAS's host key
docker run -d --name omv -p 127.0.0.1:8710:8710 -v omv-data:/data -e OMV_HOST=nas.example.com \
-e MCP_HTTP_BIND=0.0.0.0 -e MCP_PUBLIC_HOSTS=mcp.example.com \
-e CF_ACCESS_TEAM_DOMAIN=example.cloudflareaccess.com -e CF_ACCESS_AUD=<aud tag> mcp-server-omv
```
Inside the container the server has to listen on `0.0.0.0`, which it refuses without the Access settings. The
container needs outbound TCP to the NAS's SSH port and nothing else; it discovers nothing, so no `--network host`.
Check the `ssh-keygen` fingerprint against the NAS the way step 2 describes before trusting the first contact.
CI builds the image and checks that it runs as non-root and that `serve --http` answers `/healthz`
(`deploy/docker/smoke-test.sh`).
## Configuration
Environment variables beat `config.json` in `OMV_CONFIG_DIR` (default `$XDG_CONFIG_HOME/mcp-server-omv`). A key
in `config.json` is the variable's name without `OMV_`, in lower case (`ssh_user`). A bad value is reported by
`omv_get_status` and the default is used.
| Setting | Default | What it does |
| ------- | ------- | ------------ |
| `OMV_HOST` | none | NAS host name or address. Without it the server starts and every tool says what to set |
| `OMV_SSH_USER` | `omv-mcp` | SSH login user on the NAS |
| `OMV_SSH_PORT` | `22` | SSH port |
| `OMV_SSH_KEY` | none | Private key file; without it `ssh` uses its own defaults |
| `OMV_SSH_KNOWN_HOSTS` | none | `known_hosts` file the SSH client reads and writes (passed as `-o UserKnownHostsFile=`); without it `ssh` uses `~/.ssh/known_hosts`. The Alpine service sets it to a file in its state directory |
| `OMV_SUDO` | `1` | Run `omv-rpc` through `sudo -n`; `0` is for a user in the `openmediavault-engined` group |
| `OMV_TIMEOUT` | `60` | Seconds per RPC call, 1 to 170 (OMV's own socket timeout is 180 s) |
| `OMV_ALLOW_WRITES` | `0` | `1` enables the write tier. Off by default |
| `OMV_DRY_RUN` | `0` | Write tools report what they would send and send nothing (`serve --dry-run` too) |
| `OMV_LOG_UNREDACTED` | `0` | Skip address masking in logs (`--no-redact`); secrets are still masked |
`OMV_CONFIG_DIR` itself is read from the environment only. For `serve --http`, `MCP_ALLOWED_SERVICE_TOKENS` and
`MCP_AUTOMATION_TIERS` come from the shared `remote.py`
([what each caller may do](https://github.com/SDNick484/mcp-server-shared#what-each-caller-may-do)).
## Tools
| Tool | What it does |
| ---- | ------------ |
| `omv_get_status` | Start here: whether a NAS is configured and reachable, its OpenMediaVault version, host name, uptime, load, memory, pending changes, reboot and update counts, which plugins and optional services it has, whether writes and dry run are on, and configuration problems |
| `omv_list_services` | The NAS's services (SMB, NFS, SSH, the rsync server, and the rest) with enabled and running; name one (ssh, samba, nfs, rsyncd; OMV names SMB `samba`, and `smb` finds it too) for its key settings, from a fixed allow-list that never includes free-text options or secrets |
| `omv_list_plugins` | The OpenMediaVault plugins, installed or not: package name, installed, installed and available versions and whether an upgrade is available (when OMV sends them), a one-line summary, and the repository; `installed_only` narrows it. Read only: installing, removing, and uploading plugins are not offered, since a plugin is a Debian package whose scripts run as root, and `omv_rpc` refuses them too |
| `omv_list_updates` | The upgradable packages with their installed (OMV's `oldversion`) and candidate versions, and the count, as of the NAS's last package index refresh. Read only: it neither refreshes the index nor installs anything |
| `omv_list_shared_folders` | The shared folders: name, filesystem, relative and absolute path, comment, and the SMB and NFS shares that reference each one (an NFS entry has the client, OMV's `options`, and `export_options`, `other_options_set`, and `concerns`, as under NFS share options below) |
| `omv_list_shares` | The SMB and NFS shares with the settings that decide who can reach them (enabled, guest access, read-only, browseable, NFS client, OMV's `options` field, and `export_options`, the known option words from `options` and `extraoptions` together, with `other_options_set` and `concerns`; see NFS share options below), and whether each service is installed and enabled; an absent or disabled service is stated, not an error |
| `omv_list_disks` | The physical disks: model, size, serial (masked unless asked), temperature, and SMART's overall verdict; `smart_unavailable` marks a disk SMART seems to have no data on, whose status is probably no verdict (`omv_get_disk_health` confirms) |
| `omv_get_disk_health` | One disk's SMART information, attributes, and self-test log, with the concerns in plain sentences; says SMART is not available (a note, not a concern) for a disk it cannot read; refuses a device the disk list does not have |
| `omv_list_filesystems` | Filesystems with label, type, mount point, size, used, available, percent, and mounted; an external drive shows up here with its usage |
| `omv_list_raid_arrays` | Software RAID arrays with level, size, state, and members; says `available: false` and why when the md plugin is not installed |
| `omv_start_job` | Start a background job on the NAS and follow it: `refresh_updates` (the package index, works with writes off) or `smart_test` (one of the NAS's scheduled SMART self-tests, chosen by disk and type, after `omv_create_smart_schedule` if the disk has none; needs writes on). Returns a job id; at most 4 jobs at once, one per kind and target |
| `omv_get_job` | A job's state (running, succeeded, failed, stopped, or lost) and its last 200 output lines, or every job this server run started |
| `omv_stop_job` | Stop a running job (SIGTERM on the NAS) and keep its last output |
| `omv_get_pending_changes` | What is staged and not applied: whether the configuration is dirty, the dirty modules, and one line per change this server staged since the last apply or revert |
| `omv_create_shared_folder` | Create a shared folder on a mounted filesystem chosen by label or device file, with an optional relative path, comment, and mode; OMV creates the directory at once, the configuration change is staged |
| `omv_create_smb_share` | Share a shared folder over SMB with guest access, read-only, browseable, and a comment; every other setting is a fixed default (see below), never extra options. Staged |
| `omv_create_nfs_share` | Export a shared folder over NFS to one host, address, or CIDR network, read-only by default, with options from a fixed list (see NFS share options below). Staged |
| `omv_create_smart_schedule` | Create a SMART self-test schedule (short, long, conveyance, or offline) for a disk SMART can read, switched off unless asked, at a fixed time (03:00 on 1 January), so `omv_start_job` can run a test on that disk; refuses a duplicate schedule. Staged |
| `omv_apply_changes` | Apply every pending change (OMV's Apply) as a job and follow it to its end, or return the job id while it runs; refuses when nothing is pending |
| `omv_revert_changes` | Drop every pending change (OMV's Revert) and say what was dropped; directories already created on disk stay |
| `omv_rpc` | The escape hatch: calls one OMV RPC method through the call policy, narrower than the tools. Reads only on core services (`RPC_READS`; plugin services are refused); writes only on SMB, NFS, ShareMgmt, Smart, and Rsyncd (`RPC_WRITES`), only with `OMV_ALLOW_WRITES=1`, staged and never applied; the deny list, sensitive reads, `Exec`, and `Config` apply and revert refused in every mode. OMV's answer comes back under `result`, with secret-looking values redacted; a read over 64 KB is refused with a hint to page it |
| `omv_list_methods` | The method catalog for the NAS's OMV major, without the optional services it lacks, with what `omv_rpc` would do with each method (read, write needing `OMV_ALLOW_WRITES=1`, or refused), asked of the call policy itself. A catalog compiled from the OMV source, not a live listing |
| `omv_list_users` | The user accounts the web interface lists (not system accounts): name, uid, primary group, groups, shell, comment, `ssh_login` (in OMV's `_ssh` group), and `ssh_keys`, the number of SSH public keys. Never the keys, e-mail addresses, or password fields. Read only: creating or changing accounts is not offered |
| `omv_list_groups` | The groups the web interface lists (not system groups): name, gid, members, and comment. Read only |
| `omv_list_rsync_jobs` | The NAS's rsync jobs: uuid, enabled, type (local, push, pull), source and destination (a shared folder by name, or a remote end with its `user@host` masked unless `show_remote`), the schedule in words, the comment, the rsync options from OMV's check boxes, `deletes_at_destination`, and `extra_options_set`; never a password or the extra options themselves |
| `omv_run_rsync_job` | Run one existing rsync job now, chosen by uuid or comment (exact or ignoring case), as a background job; refuses a disabled job unless `run_disabled`, and refuses while rsync changes are pending. Needs writes on |
| `omv_install_updates` | Install the pending package upgrades, every one (OMV's Install updates) or only the named ones `omv_list_updates` lists, as a job followed to its end or returned as a job id; says `reboot_required` once it has ended; refuses when nothing is upgradable; cannot be stopped. Needs `OMV_ALLOW_WRITES=1`, and a person confirms it |
### Changing shares: stage, review, apply
The three create tools and `omv_revert_changes` need `OMV_ALLOW_WRITES=1`, and with `OMV_DRY_RUN=1` they say what
they would send and send nothing. A create tool stages one change and returns `pending`, the modules OMV now
reports as dirty; nothing reaches Samba or NFS until `omv_apply_changes`. Arguments are checked before anything
is sent: names, relative paths, and NFS clients against strict patterns, comments as one printable line of at most
200 characters, and no argument can set `extraoptions`: it is empty for SMB, and for NFS one of two fixed words (see
[NFS share options](#nfs-share-options)). A name or share that already exists is
refused, except that the same arguments as the existing object return `unchanged`. Creating a share never enables
a disabled SMB or NFS service; the answer says so.
The flow is always the same, and the server instructions tell the model to follow it:
1. A write tool stages a change and returns `pending`.
2. `omv_get_pending_changes` lists what is waiting: whether OMV is dirty, which modules, and one line per change
this server staged. The model shows this to you.
3. You say yes, and `omv_apply_changes` applies **every** pending change, including any made in the OMV web
interface, as a job it follows to its end (or whose job id it returns while it runs). It refuses when nothing
is pending. Over HTTP it asks you to confirm first.
4. Or `omv_revert_changes` drops every pending change. A shared folder's directory is created on disk when it is
staged, and a revert does not remove it.
#### Worked example: a ROM share for a retro-gaming cabinet
A cabinet running a retro-gaming distribution reads its games from a network share on `nas.example.com`. With
`OMV_ALLOW_WRITES=1`, you ask: *"Make a read-only share called retro-roms that the cabinet can read without a
login."* The model works through these calls (answers abridged):
1. `omv_get_status`: `reachable` is true, `omv_major` is 7, `writes_enabled` is true, and `pending_changes` is
false.
2. `omv_list_filesystems`: the data filesystem labelled `data1` is mounted with room to spare.
3. `omv_create_shared_folder name="retro-roms" filesystem="data1" comment="ROMs for the cabinet"`: `outcome`
is `staged`, `pending` lists the module OMV marked dirty (`sharedfolders`), and the detail says OMV created
the directory already.
4. `omv_create_smb_share shared_folder="retro-roms" guest="allow" read_only=true comment="ROMs for the cabinet"`:
`outcome` is `staged`, and `pending` now lists `samba` too.
5. `omv_get_pending_changes`: `dirty` is true, `modules` is those two, and `staged_by_this_server` has one line
per call above. The model shows you these lines and asks whether to go on.
6. You agree, and `omv_apply_changes` runs (over HTTP, your client asks you to confirm): `outcome` is `applied`,
`pending` is empty.
The cabinet then mounts `//nas.example.com/retro-roms`. If SMB was not enabled on the NAS, step 4's `detail` says
the share is staged but not served until you enable the service in OMV; this server never switches a service on.
Guest access with read-only is a choice that suits a cabinet on a trusted network: pass `guest="no"` to require a
login instead. To undo before step 6, `omv_revert_changes` drops both changes, and you remove the leftover
`retro-roms` directory yourself.
### Background jobs
`omv_start_job` starts a long operation on the NAS and returns a job id this server mints (the NAS's own status
file name never leaves the server). Two kinds exist: `refresh_updates` refreshes the package index, so
`omv_list_updates` sees new versions, and works with writes off, since it changes no configuration; `smart_test`
runs one of the NAS's *scheduled* SMART self-tests now, chosen by `target` (the disk) and, when a disk has several,
`test`, and needs writes on. OMV can only run a test that has a schedule, so an unmatched request is refused with
the list of scheduled tests, and `omv_create_smart_schedule` creates one (switched off, so it never fires by itself;
it is staged like a share, and if `smart_test` cannot start the new test before it is applied, apply first).
`omv_get_job` shows a job's state (`running`, `succeeded`, `failed`, `stopped`, or `lost`) and its last 200 output
lines, or lists every job of this server run; `omv_stop_job` sends SIGTERM to the job on the NAS. At most 4 jobs
run at once, one per kind and target. Jobs live in memory: after a restart an old id is `lost`, and stopping the
server does not stop a job already running on the NAS. Apply runs as one of these jobs too.
### Rsync jobs
`omv_list_rsync_jobs` lists the rsync jobs the NAS's administrator configured, and `omv_run_rsync_job` runs one of
them now, as a background job that `omv_get_job` follows and `omv_stop_job` stops. That is all: creating, changing,
and deleting jobs, the rsync server's modules, and cloud backup are not offered. A job is a command OMV runs as root
(`Rsync.execute` runs the job's script), and its configuration carries a password and free-text extra options that
go onto rsync's command line, so a tool that wrote jobs would let the model write that command. Running a job the
administrator set up is the same kind of action as running an existing SMART schedule.
- **What the list shows.** Per job: the uuid, enabled, the type (`local`, `push`, or `pull`), the source and
destination (a shared folder by name, or a remote end with its protocol, module, and path, and its `user@host`
masked to the last four characters unless `show_remote` is true), the schedule in words, the comment, the rsync
options OMV's check boxes turn on, `deletes_at_destination`, and `extra_options_set`. Never the password, never
the extra options themselves (as with NFS's `other_options_set`), and never a password written into an address.
- **Who may read and run.** `Rsync.getList` and `Rsync.execute` stay on the deny list. The call policy grants them
to the rsync tools' own origin only (`Origin.RSYNC`): the list with writes off, the run with
`OMV_ALLOW_WRITES=1`. `omv_rpc` can still neither read the job list nor run a job.
- **Running one.** `job` is the uuid or the comment, matched exactly or ignoring case, never a near match; a miss
names the jobs by uuid. A disabled job is refused unless `run_disabled` is true. The run is `costly`, so over HTTP
a person confirms it, because a job with `--delete` removes files at its destination. It waits up to 10 seconds,
so a job that fails at once says so, and otherwise returns the job id. OMV refuses to run a job while rsync changes
are pending, and so does this server, before it sends anything. Dry run says which job it would run.
#### Installing updates
`omv_install_updates` installs what `omv_list_updates` lists, as a job of kind `install_updates`. Without
`packages` it calls `Apt.upgrade`, which is OMV's own Install updates button: `apt-get dist-upgrade` for every
upgradable package, keeping the old configuration files. With `packages` it calls `Apt.install` for exactly those
names, each of which must be upgradable now (any other name is refused, with the list). It needs
`OMV_ALLOW_WRITES=1`, refuses when nothing is upgradable, and is `costly`: over HTTP the person confirms it first.
Dry run says which packages it would cover and sends nothing. It waits up to a minute, then returns the job id;
once the job has ended, its answer (and `omv_get_job`'s) adds `reboot_required`, read from the NAS at that moment.
`omv_stop_job` refuses it, since an interrupted upgrade can leave packages half configured. An upgrade of
`openmediavault` or a plugin restarts OMV's engine while the job runs, so this server can lose sight of the job and
report it `lost` (or `failed`) while apt carries on; the answer says so, and `omv_list_updates` and
`omv_get_status` then show how it ended.
### The escape hatch: `omv_rpc`
`omv_rpc` calls one OMV RPC method by service and method name, for what no curated tool covers. Prefer the tools:
they check their arguments, and `omv_rpc` is deliberately narrower in what it will touch.
- **Reads** (`get...`, `enumerate...`, `list...`, `is...`, `has...`) are allowed on core OMV services only
(`RPC_READS`); a plugin service is refused because plugin reads can carry secrets. A result over 64 KB is
refused with a hint to page it with `start` and `limit`.
- **Writes** need `OMV_ALLOW_WRITES=1`, work only on SMB, NFS, ShareMgmt, Smart, and Rsyncd (`RPC_WRITES`), and are
staged and never applied: the answer has `outcome`, `detail`, and `pending`, and the model should show
`omv_get_pending_changes` next.
- **Refused in every mode:** the deny list (commands, packages, accounts and keys, destroying data, taking the NAS
offline, a non-empty `extraoptions`, with no exception for `omv_rpc`), the reads that return secrets, `Exec`, and
`Config` apply and revert.
- OMV's answer comes back under `result`, with secret-looking values shown as `"[redacted]"`.
`omv_list_methods` shows the catalog of methods for the NAS's OMV major, without the optional services it lacks,
with what `omv_rpc` would do with each (read, write needing `OMV_ALLOW_WRITES=1`, or refused), asked of the call
policy itself. It is a catalog compiled from the OMV source and not a live listing: OMV has no call that lists its
own methods.
### NFS share options
`omv_create_nfs_share` sends two option fields, and OMV writes the share into `/etc/exports` as
`<client>(fsid=<uuid>,<options>,<extraoptions>)` (assumption `O-NFS-SET`, read in the OMV source):
| Field | Value | Why |
| ----- | ----- | --- |
| `options` | `ro` (the default) or `rw`, then `insecure` only with `insecure=true` | `ro` and `rw` are what OMV's own form puts here. `insecure` stays here and not in `extraoptions`, because OMV also turns its NFSv4 pseudo-root (`/export`) `insecure` for a client whose share has `insecure` in `extraoptions`, which is more than the tool's arguments ask for |
| `extraoptions` | `subtree_check` (the default), or `no_subtree_check` with `subtree_check=false` | OMV refuses an empty value (hardware run 1, issue #38). `no_subtree_check` is what NFS does when neither is named (exports(5), since nfs-utils 1.1.0), so naming it changes nothing |
**The one exception to "never extra options".** The call policy refuses a non-empty `extraoptions` everywhere,
except that the curated NFS tool may send exactly `subtree_check` or `no_subtree_check` to `NFS.setShare`
(`policy.EXTRAOPTIONS`). No argument can set it, `omv_rpc` gets no such exception, and SMB's stays empty. OMV's web
form fills it with `subtree_check,insecure` by default; this tool does not. No NAS has run this yet
(HARDWARE_VALIDATION.md step 7).
**What the list tools show.** `omv_list_shares` and `omv_list_shared_folders` never return `extraoptions` as text. Each
NFS entry still has `options` as OMV sent it, and also:
| Field | Meaning |
| ----- | ------- |
| `export_options` | A list: the words of `options` then `extraoptions`, comma-separated, in OMV's order, each once, and only the known ones. A word is listed when it is exactly (case-sensitive) one of `ro`, `rw`, `sync`, `async`, `secure`, `insecure`, `subtree_check`, `no_subtree_check`, `wdelay`, `no_wdelay`, `hide`, `nohide`, `crossmnt`, `root_squash`, `no_root_squash`, `all_squash`, `no_all_squash`, `insecure_locks`, `no_auth_nlm`, `secure_locks`, or `auth_nlm`; or `anonuid=N` or `anongid=N` where `N` is one to ten ASCII digits. So a share made in OMV's web form lists `ro`, `subtree_check`, and `insecure`, and one made by `omv_create_nfs_share` lists its subtree choice |
| `other_options_set` | `true` when anything else was set (an unknown word, a value on a word that takes none, `fsid=`, `sec=`, a non-numeric `anonuid`, whitespace, an empty word, a different case, or more than 64 words). What it was is never returned: the model learns that something is configured, not what |
| `concerns` | Present only when there is something to say: this server's own fixed sentences, never NAS text, for `no_root_squash`, `insecure`, and `all_squash` together with `anonuid=0` |
Both fields are absent when OMV sent neither `options` nor `extraoptions` as text. The words are the same whether they
sit in `options` or `extraoptions`, as OMV writes them together into `/etc/exports` (`O-NFS-SET`, `O-NFS-LIST`).
### SMB share defaults
`omv_create_smb_share` chooses guest access, read-only, browseable, and the comment. Every other `SMB.setShare` field
gets this fixed value (assumption `O-SMB-SET-DEFAULTS`); change them afterwards in the web interface if you need to.
| Field | Value | Meaning |
| ----- | ----- | ------- |
| `enable` | `true` | The share is switched on |
| `recyclebin` | `false` | No recycle bin: deleted files are gone |
| `recyclemaxsize` | `0` | No recycle bin size limit (unused without a recycle bin) |
| `recyclemaxage` | `0` | No recycle bin age limit (unused without a recycle bin) |
| `hidedotfiles` | `true` | Files whose names start with a dot are hidden |
| `inheritacls` | `true` | New files and directories inherit the folder's ACLs |
| `inheritpermissions` | `false` | New files get the usual create mask, not the parent directory's mode |
| `easupport` | `false` | No extended attribute support |
| `storedosattributes` | `false` | DOS attributes are not stored |
| `hostsallow` | `""` | No host allow list: any host that can reach the NAS may connect (logins still apply) |
| `hostsdeny` | `""` | No host deny list |
| `audit` | `false` | No access auditing |
| `extraoptions` | `""` | No extra smb.conf lines, ever |
## Who may call what
Every tool has an authorization tier. People (an Access login, or stdio) may use all of them; an Access service
token, if you admit one, gets only `MCP_AUTOMATION_TIERS`. The tiers are `read`, `everyday`, and `costly`
(`costly` asks the person to confirm).
| Tool | Tier |
| ---- | ---- |
| `omv_get_status` | `read` |
| `omv_list_services` | `read` |
| `omv_list_updates` | `read` |
| `omv_list_plugins` | `read` |
| `omv_list_shared_folders` | `read` |
| `omv_list_shares` | `read` |
| `omv_list_disks` | `read` |
| `omv_get_disk_health` | `read` |
| `omv_list_filesystems` | `read` |
| `omv_list_raid_arrays` | `read` |
| `omv_start_job` | `everyday` |
| `omv_get_job` | `read` |
| `omv_stop_job` | `everyday` |
| `omv_get_pending_changes` | `read` |
| `omv_create_shared_folder` | `everyday` |
| `omv_create_smb_share` | `everyday` |
| `omv_create_nfs_share` | `everyday` |
| `omv_create_smart_schedule` | `everyday` |
| `omv_apply_changes` | `costly` |
| `omv_revert_changes` | `everyday` |
| `omv_rpc` | `read` for a read, `everyday` for anything else (decided from the arguments by the call policy) |
| `omv_list_methods` | `read` |
| `omv_list_users` | `read` |
| `omv_list_groups` | `read` |
| `omv_list_rsync_jobs` | `read` |
| `omv_run_rsync_job` | `costly` |
| `omv_install_updates` | `costly` |
## Troubleshooting
`omv_get_status` (or `mcp-server-omv call omv_get_status`) lists configuration problems, one sentence each, and says
why the NAS could not be reached. `mcp-server-omv check` is first contact in one line; `mcp-server-omv doctor` checks
each layer (settings, ssh and sudo, version, plugins, services) and says which one failed. `doctor --dump DIR`
records scrubbed fixture files from your NAS, which you can attach to a hardware report after reading them once.
The server log (stderr, or `/var/log/mcp-server-omv/server.log` on Alpine) has ssh's own message at debug level.
| What you see | What it means | What to do |
| ------------ | ------------- | ---------- |
| "No NAS is configured" | `OMV_HOST` is unset or invalid | Set `OMV_HOST` (and `OMV_SSH_USER`, `OMV_SSH_KEY`), then restart |
| "The NAS refused the SSH login" | The account is not in the group OMV's SSH daemon admits, or the key is not accepted for it | On the NAS, `journalctl -u ssh -n 20` says which: "not allowed because none of user's groups are listed in AllowGroups" means `usermod -aG _ssh omv-mcp`. Otherwise check `OMV_SSH_USER` and `OMV_SSH_KEY`, the line in `authorized_keys` (including `from=`), and, after an OMV update, whether OMV regenerated the account's SSH settings |
| "refused the SSH connection" | Nothing is listening on `OMV_SSH_PORT` | Check the port and that SSH is enabled in OMV (Services, SSH) |
| "Could not reach the NAS over SSH" or "did not answer" | The network, or a slow call | Check `OMV_HOST`, the port, and that the NAS is up; raise `OMV_TIMEOUT` (1 to 170) for a slow call |
| "host key does not match" | The NAS's key changed since it was trusted | If the NAS was reinstalled, remove its old line from `known_hosts`; otherwise do not connect until you know why |
| "sudo on the NAS would not run omv-rpc without a password" | The sudoers entry is missing, wrong, or not matched | Re-check `/etc/sudoers.d/omv-mcp` with `visudo -cf`, or use the `openmediavault-engined` group with `OMV_SUDO=0` |
| "/usr/sbin/omv-rpc was not found" | The host is not an OpenMediaVault NAS | Check `OMV_HOST` |
| A write tool says to set `OMV_ALLOW_WRITES=1` | Writes are off, which is the default | Set it in the client's `env` (or the Alpine env file) and restart the server |
| `omv_apply_changes` says nothing is pending | Everything is already applied | Nothing to do; `omv_get_pending_changes` shows the same |
| `omv_apply_changes` returns `failed` or `running` | OMV's apply failed or is slow | Read `lines` (OMV's own output), then `omv_get_job` with the job id, and `omv_get_pending_changes` |
| A tool says the md plugin or another service is absent | The NAS lacks that optional service | Expected: `omv_get_status` lists the capabilities found |
| `/healthz` answers 503 | The last call to the NAS failed in SSH, sudo, or a timeout | Run `check` from the server's host |
## Development
```sh
pip install -e ".[dev]"
pytest -q # no NAS needed: tests never touch the network
ruff check . && ruff format --check . && mypy
python scripts/sync_shared.py --check
```
What the tests cover:
| File | Covers |
| ---- | ------ |
| `test_tools.py` | The MCP contract the model sees: tool names, titles, annotations, tiers, schemas |
| `test_config.py` | Settings sources and order, bad values, and that the table above matches the code's defaults |
| `test_cli.py` | `--version`, `call`, and the `serve --http` defaults |
| `test_stdio.py` | The console script over stdio with no NAS configured |
| `test_assumptions.py` | Every assumption appears in the README table and in HARDWARE_VALIDATION.md |
| `test_deploy.py` | The Alpine service files are OpenRC, the settings template holds placeholders only, and `release.yml` triggers only on a `v*` tag |
| `test_runner.py` | The ssh argv and remote command against a stub `ssh` (hostile names and params), each failure's message, timeout, one call at a time, and the test fixtures |
| `test_policy.py` | Every rule and deny group of the call policy, `omv_rpc`'s read and write allow-lists, and that no refused call reaches the runner |
| `test_status.py` | `omv_get_status` for OMV 7 and 8, an unreachable NAS, an unsupported major, capability detection from the plugin list and probes, the client's cache, `list_all`, and byte sizes |
| `test_storage.py` | The four storage tools for OMV 7 and 8: the disk and SMART join, masked serials, disk health and its refusal of an unlisted device, filesystems including the external drive, RAID with and without the md plugin, and that no write method is called |
| `test_doctor.py` | `check` and `doctor`, the `/healthz` check, and that `doctor --dump` scrubs addresses, keys, serial numbers, and e-mail addresses |
| `test_plugins.py` | `omv_list_plugins` for OMV 7 and 8: installed and not-installed rows, upgrade only with both versions, rows missing fields, `installed_only`, repository text kept to one short line, a non-list answer refused, and that `omv_rpc` still refuses `Plugin.install`, `remove`, and `upload` |
| `test_services.py` | `omv_list_services` and `omv_list_updates` for OMV 7 and 8: the service rows, the settings allow-lists (free text and secrets never appear), the refusals, and that nothing is refreshed or installed |
| `test_shares.py` | `omv_list_shared_folders` and `omv_list_shares` for OMV 7 and 8, absent and disabled services, NAS text kept as data, and the folder and filesystem lookups the write side reuses |
| `test_jobs.py` | Background jobs from start to succeeded, failed, stopped, or lost through scripted `Exec.getOutput` answers (never `Exec.isRunning`), the status filename pattern, `smart_test` and `refresh_updates` refusals, the limits, `run_job` for other modules, and a bounded shutdown |
| `test_redaction.py` | The redactor every result passes through: secret-looking keys at any depth and in any case, empty values kept, settings such as `passwordauthentication` left alone, shapes unchanged, and every origin's results redacted |
| `test_shares_write.py` | The three create tools: writes off and dry run send nothing, the exact params of each create (`extraoptions` empty for SMB, the subtree choice for NFS, and never anything OMV's pattern refuses), every refusal (existing name, path escape, bad mode, bad NFS client, duplicate share), `unchanged` for identical arguments, a disabled service, and the first use case end to end (folder, SMB share, pending, apply) |
| `test_changes.py` | `omv_get_pending_changes`, `omv_apply_changes` (nothing pending refuses, the job followed to its end, a failure reported with pending left as OMV says, a run that outlasts the wait, confirmation over MCP), and `omv_revert_changes` with its on-disk caveat |
| `test_rpc.py` | `omv_rpc` against the call policy: reads with writes off, writes refused before anything is sent, every deny group, sensitive read, plugin-service read, off-list write, `Exec`, and `Config` apply and revert refused with writes on, redacted results, the staged shape, hostile names, the size cap, the tier by arguments, and `omv_list_methods` labelling each method by the policy |
| `test_instructions.py` | The server instructions say the four things (status first, the NAS layer and not the hypervisor, show pending before apply, prefer curated tools), name only real tools, stay generic and short; the README tool table equals `TOOL_NAMES`, its tier table equals the tools' tiers, and it has no dash characters and no address outside the documentation ranges |
| `test_updates.py` | `omv_install_updates`: writes off and dry run send nothing, nothing upgradable and a name that is not upgradable refused, every package (`Apt.upgrade`) or the subset sent exactly (`Apt.install`), the `costly` tier, the job's origin, `reboot_required` here and in `omv_get_job`, a lost job after an `openmediavault` upgrade, no stopping it, and `omv_rpc` still refused |
| `test_catalog.py` | The catalog's lines are well formed, and every method a curated tool calls (found by scanning `src/omv_mcp/` and the fixtures) is in it for OMV 7 and 8 |
| `test_accounts.py` | `omv_list_users` and `omv_list_groups` for OMV 7 and 8: the allow-lists (SSH keys, e-mail addresses, and password fields never appear; `ssh_keys` counts the keys), the primary group and `ssh_login`, empty lists and malformed rows, and `omv_rpc` refusing every `UserMgmt` read, with writes on and off |
The shared modules and their tests (`remote.py`, `logsafe.py`, `tasks.py`, `ratelimit.py`, `registry.py`,
`lookup.py`, `tools.py`, `feedback.py`) come from
[mcp-server-shared](https://github.com/SDNick484/mcp-server-shared) and are not edited here.
## Verification status
One hardware run has happened (see the status note at the top). These are the OpenMediaVault details the code
depends on (claim, source, and what the NAS showed, in `src/omv_mcp/assumptions.py`). `hardware-verified` means
seen working on a real NAS; `hardware-contradicted` means a real NAS did something else, and its note names the
issue that changes the code; the rest are read in the OMV source only, and a note says what part of them was seen.
| Assumption | Confidence | Status |
| ---------- | ---------- | ------ |
| `O-RPC-CLI` | medium | hardware-verified |
| `O-RPC-ERROR` | medium | hardware-verified |
| `O-SUDO` | medium | hardware-verified |
| `O-INFO-FIELDS` | medium | hardware-verified |
| `O-VERSION-STRING` | medium | hardware-verified |
| `O-PLUGIN-LIST` | medium | simulator-only |
| `O-404-MISSING` | medium | hardware-verified |
| `O-SERVICES-STATUS` | medium | hardware-verified |
| `O-APT-LIST` | low | simulator-only |
| `O-SHARE-FIELDS` | medium | simulator-only |
| `O-SMB-LIST` | medium | hardware-verified |
| `O-NFS-LIST` | medium | simulator-only |
| `O-DISK-FIELDS` | low | simulator-only |
| `O-SMART-FIELDS` | low | simulator-only |
| `O-FS-FIELDS` | medium | simulator-only |
| `O-MD-PLUGIN` | medium | simulator-only |
| `O-BG-FILENAME` | medium | hardware-verified |
| `O-EXEC-OUTPUT` | medium | simulator-only |
| `O-EXEC-DELETES` | medium | hardware-verified |
| `O-EXEC-STOP` | low | simulator-only |
| `O-APT-UPDATE` | medium | simulator-only |
| `O-SMART-EXECUTE` | medium | simulator-only |
| `O-SECRET-KEYS` | low | simulator-only |
| `O-SHARE-SET` | medium | simulator-only |
| `O-SMB-SET-DEFAULTS` | medium | simulator-only |
| `O-NFS-SET` | low | simulator-only |
| `O-DIRTY-MODULES` | medium | simulator-only |
| `O-APPLY` | medium | simulator-only |
| `O-REVERT` | medium | hardware-verified |
| `O-SET-MARKS-DIRTY` | medium | simulator-only |
| `O-CATALOG` | low | simulator-only |
| `O-PLUGIN-FIELDS` | low | simulator-only |
| `O-USER-LIST` | medium | simulator-only |
| `O-USER-FIELDS` | medium | simulator-only |
| `O-GROUP-FIELDS` | medium | simulator-only |
| `O-SSH-GROUP` | medium | simulator-only |
| `O-SMART-SCHEDULE-SET` | low | simulator-only |
| `O-SMART-SCHEDULE-RUN` | low | simulator-only |
| `O-RSYNC-FIELDS` | medium | simulator-only |
| `O-RSYNC-EXECUTE` | medium | simulator-only |
| `O-APT-UPGRADE` | medium | simulator-only |
| `O-APT-UPGRADE-RESTART` | low | simulator-only |
`test_assumptions.py` fails if this table and `assumptions.py` disagree.
## Roadmap
Next: re-run on a NAS the checks that the fixes for issues #36 to #40 wait for, fix the rest of what the first
hardware run found (#41 to #44), finish the checks it could not
([HARDWARE_VALIDATION.md](https://github.com/SDNick484/mcp-server-omv/blob/main/HARDWARE_VALIDATION.md)), then release 0.1.0. After that, the `later` issues, all refused by the deny list until then:
- [#18](https://github.com/SDNick484/mcp-server-omv/issues/18) A NAS-side allow-list wrapper for `omv-rpc`, which would make the account a real limit
## License
MIT. See [LICENSE](https://github.com/SDNick484/mcp-server-omv/blob/main/LICENSE).