webmin-mcp-server
The Webmin MCP Server enables Claude to manage and monitor Linux systems through Webmin's administration interface, supporting multiple servers with a tiered safety framework.
Multi-Server Management: List configured Webmin servers, test connectivity, and retrieve version information.
System Monitoring: Get comprehensive system info (OS, kernel, CPU, memory, disk), memory usage, system time/timezone, runlevels, and running processes with CPU/memory stats.
Service Management: List, query, start, stop, restart, enable, and disable system services.
User & Group Administration: List users and groups; create, modify, and delete users; change passwords.
Scheduled Tasks (Cron): List, create, edit, and delete cron jobs.
Network: Retrieve network interface details, routing table, and default gateway.
Package Management: Get package info, list available updates, and count installed packages.
File Operations: Read, write, delete, copy, rename files, and create directories on remote systems.
Storage Management: Monitor disk usage, list mounted filesystems and physical disks, check SMART health, and manage LVM volume groups and logical volumes.
SSH: Access SSH server configuration and security settings.
Audit & Backup: View Webmin action/audit logs (filterable by user or module) and list configuration backups.
Security (Fail2ban): List jails, check their status, and view currently banned IPs.
Database (MySQL): List databases and users, and get MySQL server status/statistics.
Webmin ACL: List, view, create, modify, and delete Webmin user accounts; list available modules.
Disk Quotas: List quota-enabled filesystems, view user/group quotas, and set user quota limits.
Provides tools for listing MySQL databases, users, and server status.
Manages Linux systems via Webmin's administration interface, providing tools for system monitoring, service management, user/group administration, scheduled tasks, package management, file operations, storage, security, database management, and more.
Webmin MCP Server
An MCP (Model Context Protocol) server that provides Claude with tools to manage Linux systems via Webmin's administration interface.
Features
Multi-Server Support -- Manage multiple Webmin servers with user-friendly aliases
System Monitoring -- System info, memory, disk, network, and process status
Service Management -- Start, stop, restart, enable, and disable services
User & Group Administration -- Create, modify, and delete system users and groups
Scheduled Tasks -- View, create, edit, and delete cron jobs
Package Management -- Package info 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 & Backup -- Webmin action logs, SSH config, and configuration backups
Safety Framework -- Tiered safety system with safe mode to prevent dangerous operations
Related MCP server: Hetzner Cloud MCP Server — Cloud API + SSH management (60 tools)
Quick Start
Install (choose one):
From source:
git clone https://github.com/gjenkins20/webmin-mcp-server.git cd webmin-mcp-server pip install -e .With Docker:
docker pull gjenkins20/webmin-mcp-serverConfigure -- Create a
webmin-servers.json(see Configuration):{ "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" } } } }With Docker:
{ "mcpServers": { "webmin": { "command": "docker", "args": [ "run", "--rm", "-i", "-v", "/path/to/webmin-servers.json:/app/webmin-servers.json:ro", "gjenkins20/webmin-mcp-server" ] } } }
Requirements
Python 3.11+
A running Webmin instance (typically on port 10000)
Webmin credentials with appropriate permissions
Webmin Server Setup
The MCP server uses Webmin's XML-RPC API. Ensure your Webmin server is configured:
Provision the service account:
Webmin 2.650+ (recommended): Create a dedicated RPC/API-only account in Webmin -> Webmin Users. This account type exists specifically for automation like this MCP server -- it blocks browser/module access entirely and is unaffected by the two-factor caveat below.
Older Webmin versions: In Webmin -> Webmin Users -> (your user) -> enable "Can accept RPC calls".
Two-factor authentication caveat: Webmin 2.640+ rejects RPC Basic-Auth requests for accounts that have 2FA enabled -- the RPC call fails with a generic 401/403. If you enable 2FA on your Webmin users, use a dedicated RPC/API-only account for this MCP server rather than a 2FA-enrolled one.
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-ParserModule Access: Grant the user access to required modules (System Status, Bootup and Shutdown, Users and Groups, Scheduled Cron Jobs, Network Configuration)
RPC timeout (optional): For tools that read/write large files, Webmin 2.620+ has a config option to raise the default RPC timeout (Webmin Configuration -> Advanced Options). Increase it if you see timeouts on large file operations.
Configuration
Multi-Server Configuration (Recommended)
Create a webmin-servers.json file to manage multiple Webmin servers. See webmin-servers.example.json for a complete example.
Configuration sources (priority order):
WEBMIN_CONFIG_FILEenv var -- path to JSON config fileWEBMIN_SERVERS_JSONenv var -- inline JSON string./webmin-servers.json-- local file in current directory~/.config/webmin-mcp/servers.json-- user config directoryLegacy
WEBMIN_*env vars -- single server (creates "default" alias)
Single Server Configuration (Legacy)
For a single server, set environment variables:
export WEBMIN_HOST="your-webmin-server.com"
export WEBMIN_PORT="10000"
export WEBMIN_USERNAME="admin"
export WEBMIN_PASSWORD="your-password"
export WEBMIN_USE_HTTPS="true"
export WEBMIN_VERIFY_SSL="true" # Set to false for self-signed certsOr create a .env file (see .env.example).
Using Multiple Servers
With multi-server configuration, all tools accept an optional server parameter:
"Get system info from pi1" -> Uses pi1 (default)
"Check disk usage on web-server" -> Uses web-server
"List services on server: nas" -> Uses nasUse list_webmin_servers to see all configured servers and their aliases.
Available Tools
All tools accept an optional server parameter to target a specific Webmin server. See the full API reference for detailed parameters and response formats.
Category | Tools | Description |
Server |
| Manage and test server connections |
System |
| System monitoring and information |
Services |
| Service lifecycle management |
Users & Groups |
| User and group administration |
Cron |
| Scheduled task management |
Network |
| Interface and routing details |
Packages |
| Package information and updates |
Files |
| Remote file operations |
Storage |
| Disk, mount, SMART, and LVM management |
SSH |
| SSH server configuration |
Audit |
| Action logs and backups |
Security |
| Fail2ban intrusion prevention |
Database |
| MySQL database management |
Webmin ACL |
| Webmin user and permission management |
Disk Quotas |
| Disk quota monitoring and management |
Safety Framework
The server includes a tiered safety system to prevent accidental damage.
Safety Tiers
Tier | Description | Safe Mode |
Read | No system changes | Always allowed |
Safe | Low-risk changes | Allowed |
Moderate | Reversible changes | May block critical services |
Dangerous | Destructive operations | Blocked |
Safe Mode
Safe mode is enabled by default. When active:
Dangerous operations are blocked (user creation/deletion, password changes, cron deletion)
Critical services (
ssh,webmin,systemd-*,dbus) cannot be stoppedFile writes/deletes are restricted to
/tmpand/var/tmpCritical system users and paths are protected
Configure per-server in webmin-servers.json:
{
"servers": {
"production": { "safe_mode": true },
"development": { "safe_mode": false }
}
}Or globally via environment: export WEBMIN_SAFE_MODE=false
Docker
Pull from Docker Hub
docker pull gjenkins20/webmin-mcp-serverBuild locally
docker build -t webmin-mcp-server .Run standalone
# With config file
docker run --rm -i \
-v /path/to/webmin-servers.json:/app/webmin-servers.json:ro \
gjenkins20/webmin-mcp-server
# With environment variables
docker run --rm -i \
-e WEBMIN_HOST=192.168.1.100 \
-e WEBMIN_USERNAME=admin \
-e WEBMIN_PASSWORD=your-password \
gjenkins20/webmin-mcp-serverTagging strategy
Tag | Description |
| Latest build from |
| Specific release version |
| Latest patch for minor version |
| Specific commit SHA |
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Lint and format
ruff check src tests
ruff format src tests
# Type check
mypy srcSee CONTRIBUTING.md for guidelines on contributing to the project.
Project Structure
webmin-mcp-server/
├── src/
│ ├── server.py # MCP server setup
│ ├── webmin_client.py # Webmin API client
│ ├── config.py # Configuration management
│ ├── models.py # Pydantic models
│ └── tools/ # MCP tool implementations
├── tests/ # Test suite
├── docs/
│ ├── api-reference.md # Full API documentation
│ └── webmin_api_map.md # Webmin API endpoint mapping
├── .github/workflows/ # CI/CD (Docker build & push)
├── Dockerfile
└── webmin-servers.example.jsonLicense
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gjenkins20/webmin-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server