Purpose
Webmin MCP Server is an MCP (Model Context Protocol) server that provides Claude with tools to operate Linux systems through the Webmin management interface. It uses Webmin's XML-RPC API to enable centralized management of remote Linux servers, allowing Claude to perform system administration tasks in natural language.
Main Capabilities
- Multi-server support: Manage multiple Webmin servers via user-friendly aliases.
- System monitoring: System information, memory, disk, network, and process status.
- Service management: Start, stop, restart, enable, and disable services.
- User and group management: Create, modify, and delete system users and groups.
- Scheduled tasks: View, create, edit, and delete cron jobs.
- Package management: Package information and available updates.
- File operations: Read, write, copy, rename, and delete remote files.
- Storage: SMART disk health monitoring and LVM volume management.
- Security: Fail2ban jail status and banned IP management.
- Database: MySQL databases, users, and server status.
- Webmin ACL: Manage Webmin user accounts and module permissions.
- Disk quotas: Monitor and set disk quota limits for users and groups.
- Audit and backup: Webmin operation logs, SSH configuration, and configuration backup.
- Security framework: Tiered security system with a safe mode to prevent dangerous operations.
Usage
Installation (choose one)
Install from source:
git clone https://github.com/gjenkins20/webmin-mcp-server.git
cd webmin-mcp-server
pip install -e .
Use Docker:
docker pull gjenkins20/webmin-mcp-server
Configuration
Create webmin-servers.json:
{
"default_server": "my-server",
"servers": {
"my-server": {
"host": "192.168.1.100",
"port": 10000,
"username": "admin",
"password": "your-password",
"use_https": true,
"verify_ssl": false,
"safe_mode": true
}
}
}
Add to Claude Desktop (claude_desktop_config.json)
From source:
{
"mcpServers": {
"webmin": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "/path/to/webmin-mcp-server",
"env": {
"WEBMIN_CONFIG_FILE": "/path/to/webmin-servers.json"
}
}
}
}
Use Docker:
{
"mcpServers": {
"webmin": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-v", "/path/to/webmin-servers.json:/app/webmin-servers.json:ro",
"gjenkins20/webmin-mcp-server"
]
}
}
}
Prerequisites
- A running Webmin instance (usually listening on port 10000).
- Webmin credentials with appropriate permissions.
Webmin Server Setup
The MCP server uses Webmin's XML-RPC API, so ensure the Webmin server is configured:
- Service account provisioning: Webmin 2.650+ (recommended) create a dedicated RPC/API-only account in Webmin -> Webmin Users; this account type is designed specifically for this kind of automation, completely disables browser/module access, and is not affected by the two-factor restrictions below. For older Webmin versions: in Webmin -> Webmin Users -> (your user), enable "Can accept RPC calls".
- Two-factor authentication considerations: Webmin 2.640+ rejects RPC Basic-Auth requests from accounts with 2FA enabled, and RPC calls fail with a generic 401/403. If 2FA is enabled on a Webmin user, use a dedicated RPC/API-only account for this MCP server instead of an account registered with 2FA.
- Install XML::Parser: The Perl XML::Parser module must be installed:
# Debian/Ubuntu
sudo apt install libxml-parser-perl
# RHEL/CentOS
sudo yum install perl-XML-Parser
- Module access: Grant the user permission to access the required modules (System Status, Bootup and Shutdown, Users and Groups, Scheduled Cron Jobs, Network Configuration).
- RPC timeout (optional): For tools that read and write large files, Webmin 2.620+ has a configuration option to increase the default RPC timeout (Webmin Configuration -> Advanced Options). If large file operations time out, increase this value.
Multi-server configuration (recommended)
Create webmin-servers.json file to manage multiple Webmin servers. See webmin-servers.example.jsonfor a complete example.
Configuration sources (in order of precedence):
WEBMIN_CONFIG_FILEenvironment variable - path to the JSON configuration fileWEBMIN_SERVERS_JSONenvironment variable - inline JSON string./webmin-servers.json- local file in the current directory~/.config/webmin-mcp/servers.json- user configuration directory- Legacy
WEBMIN_*Environment variables — single server (creates the "default" alias)
Single-server configuration (legacy)
For a single server, set environment variables, or create a .env file (see .env.example).
Using multiple servers
In a multi-server configuration, all tools accept an optional server parameter. Use list_webmin_servers to view all configured servers and their aliases.
Available tools
All tools accept an optional server parameter to specify the target Webmin server. For detailed parameters and response formats, see the full API reference.
Security framework
The server includes a tiered security system to prevent accidental damage. Safe mode is enabled by default. When enabled:
- Dangerous operations are blocked (user creation/deletion, password changes, cron deletion)
- Critical services (
ssh、webmin、systemd-*、dbus) cannot be stopped - File writes/deletions are restricted to
/tmpand/var/tmp - Critical system users and paths are protected
Configurable per server in webmin-servers.json , or set globally via environment variables:export WEBMIN_SAFE_MODE=false.
Use cases
Suitable for scenarios involving automated management of Linux servers through Claude, including batch system monitoring, service operations, user and permission management, database and backup maintenance, security auditing, and more. Suitable for operations personnel who have a Webmin environment and want to integrate an AI assistant through MCP.
Limitations
- Requires a running Webmin instance and credentials with appropriate permissions.
- The Perl XML::Parser module must be installed.
- Webmin accounts with 2FA enabled cannot be used for RPC Basic-Auth; a dedicated RPC/API-only account is required.
- Large file operations may be subject to RPC timeouts.
- Safe mode blocks dangerous operations and stopping critical services by default.