mcpField
L
linux-mcp-server

linux-mcp-server

Local
github.com/rhel-lightspeedCloud & Infra315Updated today

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

  1. 01Read-only system diagnostics
  2. 02Remote command execution over SSH
  3. 03Manage multiple hosts per session
  4. 04Inspect services, processes, logs, network, and storage
  5. 05Configure accessible log files

Use cases

  1. 01Troubleshoot RHEL system issues
  2. 02Check multiple remote hosts over SSH
  3. 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.

mcp.json · Universal config
{
"mcpServers": {
"rhel-lightspeed-linux": {
"command": "uvx",
"args": [
"linux-mcp-server"
],
"env": {
"LINUX_MCP_USER": "<LINUX_MCP_USER>",
"LINUX_MCP_SSH_KEY_PATH": "<LINUX_MCP_SSH_KEY_PATH>",
"LINUX_MCP_KEY_PASSPHRASE": "<LINUX_MCP_KEY_PASSPHRASE>",
"LINUX_MCP_SEARCH_FOR_SSH_KEY": "<LINUX_MCP_SEARCH_FOR_SSH_KEY>",
"LINUX_MCP_COMMAND_TIMEOUT": "<LINUX_MCP_COMMAND_TIMEOUT>",
"LINUX_MCP_VERIFY_HOST_KEYS": "<LINUX_MCP_VERIFY_HOST_KEYS>",
"LINUX_MCP_KNOWN_HOSTS_PATH": "<LINUX_MCP_KNOWN_HOSTS_PATH>",
"LINUX_MCP_ALLOWED_LOG_PATHS": "<LINUX_MCP_ALLOWED_LOG_PATHS>",
"LINUX_MCP_LOG_DIR": "<LINUX_MCP_LOG_DIR>",
"LINUX_MCP_LOG_LEVEL": "<LINUX_MCP_LOG_LEVEL>",
"LINUX_MCP_LOG_RETENTION_DAYS": "<LINUX_MCP_LOG_RETENTION_DAYS>"
}
}
}
}
Run commanduvx linux-mcp-server
Environment variables to set
LINUX_MCP_USERDefault username for SSH connections
LINUX_MCP_SSH_KEY_PATHSecretPath to SSH private key
LINUX_MCP_KEY_PASSPHRASESecretPassphrase for encrypted SSH key
LINUX_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_hosts
LINUX_MCP_KNOWN_HOSTS_PATHCustom path to known_hosts file
LINUX_MCP_ALLOWED_LOG_PATHSComma-separated allowlist of log files
LINUX_MCP_LOG_DIRServer log directory
LINUX_MCP_LOG_LEVELLog verbosity (DEBUG, INFO, WARNING)
LINUX_MCP_LOG_RETENTION_DAYSDays to keep log files

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypilinux-mcp-server1.4.0

Tools

23

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
hoststringYesSystem to run on: 'localhost' for the system the MCP server runs on, or a remote host to connect to via SSH
unitstringNoFilter by systemd unit name or pattern
sincestringNoFilter entries since specified time (absolute or relative)
prioritystringNoFilter by syslog priority level (0-7), name, or range
transportanyNoFilter by journal transport (e.g., 'audit' for audit logs, 'kernel' for kernel messages, 'syslog' for syslog messages)
last_linesanyNoNumber of last log lines to retrieve after applying filters (journalctl -n N). Default: 100. Mutually exclusive with first_lines.
first_linesanyNoNumber of first log lines to retrieve after applying filters (journalctl -n +N). Mutually exclusive with last_lines.

Details

From the project README

CI Coverage PyPI Docs

Linux 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

Markdown supported

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.