MCP Linux Tools logo

MCP Linux Tools

by gerard-kanters

Administer allowlisted Linux files, services, cron jobs, WordPress sites, databases, Git repositories, and logs over HTTP.

Install MCP Linux Tools

Run the project’s own setup commands, in order.

Setup steps from the project

gerard-kanters/mcp-linux-tools installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    sudo mkdir -p /opt
    
  2. 2. Install
    cd /opt
    
  3. 3. Install
    sudo git clone https://github.com/gerard-kanters/mcp-linux-tools.git mcp
    
  4. 4. Install
    cd /opt/mcp
    
  5. 5. Install
    sudo python3.13 -m venv /opt/mcp/venv
    
  6. 6. Install
    sudo /opt/mcp/venv/bin/pip install --upgrade pip
    

Overview

The gerard-kanters/mcp-linux-tools MCP server exposes controlled Linux administration tools through an HTTP MCP endpoint. It can read allowlisted files and logs, inspect or restart allowlisted systemd services, manage MCP-owned cron entries, run read-only MySQL queries, operate WP-CLI, execute sandboxed Python, test connectivity, and run restricted Git commands. Configuration in config.json controls accessible directories, services, and WordPress sites, while responses use a consistent success/data/error/meta structure. Reach for it when an agent needs constrained operational access to a Linux host rather than unrestricted shell execution.

Use cases

  • Inspect allowlisted application files and tail server logs
  • Check or restart approved systemd services
  • Manage MCP-owned cron jobs on a Linux host
  • Run WP-CLI maintenance tasks on approved WordPress sites
  • Execute read-only MySQL diagnostics and restricted Git commands

Key features

  • Allowlisted file, directory, and log access
  • Whitelisted systemd service checks and restarts
  • MCP-managed cron operations
  • Sandboxed Python execution without network access
  • Read-only MySQL and restricted Git tools
  • HTTP transport with uniform tool responses

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

16/16 checks healthy over the last 111d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
Last commit4mo agoMost recent push to the default branch.
Directory activity5 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Linux Tools works

What gerard-kanters/mcp-linux-tools MCP server does

gerard-kanters/mcp-linux-tools is an MCP server for controlled administration of a Linux machine. It exposes operational actions to an MCP client through HTTP while applying allowlists and command restrictions. The available areas include filesystem inspection, log access, systemd service checks and restarts, cron management, WordPress operations, read-only MySQL queries, connectivity checks, safe Git commands, and sandboxed Python execution.

The server is intended for hosts running systemd. Its configuration identifies the host, sets the HTTP listener, defines file and log boundaries, limits read sizes and directory listing counts, and specifies manageable services and WordPress roots. Each tool returns a common object containing success, data, error, and meta fields, which gives clients a predictable way to handle results.

How it works

The gerard-kanters/mcp-linux-tools MCP server starts from server.py, loads and validates config.json, registers the tool modules, and serves MCP requests over HTTP. The documented endpoint uses port 8765 by default and can be bound to a configured address and port. It is normally installed as a systemd unit that runs the Python application and restarts it after failure.

Security decisions are made before operations run. File paths are checked against separate read, log, and write allowlists. Service actions are limited to names in the configured service whitelist. WordPress commands are restricted to configured site roots, and cron changes are confined to the section managed by the MCP server. Python runs in a sandbox with network access disabled and an eight-second timeout.

Setup and configuration

Installation requires Python 3.13 or newer, Linux with systemd, and root access for the documented service and crontab setup. The repository can be placed under /opt/mcp, where a virtual environment is created and requirements.txt is installed. A sandbox directory is also created before the systemd unit is enabled and started.

Edit /opt/mcp/config.json before starting the service. Required identification settings include server_type, server_ip, and server_name. Other sections configure the HTTP listener, logging, file-size and item limits, the Python interpreter and sandbox working directory, directory allowlists, service names, and WordPress executable and log locations. Restart the systemd unit after changing configuration.

Tools and capabilities

The gerard-kanters/mcp-linux-tools MCP server groups its tools into these supported operations:

  • Discover server details, the active service whitelist, and allowed WordPress sites.
  • Read files, list directories, and inspect the beginning or end of log files in approved locations.
  • Check, reload, or restart approved systemd services. The security notes exclude arbitrary stop, start, and enable operations.
  • List, add, remove, or toggle cron jobs within the MCP-managed crontab area.
  • Run WP-CLI against approved WordPress installations, including cache flushing, plugin and user listing, and WordPress log tailing.
  • Submit read-only MySQL queries, with dangerous query patterns blocked.
  • Execute Python in the configured sandbox without network access and with an eight-second limit.
  • Ping hosts for connectivity checks and run restricted Git commands without push or force operations.

Limitations and notes

Access is not a general-purpose shell. Arbitrary directories are denied, and the effective paths and services depend on config.json rather than on the client request alone. The documented default read and log locations are examples of configurable allowlists, so deployments should verify the active configuration before relying on them.

The service runs as root in the supplied systemd example, but the tool policy still blocks sudo or root operations requested through the tools. File reads have a configurable maximum size, directory listings have an item limit, and Python cannot use the network. Configuration changes take effect after the service is restarted. The server communicates over HTTP, so deployment teams should account for how that endpoint is exposed to MCP clients.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Linux Tools

gerard-kanters/mcp-linux-tools is an MCP server that connects AI clients to a controlled Linux host over HTTP. Its main tools read allowlisted files and logs, manage approved systemd services and cron jobs, run WP-CLI, execute sandboxed Python, perform read-only MySQL queries, test connectivity, and run restricted Git commands.

Install it on a Linux system with systemd using Python 3.13 or newer and root access. Clone the repository, create the virtual environment, install requirements, configure config.json, create the sandbox directory, then install and start the supplied systemd service.

Configure it in config.json at the server root. Set server identification values, HTTP listener settings if needed, directory allowlists, service names, WordPress paths, Python sandbox settings, and operational limits. Restart the systemd service after changing the file.

Yes. Cursor is documented as a client for this server. Configure its MCP settings with the HTTP endpoint, or use the documented curl-based command configuration pointing to the server's /mcp URL.

No. The documented tools use allowlists and restrictions rather than exposing unrestricted shell access. Supported execution includes sandboxed Python, selected Git commands, WP-CLI operations on approved sites, read-only MySQL queries, and constrained system administration tasks.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Linux Tools AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/gerard-kanters-mcp-linux-tools?style=directory)](https://allmcps.com/mcp/gerard-kanters-mcp-linux-tools)
HTML Embed
<a href="https://allmcps.com/mcp/gerard-kanters-mcp-linux-tools"><img src="https://allmcps.com/api/badge/gerard-kanters-mcp-linux-tools?style=directory" alt="MCP Linux Tools on AllMCPs" /></a>