# mcp-linux-tools

> mcp-linux-tools is an open-source MCP server for developer tools. MCP server giving AI assistants whitelisted admin access to a Linux server. It is available on Linux, API and Self-hosted.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** Linux, API, Self-hosted
- **Website:** https://netcare.nl/en/programming-with-an-ai-agent/
- **Repository:** https://github.com/gerard-kanters/mcp-linux-tools
- **GitHub stars:** 2
- **License:** GPL-2.0
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

Runs as a systemd service on a Linux host and exposes a set of administration operations to MCP-compatible AI clients such as VS Code, Claude or Cursor. Reads of logs and files, service status checks, cron management, WP-CLI commands and sandboxed Python execution are all available through a single HTTP endpoint.

Every operation is checked against configurable allowlists for directories, services and WordPress sites in a config.json file. Responses follow one uniform structure with success, data, error and metadata fields, so a client can handle results consistently. Write actions are limited to a short list such as service reloads and restarts, cron edits and a few permission changes inside /var/www and /opt.

The server suits sysadmins and developers who run websites or small servers and want an assistant to diagnose problems from logs and service state. It requires root access and a Python 3.13 environment, and it is distributed under the GPL-2.0 licence.

## Features

- **Whitelisted file access:** Reads, lists and tails files only within directories named in the configuration.
- **Service status and restart:** Checks services and reloads or restarts only those on an allowlist.
- **Sandboxed Python execution:** Runs Python code without network access and with an 8-second timeout.
- **Cron job management:** Lists, adds, removes and toggles cron jobs inside an MCP-managed section of the crontab.
- **WordPress operations:** Runs WP-CLI commands, flushes caches and lists plugins and users for allowed sites.
- **Read-only MySQL queries:** Executes read-only database queries and blocks dangerous statements.
- **Uniform response format:** Returns every tool result in the same success, data, error and metadata structure.

## Good for

- Diagnosing a failing web server by tailing its error logs from an AI assistant
- Checking and restarting whitelisted services on a production Linux host
- Flushing WordPress caches or listing plugins across allowed sites
- Validating and managing scheduled cron jobs without editing the system crontab by hand
- Running quick Python scripts in an isolated sandbox

## Tools

From the tool list in its README, going by the names, 1 of 24 tools deletes data and 4 change data; 9 names don't say. From the server's own tool labels and tool names; not verified by us.

- `get_server_info` (name suggests: reads): Server identification (type, IP, name)
- `get_service_whitelist` (name suggests: reads): List of manageable services
- `list_dir` (name suggests: reads): Directory listing
- `read_file` (name suggests: reads): Read file up to 512KB
- `head`: First N lines
- `tail`: Last N lines
- `log_search` (name suggests: reads): Search literal keywords in recent log lines
- `service_status` (name suggests: reads): Check service status
- `reload_service`: Reload service via systemctl reload
- `restart_service`: Reload or full restart a whitelisted service
- `python_run` (name suggests: changes): Sandboxed Python execution
- `cron_list` (name suggests: reads): View crontab
- `cron_add` (name suggests: changes): Add cron job
- `cron_remove` (name suggests: deletes): Remove cron job
- `cron_enable` (name suggests: changes): Enable or disable cron job
- `cron_next_runs`: Validate cron schedule
- `wp_cli`: WP-CLI runner for allowed sites
- `wp_cache_flush`: WordPress cache flush
- `wp_plugin_list` (name suggests: reads): List WordPress plugins
- `wp_user_list` (name suggests: reads): List WordPress users
- `mysql_query` (name suggests: reads): Read-only MySQL query
- `ping_host`: Network connectivity test
- `git_command`: Safe Git commands
- `execute_shell_command` (name suggests: changes): Execute shell command

## FAQ

### What does the server need to run?

Python 3.13 or higher, root access for systemctl and crontab, and a Linux system with systemd.

### Which AI clients can connect to mcp-linux-tools?

The listing names VS Code, Claude and Cursor as clients that can connect over HTTP.

### Can the AI stop or start services?

No. Only reloading and restarting whitelisted services is permitted; stopping, starting and enabling are not.

### What licence does mcp-linux-tools use?

The repository is licensed under GPL-2.0.

### Is mcp-linux-tools free?

Yes. mcp-linux-tools is open source, so you can use and self-host it for free.

### What are the best alternatives to mcp-linux-tools?

The closest alternatives to mcp-linux-tools are mcp-rs, Logmcp, cli-mcp-server, cmdshellmcp and MCP Console Automation.

## Where this comes from

- Description: written from the project's README and the project's website.

## Alternatives

- [mcp-rs](https://ai-powered.com/mcp/mcp-rs): mcp-rs is an open-source MCP server for content publishing.
- [Logmcp](https://ai-powered.com/mcp/logmcp): Logmcp is an open-source MCP server for developer tools.
- [cli-mcp-server](https://ai-powered.com/mcp/cli-mcp-server): cli-mcp-server is an open-source MCP server for developer tools.
- [cmdshellmcp](https://ai-powered.com/mcp/cmdshellmcp): cmdshellmcp is an open-source MCP server for developer tools.
- [MCP Console Automation](https://ai-powered.com/mcp/mcp-console-automation): MCP Console Automation is an open-source MCP server for browser automation.
- [MCP Devtools](https://ai-powered.com/mcp/mcp-devtools): MCP Devtools is an open-source MCP server for developer tools.
- [Cygnus Ssh MCP](https://ai-powered.com/mcp/cygnus-ssh-mcp): Cygnus Ssh MCP is an open-source MCP server for developer tools.
- [mcp-server-kubernetes](https://ai-powered.com/mcp/mcp-server-kubernetes): mcp-server-kubernetes is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mcp-linux-tools
