homelab-monitor-mcp
Provides tools for monitoring and managing Docker containers, including listing running containers, viewing CPU/memory stats, fetching recent logs, and restarting containers.
Provides read-only SQL query capabilities against a Laravel project's database, using credentials from the project's .env file.
Enables read-only SQL queries against MariaDB databases via the db_query tool, with credentials sourced from Laravel project .env files.
Enables read-only SQL queries against MySQL databases via the db_query tool, with credentials sourced from Laravel project .env files.
Enables read-only SQL queries against PostgreSQL databases via the db_query tool, with credentials sourced from Laravel project .env files.
Enables read-only SQL queries against SQLite databases via the db_query tool, with credentials sourced from Laravel project .env files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@homelab-monitor-mcp gimana kondisi server sil-baru dan container apa yang jalan?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
homelab-monitor-mcp
MCP server for homelab monitoring — let any MCP-compatible AI assistant (Claude Desktop, ChatGPT, VS Code, ...) check your servers' health in plain language.
Ask things like:
"gimana kondisi serverku?"
"container apa aja yang jalan di sil-baru?"
"berapa load dan sisa disk?"
Install (30 seconds)
No clone, no manual setup. In your MCP client config:
{
"mcpServers": {
"homelab-monitor": {
"command": "npx",
"args": ["-y", "homelab-monitor-mcp"]
}
}
}For Claude Desktop, add it to claude_desktop_config.json and restart.
npx downloads and runs the server automatically.
Related MCP server: SSH MCP Server
Monitoring remote servers via SSH
Define your servers once with the HOMELAB_HOSTS env var
(name=user@host pairs, comma-separated). SSH key auth is used
(no passwords); the key must already work for these hosts.
{
"mcpServers": {
"homelab-monitor": {
"command": "npx",
"args": ["-y", "homelab-monitor-mcp"],
"env": {
"HOMELAB_HOSTS": "server1=alice@192.0.2.10,server2=bob@192.0.2.11"
}
}
}
}Every tool takes an optional host parameter: omit it to check the
local machine, or pass a configured name (sil-baru) to check that
server over SSH. Use the list_hosts tool to see what's configured.
Tools
Tool | Description | Write? |
| Uptime, load average, memory and disk usage | read-only |
| Running containers (like | read-only |
| Container CPU/memory usage, one-shot | read-only |
| Recent logs of a container ( | read-only |
| systemd service state | read-only |
| Listening TCP ports and processes | read-only |
| All mounts + largest directories | read-only |
| Show configured remote servers | read-only |
| Restart a container (client asks approval first) | write |
| List directory contents | read-only |
| Read a text file (paginated) | read-only |
| Replace text in a file (client asks approval first) | write |
| Run dev commands: tests, build, typecheck (allowlisted binaries, client asks approval) | write |
| Read-only SQL (SELECT/WITH) against a Laravel project's DB, credentials from its | read-only |
File tools (list_dir, read_file, edit_file) are restricted to
directories in HOMELAB_PROJECT_DIRS (colon-separated), e.g.
HOMELAB_PROJECT_DIRS=/home/user/projects:/srv/apps.
Paths outside it, relative paths, and .. are rejected.
Write tools (docker_restart, edit_file) always ask for your approval
in the MCP client before running.
run_command executes binaries from an allowlist
(HOMELAB_ALLOW_COMMANDS, default: npm, npx, node, python3, pytest, tsc,
go, cargo, make, git) inside HOMELAB_PROJECT_DIRS only. Shell
metacharacters (;, |, $, backticks, redirections) are rejected, so
only a single simple command can run. Also asks approval.
db_query takes a Laravel project dir + a SELECT query, reads DB
credentials from the project's .env (never returned), and enforces
read-only: only SELECT/WITH/EXPLAIN, single statement, no
INTO OUTFILE. Supports PostgreSQL, MySQL/MariaDB, SQLite. If the DB
hostname only resolves inside Docker, map it with
`HOMELAB_DB_OVERRIDES="pgsql=127.0.0.1:5433".
Requirements
Node.js 18+
Docker (only for the
docker_*tools)SSH key access (only for remote hosts)
Remote access (ChatGPT / web clients)
For clients that connect over the network (e.g. ChatGPT), run in HTTP mode:
MCP_HTTP_PORT=3000 \
MCP_AUTH_TOKEN="$(openssl rand -hex 32)" \
HOMELAB_HOSTS="server1=alice@192.0.2.10" \
HOMELAB_PROJECT_DIRS="/home/user/projects" \
node dist/index.jsServes MCP at
http://<host>:3000/mcp(Streamable HTTP, stateless)MCP_AUTH_TOKENis required — requests needAuthorization: Bearer <token>Expose it with Cloudflare Tunnel / Tailscale Funnel, then add the public URL as a remote MCP server in your client.
Local development
npm install
npm run build
npm startPublishing
npm login
npm publish --access publicLicense
MIT
Available Tools
14 toolsdb_queryA
Run a READ-ONLY SQL query (SELECT/WITH) against a Laravel project's database. Credentials come from the project's .env — never returned. Rows capped by limit.
Inputs: sql (required), project_dir (required), limit, timeout_secs.
disk_detailA
Disk usage: all mounts plus largest top-level directories (read-only)
Inputs: host.
docker_logsA
Read recent logs of a Docker container (read-only)
Inputs: container (required), host, tail.
docker_psB
List Docker containers with status (read-only, like 'docker ps')
Inputs: host.
docker_restartA
Restart a Docker container. WRITE action — your MCP client will ask for approval before running it.
Inputs: container (required), host.
docker_statsA
One-shot Docker container CPU/memory usage (read-only, like 'docker stats --no-stream')
Inputs: host.
edit_fileB
Replace text in a file. WRITE action — your MCP client will ask for approval before running it. old_text must occur exactly once.
Inputs: path (required), new_text (required), old_text (required), host.
list_dirB
List directory contents (read-only)
Inputs: path (required), host.
list_hostsA
List remote servers configured via HOMELAB_HOSTS env var
Inputs: no named parameters.
port_listeningA
List listening TCP ports and owning processes (read-only, like 'ss -tlnp')
Inputs: host.
read_fileC
Read a text file with line pagination (read-only)
Inputs: path (required), host, limit, offset.
run_commandA
Run a dev command (tests, build, typecheck, git) inside a project directory. EXECUTION action — your MCP client will ask for approval before running it. Single command only; the binary must be in HOMELAB_ALLOW_COMMANDS.
Inputs: command (required), workdir (required), host, timeout_secs.
service_statusB
Check systemd service status (read-only)
Inputs: service (required), host.
system_infoB
Get system uptime, load average, memory and disk usage (read-only)
Inputs: host.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Tools target mostly distinct resources (system, services, ports, disk, Docker, files, commands, DB), so an agent can usually pick correctly. The only real overlap is system_info and disk_detail, which both report disk usage, though disk_detail is clearly deeper.
Names mix noun_noun (system_info, docker_ps, db_query), verb_noun (list_dir, read_file, edit_file), and noun_verb (docker_restart). The docker_ prefix groups Docker tools, but the overall set lacks a predictable verb pattern even though all names are snake_case.
14 tools is within a reasonable range for a homelab monitor/manager and covers several domains without excessive duplication. It is slightly heavy, but nearly every tool appears to earn its place.
Monitoring coverage is strong, but lifecycle gaps exist: services only have status (no start/stop/restart), Docker only has restart (no stop/start), file operations lack create/delete, and list_hosts has no companion tools to act on remote hosts. These gaps will force agents to rely on run_command for common management tasks, which is explicitly restricted.
Maintenance
Related MCP Connectors
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Read-only Linux server and Docker monitoring for AI assistants: CPU, memory, disk, network.
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI assistants full SSH/SFTP remote operations — session management, command execution, interactive shells, file transfers, port forwarding, and system diagnostics.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables MCP-compatible AI clients to remotely manage a Linux server via SSH, supporting file operations, Docker control, Git pulls, and arbitrary command execution.ISC
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to safely explore and diagnose remote servers by providing a read-only sandbox with controlled access to files, logs, Docker, and databases. It exposes MCP tools that allow natural-language investigation and direct command execution without write permissions.4-
- AlicenseAqualityCmaintenanceEnables AI agents to monitor server health and capacity, diagnose outages, inspect Docker and deployment status, and perform safe, bounded recovery actions via MCP without granting unrestricted shell or SSH access.101Apache 2.0