Linux MCP Agent Server
Provides read-only observability of the local Linux host, exposing tools for system metrics (CPU, memory, load average, uptime), allowlisted disk usage, bounded process snapshots, and allowlisted journald log reading, plus a high-level system summary resource and a health-check prompt.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Linux MCP Agent Server
A read-only Linux observability MCP server for external Agentic AI clients. Built with Python 3.15.2 (the latest stable Python release on 2026-11-02) and the official MCP Python SDK 2.3.0. CI checks both Python 3.14.10 and 3.15.2 because some upstream package classifiers have not yet caught up with the newest interpreter. The primary acceptance environment is Ubuntu 24.04 LTS.
Scope
The server exposes:
Primitive | Name | Purpose |
Tool |
| CPU, memory, load average and uptime |
Tool |
| Allowlisted filesystem capacity |
Tool |
| Bounded PID/name/CPU/RAM snapshot |
Tool |
| Allowlisted journald unit aliases only |
Tool |
| Per-interface traffic counters and link state |
Tool |
| Read-only status of allowlisted systemd services |
Tool |
| Single local TCP listener check on loopback |
Tool |
| CPU, memory and allowlisted-disk threshold alerts |
Resource |
| High-level JSON system and network summary |
Prompt |
| Safe, read-only health-check instructions |
This repository does not host an LLM or implement the Agent runtime. The external Agent/MCP Client owns model selection, inference, tool selection and provider fallback. No arbitrary shell, destructive system operation, process command line or environment values are exposed.
Related MCP server: homelab-mcp
Architecture
Python MCP service runs natively on the Linux host under systemd and binds to
127.0.0.1:3000.Caddy 2.11.7 terminates TLS and exposes only the MCP endpoint and required protected-resource metadata route to the LAN.
Keycloak 26.8.1 issues OAuth access tokens; the MCP service validates them using RFC 7662 introspection and exact issuer/resource/audience/scope checks.
PostgreSQL 18.6 stores Keycloak data only. It is not an application database.
Docker Compose 5.6.1 runs Caddy, Keycloak and PostgreSQL; the MCP service is not containerized.
Version baseline (checked 2026-11-02)
Component | Version |
Python | 3.15.2 (default); CI also checks 3.14.10 |
Hatchling build backend | 1.33.0 |
Official MCP Python SDK ( | 2.3.0 |
psutil | 7.2.2 |
Pydantic | 2.14.2 |
Starlette | 1.10.0 |
Uvicorn | 0.54.0 |
uv | 0.13.6 |
pytest / pytest-asyncio | 9.2.0 / 1.4.1 |
Ruff / Pyright | 0.17.3 / 1.1.414 |
Caddy | 2.11.7 |
Keycloak | 26.8.1 |
PostgreSQL | 18.6 |
Docker Compose CLI | 5.6.1 |
Exact direct Python dependencies are pinned in pyproject.toml. Generate uv.lock with uv lock on a network-connected development machine, review and commit it before production deployment; CI currently resolves transitive dependencies from the exact direct pins.
Local development
Install uv 0.13.6 and Python 3.15.2:
curl --proto '=https' --tlsv1.2 -LsSf https://astral.sh/uv/0.13.6/install.sh | sh
uv python install 3.15.2
uv lock
uv sync --all-groups
cp .env.example .env
set -a; source .env; set +a
uv run python -m linux_mcp_agentThe local .env.example uses AUTH_MODE=disabled and loopback only. Never expose this development mode to the LAN.
Quality checks
uv run ruff check .
uv run pyright
uv run pytestLAN deployment
See:
docs/09_ubuntu2404_deployment.mddocs/08_authorization_tls_design.mddeploy/keycloak/README.mddeploy/systemd/README.md
The LAN profile requires AUTH_MODE=keycloak, trusted Caddy internal CA, a configured Keycloak realm/client, and firewall rules limiting TCP 443. The MCP app and Keycloak bind only to loopback; PostgreSQL is internal to Docker. Compose deliberately gates Caddy behind the lan profile: start and validate PostgreSQL/Keycloak and the authenticated MCP service first, then explicitly run docker compose --profile lan up -d caddy.
Security and known acceptance gate
Keycloak 26.8.1 labels Resource Indicators experimental for the newest MCP protocol revision. The server fails closed unless the token has the exact configured MCP audience/resource. Do not disable audience validation to work around an integration problem. Keep LAN exposure closed until a real integration test confirms resource -> aud, introspection claims, required scopes and cross-device TLS trust.
The systemd-journal supplementary group enables journal access but is broader than the MCP alias list; this residual privilege is documented and must be reviewed during deployment.
Live demo
To start the local Keycloak/PostgreSQL/Caddy stack and ensure the MCP service is running, use:
bash scripts/start-demo.shIn a second terminal, run the real Keycloak-authenticated MCP acceptance client:
uv run python scripts/demo_live.pyIt discovers and calls all eight tools, reads linux://system/summary, and retrieves the health_check prompt. See docs/10_live_demo.md for one-time credential setup and TLS trust notes. The client keeps the access token in memory and never prints or saves credentials.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only Linux server and Docker monitoring for AI assistants: CPU, memory, disk, network.
Read-only server insight: why a Linux server or K8s cluster is slow, failing or changed.
Public AI web-readiness scanner and machine-facing observability discovery service.
Read-only production context for AI agents: Docker/K8s health, deploys, logs, traffic, code graph
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA read-only system observability and OS algorithm lab MCP server for openEuler/Linux, encapsulating memory, filesystem, process, and CPU info into typed tools for reliable LLM client use.-
- AlicenseNot gradedqualityDmaintenanceLets MCP clients (Claude Code, Claude Desktop) inspect a Linux home server's health over the network: uptime, load, memory, disk, Docker containers, systemd services, journal errors, and listening ports. Read-only, bearer-token secured.MIT
- FlicenseNot gradedqualityDmaintenanceA read-only MCP server for observing registered local and SSH hosts, providing system, service, container, Git, and GPU status/log inspection through a closed-world registry without arbitrary shell access.-
- AlicenseAqualityDmaintenanceAn MCP server that gives AI assistants safe, read-only visibility into a host: CPU, memory, disk, processes, network, ports, and logs.8MIT