About linux-mcp-server
A read-only MCP server for Linux administration, diagnostics, and troubleshooting on RHEL-based systems. It supports SSH checks across multiple hosts and configurable log access.
Key features
- 01Read-only system diagnostics
- 02Remote command execution over SSH
- 03Manage multiple hosts per session
- 04Inspect services, processes, logs, network, and storage
- 05Configure accessible log files
Use cases
- 01Troubleshoot RHEL system issues
- 02Check multiple remote hosts over SSH
- 03Inspect system state without write access
MCP support
The MCP server exposes Linux diagnostic tools to MCP clients, including checks for system information, services, processes, logs, networking, and storage.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
uvx linux-mcp-serverLINUX_MCP_USERDefault username for SSH connectionsLINUX_MCP_SSH_KEY_PATHSecretPath to SSH private keyLINUX_MCP_KEY_PASSPHRASESecretPassphrase for encrypted SSH keyLINUX_MCP_SEARCH_FOR_SSH_KEYSecretAuto-discover keys in `~/.ssh`LINUX_MCP_COMMAND_TIMEOUTSSH command timeout in seconds (default: 30)LINUX_MCP_VERIFY_HOST_KEYSSecretVerify remote host identity via known_hostsLINUX_MCP_KNOWN_HOSTS_PATHCustom path to known_hosts fileLINUX_MCP_ALLOWED_LOG_PATHSComma-separated allowlist of log filesLINUX_MCP_LOG_DIRServer log directoryLINUX_MCP_LOG_LEVELLog verbosity (DEBUG, INFO, WARNING)LINUX_MCP_LOG_RETENTION_DAYSDays to keep log filesLocal servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
23Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| host | string | Yes | System to run on: 'localhost' for the system the MCP server runs on, or a remote host to connect to via SSH |
| unit | string | No | Filter by systemd unit name or pattern |
| since | string | No | Filter entries since specified time (absolute or relative) |
| priority | string | No | Filter by syslog priority level (0-7), name, or range |
| transport | any | No | Filter by journal transport (e.g., 'audit' for audit logs, 'kernel' for kernel messages, 'syslog' for syslog messages) |
| last_lines | any | No | Number of last log lines to retrieve after applying filters (journalctl -n N). Default: 100. Mutually exclusive with first_lines. |
| first_lines | any | No | Number of first log lines to retrieve after applying filters (journalctl -n +N). Mutually exclusive with last_lines. |
Details
From the project READMELinux MCP Server
A Model Context Protocol (MCP) server for read-only Linux system administration, diagnostics, and troubleshooting on RHEL-based systems.
Features
- Read-Only Operations: All tools are strictly read-only for safe diagnostics
- Remote SSH Execution: Execute commands on remote systems via SSH with key-based authentication
- Multi-Host Management: Connect to different remote hosts in the same session
- Comprehensive Diagnostics: System info, services, processes, logs, network, and storage
- Configurable Log Access: Control which log files can be accessed via environment variables
- RHEL/systemd Focused: Optimized for Red Hat Enterprise Linux systems
Installation and Usage
For detailed instructions on setting up and using the Linux MCP Server, please refer to our documentation.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.