Linux MCP Server

An MCP server for Linux diagnostics: an AI client reads services, logs and network on local and remote hosts, read-only

  • 315 ★ on the repository
  • Last commit
  • Apache-2.0
MCP serverOfficial

Extended access

Why this level

  • Uses your SSH key and connects to remote servers. The key passphrase sits in an environment variable
  • Reads logs and files on systems that may contain secrets and personal data. Settings limit the size and paths
  • The experimental run_script toolset lets the model run scripts on the target system
All reasons and checks

rhel-lightspeed/linux-mcp-server

Install

Manual install

uv tool install linux-mcp-server

The recommended way; uv picks Python itself. Check with linux-mcp-server --version. If the command is not found, run uv tool update-shell.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Uses your SSH key and connects to remote servers. The key passphrase sits in an environment variable
  • Reads logs and files on systems that may contain secrets and personal data. Settings limit the size and paths
  • The experimental run_script toolset lets the model run scripts on the target system

This is third-party code. Review the repository files before installing.

What it does

The server gives an AI client a set of fixed read-only tools. They cover services and processes, logs, network and storage, plus general system information. The server targets RHEL-based systems with systemd. It reaches remote machines over SSH with a key, and one session can address different hosts. Log access is set by an allowlist of paths in LINUX_MCP_ALLOWED_LOG_PATHS, and LINUX_MCP_MAX_FILE_READ_BYTES caps the size of files it reads. Host mode decides where the server runs tools at all: local only, remote only or anywhere. The experimental run_script toolset lets the model run its own scripts on the target system. It is off by default.

Who it is for. Sysadmins and SREs who want to troubleshoot Linux servers through an AI client.

Good fit when

  • A service on RHEL will not start and you need systemd state and the latest log entries
  • You want an overview of several servers in one conversation: load, processes, disks, network
  • You want to analyze an application log but allow reading only specific files
  • A team runs a shared MCP server over HTTP with TLS and needs to separate access between people
  • You need to gather system facts before a person makes the fixes

Not a fit when

  • You want the agent to change configuration and restart services itself: the standard toolset only reads
  • The target system is not Linux: local execution is supported only on Linux, while on macOS and Windows only remote hosts work
  • You have no SSH access to the target machines and no keys

Example request

Connect to host web-01 over SSH and show which services are in the failed state and what the last failed service wrote to the log

MCP

Transport
stdio, http
Authentication
not required

Environment variables

LINUX_MCP_USER
Default user name for SSH connections
LINUX_MCP_SSH_KEY_PATH
Path to the SSH private key
LINUX_MCP_KEY_PASSPHRASE secret
Passphrase for an encrypted SSH key
LINUX_MCP_ALLOWED_LOG_PATHS
Comma-separated allowlist of log files that may be read

Limitations

You need a control system where the server and AI client run, and a target system: the same machine or a remote host over SSH. Local execution is supported only on Linux and is off in a container. SSH needs a user name in LINUX_MCP_USER and a key, with the key passphrase passed in LINUX_MCP_KEY_PASSPHRASE. Host key verification through known_hosts is on by default. SSH authentication through Kerberos needs the extra gssapi package. The run_script toolset is experimental: it needs a separate gatekeeper model from a provider such as OpenAI, Anthropic or Gemini, and its sandbox is still rudimentary.

How to disable. Remove the linux-mcp-server entry from your client's MCP configuration. A uv install is removed with uv tool uninstall linux-mcp-server, and the container image is removed with podman or docker.

FAQ

How do I install Linux MCP Server for Claude Code?

Install uv, run uv tool install linux-mcp-server and add an mcpServers entry to ~/.claude.json with the path to the linux-mcp-server program and the LINUX_MCP_USER variable. Instead of uv you can run the ready container with podman or docker.

Can the server change anything on the machine?

The standard fixed toolset only reads. Changes become possible only after enabling the experimental run_script toolset, and then the gatekeeper model check, human approval and a sandbox apply.

How do I connect to remote servers?

Over SSH with a key. Set the user name in LINUX_MCP_USER and the key path in LINUX_MCP_SSH_KEY_PATH, or enable key auto-discovery in ~/.ssh. The host parameter of a tool call picks the machine.

How do I limit log reading?

The allowed files go into LINUX_MCP_ALLOWED_LOG_PATHS as a comma-separated list, and LINUX_MCP_MAX_FILE_READ_BYTES caps the size of a file read.

Can I deploy the server for a whole team?

Yes. The HTTP transport is enabled through LINUX_MCP_TRANSPORT, and TLS, authentication and authorization are covered in the shared server guide, which also includes Keycloak setup.

Discussion

No questions or reviews yet.

Self-hosted MCP server for running commands on remote servers over SSH, with tokens and roles

MCP serverBroad access2Repository stars

An SSH MCP server: the agent runs commands, reads and writes files over SFTP, transfers files and starts long jobs while credentials stay with you

MCP serverBroad access990Repository stars

A Node.js manager for MCP servers: it starts local servers, connects remote ones and gives a client one address, with a REST API for control

MCP serverBroad access524Repository stars

SSH MCP

ssh-mcp

A security-first SSH server: command classification, policy authorization and several sign-in methods. It runs commands on remote servers

MCP serverBroad access840Repository stars

A self-hosted gateway that merges several MCP servers into one endpoint with auth and tool selection

MCP serverBroad access2.7KRepository stars

An MCP server for MikroTik routers: the agent reads and changes RouterOS configuration over SSH on a chat request

MCP serverBroad access309Repository stars

README in short

Detailed install and configuration instructions are collected in the project documentation. A separate guide covers a shared team server with TLS and Keycloak sign-in.

README badge

Report a problem

Foxx AILinux MCP Server
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.