Skip to main content
Glama

PiKVM MCP

An MCP tool that lets Claude look at and configure your PiKVMs.

  • App side: the PiKVM web API. Power (ATX), screenshots, keyboard, virtual drive (MSD), GPIO, KVM switch, logs.

  • Server side: SSH as root. Config files, services, health checks.

  • Many PiKVMs in one tool. Name one, or use all for read-only calls.

  • Asks before it changes anything.

Safety

Every call has a level.

  • Read. Runs right away.

  • Change. Needs confirm=true. Claude must ask you first.

  • Risky. Needs confirm=true and a confirm_phrase. Power off, reset, deleting images, restarting kvmd, stopping services, reboot, package changes.

Also:

  • Passwords come only from environment variables. They are never saved, shown or logged.

  • Files with passwords, keys and 2FA secrets are blocked, for reading and writing.

  • Config writes make a backup, check the file with kvmd -m, and put the old file back if the check fails. The PiKVM disk is set back to read-only afterward.

  • In multi-PiKVM mode, each PiKVM only gets its own password.

  • The PiKVM certificate is self-signed, so the tool does not check it by default. Set PIKVM_VERIFY_TLS=true to check it.

  • SSH host keys are accepted the first time. Fine for a home network.

Related MCP server: MCP Remote Access

Tools

App side:

  • pikvm_servers lists your PiKVMs.

  • pikvm_info shows version, hardware and health.

  • pikvm_status shows power, screen, keyboard and mouse, and virtual drive in one go.

  • pikvm_power controls ATX power.

  • pikvm_snapshot takes a picture of the target screen. Optional OCR. The PiKVM video stream usually only runs while someone is watching, so if it fails, open the PiKVM web page or VNC first.

  • pikvm_type types text or a shortcut on the target.

  • pikvm_msd manages the virtual drive. Select, connect, download an ISO from a URL, remove.

  • pikvm_log shows the kvmd log.

  • pikvm_endpoints lists the web API paths.

  • pikvm_call runs any web API path.

Server side:

  • pikvm_system_info runs a read-only health check.

  • pikvm_config_read reads /etc/kvmd/override.yaml and other allowed files.

  • pikvm_config_write replaces a config file. Shows a diff first.

  • pikvm_service checks, restarts or stops a service.

  • pikvm_ssh runs any command.

Install

  1. Get the files: git clone https://github.com/drmogie/pikvm-mcp (or use D:\GitHub-Projects\pikvm-mcp).

  2. Add the entry from claude_desktop_config.example.json to the Claude desktop MCP config.

  3. Fill in the passwords there. Only in that file. Never in this repo.

  4. Restart Claude.

The default PiKVM web login is admin. SSH is root. Use your own passwords.

One PiKVM

"env": {
  "PIKVM_URL": "https://192.168.1.29",
  "PIKVM_PASSWORD": "...",
  "PIKVM_SSH_PASSWORD": "..."
}

Settings

  • PIKVM_URL, PIKVM_USER (default admin), PIKVM_PASSWORD

  • PIKVM_SSH_HOST (default: the host in the URL), PIKVM_SSH_PORT, PIKVM_SSH_USER (default root)

  • PIKVM_SSH_PASSWORD, or PIKVM_SSH_KEY (path to a private key)

  • PIKVM_VERIFY_TLS, PIKVM_DOWNLOAD_DIR

  • Several PiKVMs: PIKVM_SERVERS, then PIKVM_URL_<NAME>, PIKVM_PASSWORD_<NAME>, PIKVM_SSH_PASSWORD_<NAME>. <NAME> is the name in capitals with other characters turned into _.

2FA

If 2FA is on for the PiKVM web login (the file /etc/kvmd/totp.secret exists), the web API refuses the plain password with a 403 error. Two ways to fix it:

  • Keep 2FA. Set PIKVM_TOTP_SECRET_<NAME> to the secret. The tool makes the 6 digit code itself. To get the secret, SSH in and run cat /etc/kvmd/totp.secret yourself. This tool will not show it. Paste it only into the Claude desktop config.

  • Turn 2FA off for that PiKVM (kvmd-totp del over SSH, with the disk set writable). Only do this if you are happy with it.

The PiKVM clock must be right, or the codes will not match.

Not tested yet on real hardware

Built and tested against a fake PiKVM and a fake SSH layer (python tests/test_server.py, python tests/test_ssh_write.py). Tested through a real uvx launch. Not yet tested on a real PiKVM. Please report what breaks.

Not built: uploading image files from your PC to the virtual drive, the PiKVM Switch firmware tools, and Redfish.

License

MIT

Available Tools

15 tools
pikvm_callA

Call any PiKVM web API path (see pikvm_endpoints).

method: GET or POST (DELETE too). path: starts with /api/. params: query options. Reads run right away. Changes need confirm=true after the user says yes. Power off, reset, deleting images and similar also need confirm_phrase equal to the path. Login and websocket paths are blocked.

Inputs: path (required), method (required), body, params, +4 more. Returns: result

pikvm_config_readA

Read a PiKVM config file over SSH.

Default is /etc/kvmd/override.yaml, the file where your own settings live. Allowed: text files in /etc/kvmd/, /boot/config.txt, /boot/cmdline.txt, /etc/hostname. Files with passwords, keys or 2FA secrets are blocked.

Inputs: path, server, max_chars. Returns: result

pikvm_config_writeA

Replace a PiKVM config file over SSH. Needs one PiKVM.

path: same allowed files as pikvm_config_read. content: the WHOLE new file (read it first with pikvm_config_read, change it, send it all back). The first call shows a diff and does nothing. After the user says yes, call again with confirm=true. The tool makes the disk writable, saves a backup next to the file (.bak-date), writes the file, runs "kvmd -m" to check /etc/kvmd/*.yaml files (and puts the old file back if the check fails), then makes the disk read-only again. restart: optional service to restart after a good write, usually kvmd. A restart of kvmd, kvmd-nginx or kvmd-otg also needs confirm_phrase equal to the service name.

Inputs: path (required), content (required), server, confirm, +2 more. Returns: result

pikvm_endpointsA

List the PiKVM web API paths this tool knows, with their options.

query: a word to look for. group: system, hid, atx, msd, gpio, streamer, switch, export. Use pikvm_call to run one.

Inputs: group, query. Returns: result

pikvm_infoC

Show PiKVM details: version, hardware, health (throttling, temperature), name.

fields: any of auth, extras, fan, hw, meta, system (comma separated).

Inputs: fields, server, max_chars. Returns: result

pikvm_logC

Show the PiKVM (kvmd) log. Newest lines at the end.

lines: how many lines from the end to keep.

Inputs: lines, server, max_chars. Returns: result

pikvm_msdA

The virtual USB drive (mass storage) that shows an ISO or disk image to the target.

action: status (also lists images), select (pick an image), connect, disconnect, download (fetch an image from url into the PiKVM), remove (delete an image). select: image name, cdrom=true for ISO, read_write=true for a writable disk. download: url, plus image for the file name. remove needs confirm_phrase equal to the path.

Inputs: url, cdrom, image, action, +4 more. Returns: result

pikvm_powerA

Power control of the target machine through ATX.

action: status, on, off (soft, like a short press), off_hard (cut power, long press), reset_hard, click_power, click_power_long, click_reset. Everything except status and on can shut the machine down or restart it. Those need confirm=true and confirm_phrase equal to the path shown in the reply.

Inputs: action, server, confirm, confirm_phrase. Returns: result

pikvm_serversA

List the PiKVMs this tool can reach.

Shows names, addresses and whether SSH is set up. Never shows passwords.

Inputs: no named parameters. Returns: result

pikvm_serviceA

Check or control a service on the PiKVM over SSH.

action: status, start, restart, reload, enable, disable, stop. unit: for example kvmd, kvmd-nginx, kvmd-vnc, kvmd-ipmi, kvmd-janus, kvmd-webterm. Status runs right away. Stop and disable, and any restart of kvmd, kvmd-nginx, kvmd-otg, ssh or networking, need confirm_phrase equal to the unit name.

Inputs: unit (required), action (required), server, confirm, +1 more. Returns: result

pikvm_snapshotA

Take a picture of what the target machine is showing on its screen.

ocr: also read the text on the screen. max_width: shrink the picture (pixels). save: also keep the full size picture as a file on this computer. Needs one PiKVM (not "all").

Inputs: ocr, save, server, max_width.

pikvm_sshA

Run one command on the PiKVM over SSH (as root).

Safe read-only commands run right away (cat of /etc/kvmd files, systemctl status, journalctl, df, uptime, ip a, vcgencmd measure_temp, kvmd -m, pacman -Q, ls, and pipes into head, tail, grep, wc). Anything else needs confirm=true after the user says yes. Risky ones (rm, reboot, pacman, pikvm-update, passwd, stopping services and similar) also need confirm_phrase equal to the first word of the command. Files with passwords or keys are blocked. The PiKVM disk is read-only. To change a config file use pikvm_config_write instead.

Inputs: command (required), server, confirm, timeout, +2 more. Returns: result

pikvm_statusB

One look at the target machine: power (ATX), screen (streamer), keyboard and mouse (HID), and virtual drive (MSD).

Inputs: server, max_chars. Returns: result

pikvm_system_infoB

A read-only health check over SSH: OS, kvmd version, uptime, disk, memory, temperature, throttling, USB gadget, network addresses, and the state of the main PiKVM services.

Inputs: server, max_chars. Returns: result

pikvm_typeB

Type on the target machine like a USB keyboard.

text: text to type. shortcut: keys together, like ControlLeft,AltLeft,Delete. Give one of them. This changes what the machine does, so it needs confirm=true.

Inputs: slow, text, keymap, server, +2 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 15 tools

    Disambiguation4/5

    Most tools target distinct resources (power, HID, MSD, config, services, logs). The main soft spots are pikvm_info vs pikvm_system_info vs pikvm_status, and pikvm_ssh vs pikvm_system_info, but descriptions clarify the API-vs-SSH vs target-state split, and pikvm_call is explicitly framed as an escape hatch rather than a competing tool.

    Naming Consistency4/5

    Every tool shares the pikvm_ prefix with consistent snake_case, which makes the set very legible. The only deviation is mixing noun-oriented names (pikvm_info, pikvm_status, pikvm_servers) with verb-oriented ones (pikvm_call, pikvm_type, pikvm_power), but the pattern remains predictable.

    Tool Count4/5

    15 tools is a reasonable, well-scoped surface for a device-control server spanning power, HID, storage, config, and services. A few tools (pikvm_info/pikvm_status, pikvm_system_info) feel slightly redundant, but each still covers a distinct slice.

    Completeness4/5

    Core lifecycle coverage is strong: read/write config, service control, power actions, HID input, MSD management, snapshots, logs, and a generic API passthrough that fills remaining gaps. Minor omissions like local image upload to MSD are workable via pikvm_call.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Enables Claude to monitor and manage homelab infrastructure including Docker containers, OPNsense firewall, and TrueNAS storage with configurable capability levels from read-only monitoring to full management control.
      13
      41 npm
      7
      -
    • A
      license
      B
      quality
      C
      maintenance
      Enables SSH and UART/serial port access for Claude Code to directly control remote devices like Raspberry Pi, embedded systems, and IoT devices. Supports command execution, file transfers via SFTP, and serial communication.
      24
      2
      AGPL 3.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude to manage a Proxmox VE host through natural language, including guest lifecycle, snapshots, host status monitoring, and shell execution via a companion bridge.
      22 npm
      1
      Apache 2.0