Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
A MCP server to manage linux, websites and database
Jump to setup instructionsNo tool list is on record. This does not mean the server has no tools. Tools were not run.
No setup evidence yet No matching config or report on record. This does not mean the server is incompatible.
Same catalog task: Manage databases & data.
MCP server for interacting with MySQL databases with write operations support
Same catalog task: Manage databases & data.
MCP server for DBX — query databases from Claude Code, Cursor, and other AI agents
Same catalog task: Manage databases & data.
Enhanced PostgreSQL MCP server with read and write capabilities. Based on @modelcontextprotocol/server-postgres by Anthropic.
Fetched from the repository for this visit.
MCP Linux Tools is an MCP (Model Context Protocol) server that exposes a secure, whitelisted set of operations on a Linux server. It allows AI assistants (such as VS Code, Claude or Cursor) to perform controlled system administration tasks like reading logs, checking service status, managing cron jobs, running WP-CLI commands, and executing sandboxed Python code—all through a uniform API with strict security constraints.
The server runs as a systemd service and communicates over HTTP. All operations are restricted by configurable whitelists (directories, services, WordPress sites). Tools return a uniform response contract {success, data, error, meta}.
# Clone the MCP server repository to /opt/mcp
sudo mkdir -p /opt
cd /opt
sudo git clone https://github.com/gerard-kanters/mcp-linux-tools.git mcp
cd /opt/mcp
# Create virtual environment
sudo python3.13 -m venv /opt/mcp/venv
# Install dependencies
sudo /opt/mcp/venv/bin/pip install --upgrade pip
sudo /opt/mcp/venv/bin/pip install -r requirements.txt --break-system-packages
Edit config.json and adjust the settings for your server:
server_type (development or production)server_ip to your server's IP addressserver_name to identify this serverSee the Configuration section below for detailed information about all configuration options.
sudo mkdir -p /opt/mcp/sandbox
sudo chown root:root /opt/mcp/sandbox
sudo chmod 755 /opt/mcp/sandbox
Create a service file: /etc/systemd/system/mcp-linux-tools.service
[Unit]
Description=MCP Linux Tools Server
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/mcp
ExecStart=/opt/mcp/venv/bin/python /opt/mcp/server.py
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
# Security settings
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/log /opt/mcp/sandbox
[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable mcp-linux-tools.service
sudo systemctl start mcp-linux-tools.service
sudo systemctl status mcp-linux-tools.service
Add to your Cursor MCP configuration (usually ~/.cursor/mcp.json or in Cursor settings):
{
"mcpServers": {
"linux-tools": {
"command": "curl",
"args": [
"-X", "POST",
"http://192.168.1.22:8765/mcp",
"-H", "Content-Type: application/json",
"-d", "@-"
]
}
}
}
Or use direct HTTP transport in Cursor MCP settings with:
http://192.168.1.22:8765/mcpCheck if the server is running:
# Check service status
sudo systemctl status mcp-linux-tools.service
# Check logs
sudo journalctl -u mcp-linux-tools.service -f
# Test HTTP endpoint
curl -X POST http://localhost:8765/mcp -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
To update the MCP server:
cd /opt/mcp
sudo git pull origin main # or master, depending on your branch
sudo /opt/mcp/venv/bin/pip install -r requirements.txt --break-system-packages
sudo systemctl restart mcp-linux-tools.service
Important: After an update, check if config.json is still correct. New configuration options may have been added.
The server follows a modular MCP architecture:
server.py – Entrypoint: config loading, MCP setup, tool registration, run/retry/signal handlingconfig.py – Config loading and validation (fail-fast on missing fields)register_tools.py – Central tool registrationcore/ – Core modules:
errors.py – Error codes (DENIED_PATH, INVALID_INPUT, COMMAND_BLOCKED, etc.)models.py – Pydantic models for uniform response contractresponse.py – ok(), err(), err_denied_* helperssecurity.py – Allowlist and path validationprocess.py – Subprocess runnertools/ – Tool modules per domain:
discovery.py, filesystem.py, logs.py, systemd.pypython_exec.py, wordpress.py, cron_tools.py, ops.pyAll tools return a uniform response contract: {success, data, error, meta}.
All configuration is done via config.json in the root of the MCP server directory (/opt/mcp/config.json).
server_type: "development" or "production"server_ip: IP address of the serverserver_name: Name for the MCP serverserver.host: Bind address (default: "0.0.0.0")server.port: HTTP port (default: 8765)logging.log_file: Path to log filelimits.max_bytes: Maximum file size for reading (default: 524288 = 512KB)limits.max_items: Maximum items in directory listings (default: 500)python.bin: Path to Python interpreter (must be in venv)directories.sandbox_cwd: Working directory for Python sandboxdirectories.allowed_read: Directories from which files can be readdirectories.allowed_log: Directories where log files can be readdirectories.allowed_write: Directories where write operations are allowedservices.whitelist: List of service names that can be managedwordpress.allowed_sites: Absolute paths to WordPress rootswordpress.bin_candidates: Possible locations for WP-CLI binarywordpress.log_candidates: Possible locations for WordPress debug logsImportant: After changes to config.json, the service must be restarted:
sudo systemctl restart mcp-linux-tools.service
LINUX SERVER Tools with limited write operations:
Directory whitelists are configured in config.json under directories.
Default: /var/log, /etc, /tmp, /opt/, /root/scripts, /var/www
Default: /var/log, /tmp, /var/www
Default: /var/www, /opt/
Note: All directory paths are configurable via config.json. Changes require a service restart.
The service whitelist is configured in config.json under services.whitelist. Only services in this list can be checked or restarted.
Default whitelist (as configured in config.json):
apache2 - Apache webserverphp8.4-fpm - PHP FastCGI Process Managerpostfix - Mail serveropendkim - DomainKeys email authenticationsshd - SSH daemondocker - Container runtimememcached - Memory cache daemonpostgresql - PostgreSQL database serverodoo - Odoo ERP systemNote: Service names may vary by distribution. Use get_service_whitelist() to query the active whitelist.
get_server_info() - Server identification (type, IP, name)get_service_whitelist() - List of manageable servicesget_wp_allowed_sites() - List of allowed WordPress siteslist_dir(path, pattern, include_files, include_dirs, max_items) - Directory listing (Read-Only)read_file(path, max_bytes) - Read file (max 512KB, Read-Only)head(path, n) - First N lines (Read-Only)tail(path, n) - Last N lines (for logs, Read-Only)log_search(keywords, path, n) - Search literal keywords in recent log lines (Read-Only)create_directory(path, owner, group, mode, parents) - Create directory ⚠️ (only /var/www and /opt/)chmod_file(path, mode) - Change file permissions ⚠️ (only /var/www and /opt/)chown_path(path, owner, group) - Change owner ⚠️ (only /var/www and /opt/)service_status(name) - Check status (Read-Only)reload_service(name) - Reload service via systemctl reload (preferred action, low impact)restart_service(name, force_restart) - Service modification: default is reload, use force_restart=True for full restart ⚠️ (Live impact!)python_run(code) - Sandboxed Python (no network, 8s timeout)cron_list() - View crontab (Read-Only)cron_add(job_id, schedule, command) - Add job ⚠️ (Live impact!)cron_remove(job_id) - Remove job ⚠️ (Live impact!)cron_enable(job_id, enabled) - Enable/disable job ⚠️ (Live impact!)cron_next_runs(schedule, n) - Validate schedule (Read-Only)wp_cli(site_path, args, as_www_data) - WP-CLI runner for allowed siteswp_cache_flush(site_path, as_www_data) - WordPress cache flushwp_plugin_list(site_path, as_www_data) - List all plugins (JSON)wp_user_list(site_path, as_www_data) - List all users (JSON)log_pick_path() - Find WordPress debug log pathmysql_query(query, database) - Execute MySQL query (Read-Only, dangerous queries blocked)ping_host(host, count) - Test network connectivity (Read-Only)git_command(path, command) - Execute Git commands (only safe commands, no push/force)execute_shell_command(command, user) - Execute shell command ⚠️ (Live impact!){"tool": "get_server_info", "args": {}}
{"tool": "get_service_whitelist", "args": {}}
{"tool": "service_status", "args": {
"name": "nginx"
}}
{"tool": "restart_service", "args": {
"name": "mysql"
}}
{"tool": "tail", "args": {
"path": "/var/log/nginx/error.log",
"n": 100
}}
{"tool": "python_run", "args": {
"code": "import sys; print(sys.version)"
}}
{"tool": "wp_cache_flush", "args": {
"site_path": "/var/www/netcare.nl"
}}
{"tool": "wp_plugin_list", "args": {
"site_path": "/var/www/netcare.nl"
}}
{"tool": "mysql_query", "args": {
"query": "SHOW DATABASES;",
"database": ""
}}
{"tool": "ping_host", "args": {
"host": "8.8.8.8",
"count": 4
}}
{"tool": "git_command", "args": {
"path": "/var/www/example",
"command": "status"
}}
{"tool": "cron_add", "args": {
"job_id": "backup_daily",
"schedule": "0 3 * * *",
"command": "/usr/bin/backup.sh"
}}
Read-Only Default: Most tools are read-only. Write operations are limited to:
reload_service() / restart_service() - Service reload/restartcron_add/remove/enable() - Cron modificationscreate_directory() - Create directory (only /var/www and /opt/)chmod_file() - Change file permissions (only /var/www and /opt/)chown_path() - Change owner (only /var/www and /opt/)execute_shell_command() - Shell commands (use with caution!)Whitelisting: Everything is whitelisted. Tools return "Denied" if you work outside the whitelist.
Service Names: Different distributions use different service names. For example:
systemd-resolved, bind9, or namedisc-dhcp-server or dhcpdmysql, mariadb, or mysqldsmbd or sambaSecurity First:
rm -rf possibleError Handling – Uniform response contract {success, data, error, meta}:
success=true: data contains result, error is nullsuccess=false: error contains {code, message, hint}, data is nullReturn Types:
get_server_info() to verify which server you're working onget_service_whitelist() before managing servicescron_next_runs() to validate scheduleslist_dir() to explore log directories before reading logsconfig.jsonAll tools have been tested and work correctly: ✅ Service status and restart functionality ✅ Log file reading ✅ Python 3.13 execution (sandboxed) ✅ Cron schedule validation ✅ File operations (read-only) ✅ Directory listing
Last Updated: 2026-03-03
Server: Linux (generic)
Environment: Production/Development
Configuration: Via config.json (no hardcoded values)
Architecture: Modular (server.py entrypoint, core/, tools/)
Loading reviews...
GitHub checked 887h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.