Skip to content
LabTether

MCP Integration

LabTether exposes a Model Context Protocol (MCP) server at /mcp. AI agents use it to discover and run homelab tools.

Setup

The server uses Streamable HTTP at https://<hub>:8443/mcp, with an API key as a Bearer token. The console shows both snippets below with your hub's address filled in.

Claude Code

claude mcp add --transport http labtether https://hub.local:8443/mcp \
  --header "Authorization: Bearer <LABTETHER_API_KEY>"

Other MCP clients

For a client that reads an mcpServers config and supports remote servers:

{
  "mcpServers": {
    "labtether": {
      "url": "https://hub.local:8443/mcp",
      "transport": "streamable-http",
      "headers": {
        "Authorization": "Bearer <LABTETHER_API_KEY>"
      }
    }
  }
}

Available Tools

Tool Description Required Scope
whoami Show API key info and accessible assets None
assets_list List managed assets with status assets:read
assets_get Get asset details assets:read
exec Run a command on an asset assets:exec
exec_multi Run a command on multiple assets assets:exec
services_list List system services services:read
services_restart Restart a service services:write
files_list List directory contents files:read
files_read Read a file files:read
system_processes List running processes processes:read
system_network Network interfaces network:read
system_disks Disk usage disks:read
system_packages Installed packages packages:read
docker_hosts List Docker hosts docker:read
docker_containers List containers docker:read
docker_container_restart Restart a container docker:write
alerts_list Active alerts alerts:read
alerts_acknowledge Acknowledge alert alerts:write
groups_list List groups groups:read
metrics_overview Health summary across all assets metrics:read
asset_reboot Reboot an asset assets:power
asset_shutdown Shutdown an asset assets:power
asset_wake Wake via WoL assets:power
schedules_list List scheduled tasks schedules:read
webhooks_list List webhook subscriptions webhooks:read
saved_actions_list List saved actions actions:read
credentials_list List credential profiles without secrets credentials:read
topology_edges List dependency edges for one asset topology:read
updates_list_plans List update plans updates:read
connectors_health Check registered connector health connectors:read
docker_container_logs Read bounded container logs docker:read
docker_container_stats Read container resource statistics docker:read

Every tool call is authorized against the API key's scopes and asset allowlist. Clients may still discover a tool they cannot call; an unauthorized call fails with an insufficient-scope or asset-access error.

MCP Resources

URI Description
labtether://assets Current asset inventory with status
labtether://alerts/active Active alert instances
labtether://groups Asset group structure

Example Conversation

With an MCP client connected to LabTether:

You: Check the CPU usage on all my web servers and restart nginx if any are above 80%

Claude: I'll check the web servers. [calls assets_list, then exec on each with "top -bn1"] server2 is at 92% CPU. [calls services_restart on server2 with nginx] Done: nginx restarted on server2.