# linux-mcp-server [Health: Active]

**Category:** 🖥️ OS Automation  
**Repository:** https://github.com/rhel-lightspeed/linux-mcp-server  
**GitHub Stars:** 323  
**Views:** 9  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/linux-mcp-server-2

## Description
MCP server for read-only Linux system administration, diagnostics, and troubleshooting

## Tools
Capabilities this server exposes over MCP:

- **get_journal_logs** — Get systemd journal logs.
- **read_log_file** — Read a specific log file.
- **get_network_interfaces** — Get detailed information about network interfaces including address and traffic statistics.
- **get_network_connections** — Get detailed information about active network connections.
- **get_listening_ports** — Get details on listening port, protocols, and services.
- **pcp_guide** — Returns the PCP metrics guide: a catalog of the metric names recorded on a typical Linux system, and how to read the values the other PCP tools return. Read it before investigating performance with PCP, and take metric names from it rather than from memory.
- **pcp_list_metrics** — Browses the PCP metric namespace. Lists the metrics under 'prefix' with their descriptions, collapsing any large sub-namespace to one line giving its name and how many metrics it holds; call again with that name as the prefix to see inside it. Only metrics this system's pmlogger records are listed, so everything listed can be passed to pcp_query_metrics. The pcp_guide tool already names the commonly needed metrics, so reach for this when you need a subsystem the guide does not cover. Use only if get_system_information() indicates PCP is available.
- **pcp_query_metrics** — Retrieves historical metric data from PCP archives as JSON samples. When start_time, end_time, or interval is omitted, reasonable defaults are chosen, targeting one hour or about 20 samples. Call pcp_guide first for the metric catalog and how to read the values; do not guess metric names. Use only if get_system_information() indicates PCP is available.
- **pcp_performance_summary** — Produces a condensed snapshot of CPU, memory, disk, network, and process information using pcp xsos. Can summarize the live system or a particular time in the past. Use only if get_system_information() indicates PCP is available.
- **list_processes** — List running processes
- **get_process_info** — Get information about a specific process.
- **list_services** — List all systemd services.
- **get_service_status** — Get detailed status of a specific systemd service.
- **get_service_logs** — Get recent logs for a specific systemd service.
- **list_block_devices** — List block devices on the system
- **list_directories** — List directories under a specified path with various sorting options.
- **list_files** — List files under a specified path with various sorting options.
- **read_file** — Read the contents of a text file up to a safe size limit.
- **get_system_information** — Get basic system information, including operating system, distribution, kernel version, uptime, last boot time, PCP installation and service status, and historical PCP time ranges.
- **get_cpu_information** — Get CPU information.
- **get_memory_information** — Get detailed memory including physical and swap.
- **get_disk_usage** — Get detailed disk space information including size, mount points, and utilization.
- **get_hardware_information** — Get hardware information such as CPU details, PCI devices, USB devices, and hardware information from DMI.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "linux-mcp-server": {
    "command": "uvx",
    "args": ["linux-mcp-server"]
  }
}
```

## Documentation

## What linux-mcp-server does

linux-mcp-server gives MCP clients a read-only interface to Linux administration and troubleshooting data, with particular attention to RHEL-based systems and systemd. Its tools cover several layers of a host:

- Operating system, kernel, uptime, boot history, and PCP availability
- CPU, memory, disks, block devices, hardware, PCI, USB, and DMI data
- Running processes and detailed process information
- Systemd services, service status, and recent service logs
- Journal entries and selected log files
- Network interfaces, active connections, and listening ports
- Directory listings, file listings, and bounded reads from text files

The server is intended for inspection rather than remediation. Its tools do not modify services, files, processes, network configuration, or other system state.

## How it works

MCP clients call focused tools and receive structured diagnostic results. A deployment can inspect the local system or use SSH to execute read-only checks on remote hosts. Multiple remote hosts can be used during one session, which suits investigations that compare systems or trace an issue across machines.

PCP support adds access to archived performance data. Start with `pcp_guide` to learn the available metric names and how returned values should be interpreted. `pcp_list_metrics` can browse the recorded metric namespace, while `pcp_query_metrics` returns historical samples as JSON. `pcp_performance_summary` produces a compact view of CPU, memory, disk, network, and process conditions for the live system or a selected past time. These tools should be used only when the system information reports that PCP is available.

## Setup and configuration

Install and configure the server according to the project documentation and connect it to an MCP client. Remote inspection uses SSH with key-based authentication. The server supports connecting to different remote hosts within the same session.

Log access can be restricted through environment-variable configuration, allowing an operator to control which log files the server may read. The project publishes setup documentation for installation, client configuration, SSH use, and log-access settings.

## Tools and capabilities

The tool set includes `get_system_information`, `get_cpu_information`, `get_memory_information`, `get_disk_usage`, and `get_hardware_information` for host-level inventory. Process and service investigation uses `list_processes`, `get_process_info`, `list_services`, `get_service_status`, and `get_service_logs`.

For logs and files, `get_journal_logs` reads systemd journal data, `read_log_file` reads a selected log, and `list_directories`, `list_files`, and `read_file` inspect filesystem content within the tools' safety limits. Network inspection is divided among interface details, active connections, and listening ports.

The PCP tools are designed as a sequence: consult the guide, browse the namespace when necessary, then query recorded metrics or request a summary. Metric queries choose reasonable time and sample defaults when their time range or interval is omitted.

## Limitations and notes

The server is read-only, so it is suitable for evidence gathering and diagnosis but not for applying fixes. PCP results depend on PCP being installed, active, and recording metrics on the target system. The PCP namespace reflects what that system's `pmlogger` records, rather than every metric that might exist in a PCP installation.

The project is optimized for RHEL-based Linux and systemd environments. Remote use requires SSH access and key-based authentication. File and log inspection is governed by configured access controls and safe size limits.

_Full upstream README: https://allmcps.com/mcp/linux-mcp-server-2/readme_

