pi-bay
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Web server port. | 8383 |
| PI_BAY_HOST | No | Host address to listen on. Defaults to 127.0.0.1 normally, or 0.0.0.0 on a Raspberry Pi host. | |
| PI_BAY_NO_MCP | No | Disable all MCP transports, including the Raspberry Pi HTTP default. | false |
| PI_BAY_API_KEY | No | API key used for /config/read. | your-secret-key |
| PI_BAY_NO_OPEN | No | Do not automatically open the default browser on start. Browsers are never opened automatically on Raspberry Pi hosts. | false |
| PI_BAY_API_PORT | No | ctrlPi API port. | 8314 |
| PI_BAY_MCP_HTTP | No | Add Streamable HTTP MCP at /mcp to the normal web server. Enabled automatically on Raspberry Pi hosts. | |
| PI_BAY_SSH_PORT | No | SSH port checked during discovery and used for connections. | 22 |
| PI_BAY_MCP_STDIO | No | Run only the MCP stdio transport. No web server or browser is started. | false |
| PI_BAY_ALLOW_HOSTS | No | Extra host name(s) to accept, such as pi4.lan. Separate multiple names with commas. IP addresses, localhost and the machine's own name always work. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Call pi_devices_list to find available Raspberry Pis and SSH devices.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| pi_devices_listA | Scan the local network for Raspberry Pis and SSH devices, returning IP, MAC, hostname, model, ctrlPi status, and saved credential availability. |
| pi_device_infoA | Get detailed hardware model, operating system, storage, memory, uptime, and ctrlPi information for a device. |
| pi_device_authenticateA | Authenticate to a Raspberry Pi or SSH device, verify credentials, cache the connection, and optionally save the password to the system keychain. |
| pi_command_runA | Execute a non-interactive shell command on the remote device via SSH, as the signed-in user. Returns stdout, stderr, and exit_code. Use the file tools for files; a command that prompts fails or waits until timeout_ms. |
| pi_files_listA | List one directory on the remote device relative to $HOME, not recursive: path, name, isDir, isLink, size and mtime for each entry, folders first. |
| pi_file_readA | Read one file from the remote device relative to $HOME. auto returns UTF-8 text when safe and base64 for binary data. |
| pi_file_writeA | Create or overwrite one file on the remote device relative to $HOME, creating missing parent directories. content may be UTF-8 text or base64 and is limited to 16 MB. |
| pi_directory_createA | Create a directory on the remote device relative to $HOME. |
| pi_path_renameA | Rename or move one file or directory on the remote device relative to $HOME. |
| pi_path_deleteA | Permanently delete one file or recursively delete one directory on the remote device relative to $HOME. |
| pi_device_rebootA | Reboot the remote Raspberry Pi or SSH device with sudo reboot (needs passwordless sudo). Returns at once without confirming; open sessions drop until the device boots again. |
| pi_ctrlpi_installA | Install or update pi-gpio-api (the ctrlPi API agent) in ~/pi-gpio-api with its install.sh. On a first install, name and api_key are written to ~/pi-gpio-api/config.json (defaults: the device hostname and your-secret-key, the installer's own); an existing config.json is kept and they are ignored. A result with the default key carries a warning. On a Raspberry Pi with passwordless sudo the pi-gpio-api service is then created and started, or restarted; otherwise service is needs_sudo and output holds the sudo commands to run. Can take several minutes (the full package installs FastAPI). Ask the user first and pass confirmed: true. |
| pi_uiA | Open the pi-bay web UI (devices, files, terminal) in the browser, starting its web server when needed (action open, the default). When pi-bay runs on a Raspberry Pi or another remote machine it cannot open the user's browser: the result then has opened: false, and url is the address to open in a browser on the user's computer. Action stop stops a web server this tool started; the pi-bay app itself is never stopped. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 13 tools
Each tool maps to a distinct resource+action and the descriptions explicitly cross-reference (pi_command_run warns to prefer the file tools; delete vs rename share the path_ prefix but are clear). The only mild overlap is the device trio pi_devices_list / pi_device_info / pi_device_authenticate, where discovery vs. detail vs. credential setup could momentarily be confused. Overall an agent can pick the right tool reliably.
All names follow a pi_<resource>_<verb> snake_case pattern, which is predictable and readable. Minor deviations: nouns mix plural and singular (pi_devices_list, pi_files_list vs pi_file_read, pi_device_info) and pi_ui has no verb component. These are cosmetic, not confusing.
13 tools is well within the ideal range for a device-management server covering discovery, auth, shell, file operations, and service install. Each tool appears to earn its place with no redundant or trivial entries.
File lifecycle is well covered (list, read, write, create dir, rename/move, delete) and device lifecycle covers discovery, auth, info, reboot, and ctrlPi install. Minor gaps: no file search/grep, no explicit permission/chmod or copy operation, and no device poweroff/disconnect or ctrlPi service restart/stop outside of install.