Skip to content

MCP Server

System Bridge includes a Model Context Protocol (MCP) server, letting agents and other MCP clients query your system and trigger actions.

The server runs over a WebSocket at ws://{host}:9170/api/mcp. Replace {host} with the hostname or IP of the machine running System Bridge; the port can be changed with the SYSTEM_BRIDGE_PORT environment variable. The connection is authenticated with your API token, passed either as a token query parameter or an Authorization: Bearer {token} header. A missing or invalid token is rejected with 401 Unauthorized. See how to find your token.

Agents launch MCP servers as a local command and talk to them over stdio. Because System Bridge serves MCP over a WebSocket, a bridge such as websocat is needed to pipe stdio to the WebSocket.

On Arch Linux, install from the extra repository:

Terminal window
sudo pacman -S websocat

On other distributions, install with cargo or download a binary from the websocat releases:

Terminal window
cargo install websocat

With websocat installed, add System Bridge to your agent’s MCP config:

mcp.json
{
"mcpServers": {
"system-bridge": {
"command": "websocat",
"args": ["ws://localhost:9170/api/mcp?token=YOUR_TOKEN"]
}
}
}
  • Replace localhost with the host running System Bridge if the agent is on another machine.
  • Replace YOUR_TOKEN with your API token. See how to find your token.

Get current system information from one or more data modules. The tool returns each requested module’s latest data as JSON.

  • modules (required): An array of module names to fetch.

Available modules:

Module Description
battery Charge level, charging state, and time remaining.
cpu Usage, frequency, core counts, and per-core load.
disks Mounted devices, partitions, and used/free space.
displays Connected displays, resolution, and refresh rate.
gpus GPU model, load, memory, and temperature.
media Currently playing media: title, artist, and playback state.
memory Physical and virtual memory usage.
networks Network interfaces, addresses, and throughput.
processes Running processes with CPU and memory usage.
sensors Hardware sensors such as temperatures and fan speeds.
system Hostname, OS, uptime, users, and version details.

Example arguments:

{ "modules": ["cpu", "memory", "battery"] }

Send a desktop notification to the machine running System Bridge.

  • title (required): The notification title.
  • message (required): The notification body text.
  • icon (optional): An icon name to display with the notification.

Example arguments:

{ "title": "Build finished", "message": "All tests passed", "icon": "dialog-information" }

Control playback of the system’s current media session.

  • action (required): The action to perform. Must be uppercase.

Available actions:

Action Effect
PLAY Resume playback.
PAUSE Pause playback.
STOP Stop playback.
NEXT Skip to the next track.
PREVIOUS Return to the previous track.
VOLUME_UP Raise the volume.
VOLUME_DOWN Lower the volume.
MUTE Toggle mute.

Example arguments:

{ "action": "PAUSE" }
  • Confirm System Bridge is running. See Running.
  • Check the port (default 9170) and SYSTEM_BRIDGE_PORT if you changed it.
  • Verify the host in your config matches the machine running the backend.
  • The token is missing or incorrect. Run system-bridge client token on the host running the backend.
  • Pass the token as a token query parameter or Authorization: Bearer {token} header.
  • Check backend logs for the underlying error.
  • For system_bridge_get_data, use valid module names (see the table above).
  • For system_bridge_media_control, actions must be uppercase (PLAY, PAUSE, and so on).