hestiacp-mcp
This server is an MCP gateway that lets AI agents manage a HestiaCP hosting panel through typed, allowlisted HestiaCP commands.
Read-only operations: list and inspect users, web domains, DNS zones/records, mail domains/accounts, databases, cron jobs, backups, system info/config, services, and IPs.
User management: create, suspend, unsuspend, and delete users.
Web domain management: add web domains, issue/renew Let's Encrypt certificates, and delete web domains.
DNS management: add/delete DNS zones and records with schema-validated record types.
Mail management: create/delete mail domains and mailboxes.
Database management: create and delete MySQL/PostgreSQL databases with database users.
Backup management: start user backups and list existing backups.
Cron management: add and delete cron jobs (including arbitrary shell commands with explicit confirmation).
System information: retrieve non-sensitive system config, service status, and server IPs.
Safety gates: mutations are off by default; destructive/system-level tools require environment flags and a literal
confirm: trueargument.Tool profiles: exposes 525 auto-generated HestiaCP commands in
allmode, or a curated set of 38 safer handcrafted tools incuratedmode.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hestiacp-mcp list all web domains for user alice"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HestiaCP MCP Server
A typed, security-first Model Context Protocol server for the real HestiaCP v-* command API. It uses the current @modelcontextprotocol/server v2 stdio transport and exposes an explicit allowlist rather than an arbitrary command executor.
Requirements
Node.js 20.18.1 or newer
HestiaCP with REST API access enabled
A dedicated HestiaCP access key and secret key
HTTPS connectivity to the panel, normally on port 8083
Create a least-privilege access key on the HestiaCP host. Prefer a custom API profile containing only the commands you intend to expose; do not use * permissions in production:
sudo /usr/local/hestia/bin/v-add-access-key USER PROFILE_NAME "MCP integration" jsonSee the HestiaCP REST API documentation for API enablement, IP allowlisting, profiles, and exit codes.
Related MCP server: Proxmox MCP Server
Installation
npm install
npm run buildRun the built CLI:
HESTIACP_URL=https://panel.example.com:8083/api/ \
HESTIACP_ACCESS_KEY=your-access-id \
HESTIACP_SECRET_KEY=your-secret \
node dist/cli.jsThe server communicates only over stdin/stdout. Diagnostics go to stderr so they cannot corrupt MCP JSON-RPC messages.
Configuration
Variable | Required | Default | Description |
| yes | — | Full HestiaCP API URL. |
| yes | — | Dedicated access-key ID. |
| yes | — | Access-key secret. |
| no |
| Request timeout, 1–120 seconds. |
| no |
| Timeout for backups and certificate issuance, 30 seconds–1 hour. |
| no |
| Maximum accepted response size. |
| no |
| TLS certificate and hostname verification. Disabling is for isolated development only. |
| no |
| Enables additive and state-changing tools. |
| no |
| Enables destructive tools. |
| no |
| Enables system-level tools (panel/service infrastructure, service restarts, panel updates). See Security below. |
| no |
| Tool visibility: |
For a private CA, keep verification enabled and launch Node with NODE_EXTRA_CA_CERTS=/absolute/path/to/ca.pem. The API URL may not contain embedded credentials. Cross-origin and same-origin HTTP redirects are rejected to prevent credential forwarding.
MCP client configuration
Use an absolute path and pass secrets through the client's environment facility. Example configuration used by Claude Desktop and other stdio MCP clients:
{
"mcpServers": {
"hestiacp": {
"command": "node",
"args": ["/absolute/path/to/hestiacp-mcp/dist/cli.js"],
"env": {
"HESTIACP_URL": "https://panel.example.com:8083/api/",
"HESTIACP_ACCESS_KEY": "ACCESS_KEY_ID",
"HESTIACP_SECRET_KEY": "SECRET_KEY"
}
}
}
}For a globally installed package, use "command": "hestiacp-mcp" and omit args.
Tools
Command catalog — 525 tools (full HestiaCP v-* surface)
The server exposes every HestiaCP command available in the upstream bin/ directory, generated from upstream commit cd81897dce279ed13945d25bfbaf0be604a9d413:
Source | Count |
Handcrafted (curated, hand-typed schemas) | 38 |
Auto-registered (generated from upstream | 487+ |
Total | 525 |
Schemas preserve the exact positional order expected by /api/, including empty placeholders for later optional arguments. All commands are registered as individual MCP tools — there is no generic command executor.
Risk classes and gates
Every command is classified into one of four risk tiers. No command is ever hard-blocked — each class is reachable via its environment flag. The decision belongs to the operator.
Class | Prefix / heuristic | Count | Env flag | Confirm? |
read |
| 119 | (always on) | No |
mutating |
| 104 |
| No |
destructive |
| 225 |
| Yes |
system |
| 77 |
| Yes |
Classification priority (decreasing): manual overrides → read-prefix (even with -sys-) → system marker → destructive prefix → mutating prefix → generator error (no silent fallback for unknown commands).
When a class is disabled, the tool is still registered but returns an isError result with a clear message naming the required flag. Destructive and system tools additionally require a confirm: true literal argument.
Meta-tools (always read-only)
list_tool_groups— enumerate all tools grouped by risk class and command familyset_tool_group— enable or disable an entire family of tools at runtime (e.g.v-delete-web-domain-*)
Tool profile
The HESTIACP_TOOL_PROFILE variable controls how many tools are visible to the client:
Value | Tools visible | Use case |
| 525 | Full server management |
| 38 handcrafted only | Emergency fallback; minimal context with untrusted agents |
Handcrafted tools (subset of 38, curated profile)
Read-only (enabled by default):
Users:
list_users,get_userWeb:
list_web_domains,get_web_domainDNS:
list_dns_domains,get_dns_domain,list_dns_recordsMail:
list_mail_domains,get_mail_domain,list_mail_accountsDatabases and cron:
list_databases,get_database,list_cron_jobsBackups and system:
list_user_backups,get_system_info,get_system_config,list_system_services,list_system_ips.get_system_configforces JSON and returns only an explicit allowlist of non-sensitive fields; passwords, keys, SMTP credentials, and unknown future fields are excluded.
Mutating (requires HESTIACP_ALLOW_MUTATIONS=true):
add_user,add_web_domain,issue_web_certificateadd_dns_domain,add_dns_recordadd_mail_domain,add_mail_accountadd_database,backup_user,unsuspend_user
Destructive/disruptive (requires both safety flags and confirm: true):
suspend_user,add_cron_job(cron commands are arbitrary shell execution)delete_user,delete_web_domain,delete_dns_domain,delete_dns_recorddelete_mail_domain,delete_mail_account,delete_database,delete_cron_job
Each MCP definition includes readOnlyHint, destructiveHint, idempotentHint, and openWorldHint. These annotations are advisory; the environment gates and HestiaCP access-key profile are the enforcement layers.
Example tool input:
{
"name": "add_dns_record",
"arguments": {
"user": "alice",
"domain": "example.com",
"record": "www",
"type": "A",
"value": "192.0.2.10",
"ttl": 3600
}
}Destructive example:
{
"name": "delete_dns_record",
"arguments": {
"user": "alice",
"domain": "example.com",
"id": 12,
"confirm": true
}
}Pinned upstream version
The command catalog was generated from HestiaCP upstream commit
cd81897dce279ed13945d25bfbaf0be604a9d413.
When a new panel release ships, regenerate the catalog against the updated bin/ directory.
Regenerating the command catalog
# Clone upstream once:
git clone https://github.com/hestiacp/hestiacp /tmp/hestiacp-upstream
cd /tmp/hestiacp-upstream && git checkout cd81897dce279ed13945d25bfbaf0be604a9d413
# Generate (from project root):
npm run generate:commands -- --upstream /tmp/hestiacp-upstream
# Commit the updated src/generated/commands.jsonA CI workflow checks that src/generated/ matches the pinned upstream commit so stale catalogs are detected automatically.
Docker
Build the image:
docker build -t hestiacp-mcp .Stdio must remain attached, so run with -i. Prefer Docker secrets or an environment file with restrictive filesystem permissions:
docker run --rm -i --env-file /secure/path/hestiacp-mcp.env hestiacp-mcpMount a private CA read-only and set NODE_EXTRA_CA_CERTS when required.
Security notes
⚠️ Warning — destructive and system risk classes
The
destructiveandsystemrisk classes include irreversible operations that can delete data, break the hosting panel, or damage the server itself. When these classes are enabled viaHESTIACP_ALLOW_DESTRUCTIVE/HESTIACP_ALLOW_SYSTEM, an AI agent can execute them without asking a human for confirmation (theconfirm: trueargument is a machine-readable guard, not a human-in-the-loop prompt).Recommendation for less-trusted agents: use a dedicated, restricted HestiaCP API key (non-admin, IP-allowlisted) together with
HESTIACP_TOOL_PROFILE=curatedso only the 38 hand-crafted tools are visible. Enable destructive or system access only for fully trusted, supervised automation.
Use a dedicated non-admin access key, a restrictive HestiaCP API profile, server-side IP allowlisting, and firewall restrictions on port 8083.
Keep TLS verification enabled. The permissive TLS settings in historical HestiaCP examples are not suitable for production.
Mutation and deletion are off by default. Destructive tools also require a literal confirmation argument.
Commands are allowlisted and validated; there is no generic
cmdtool.Requests have bounded duration and response size, never retry mutations automatically, and reject redirects.
Backups and certificate issuance use the separate long-running timeout. A timeout is reported as an unknown remote outcome; inspect HestiaCP state before retrying.
Tool results include structured
ok,command,dataor sanitized error metadata (httpStatus, HestiaexitCode,outcomeUnknown) in addition to text for client compatibility.Access keys and password-named data are never intentionally logged. Avoid placing secrets directly in shell history or committed MCP configuration.
HestiaCP command signatures are shell-script interfaces and can change between releases. Test upgrades against a staging panel before production rollout.
v-open-fs-fileandv-open-fs-configare read-only tools but can return the contents of sensitive files such as/etc/shadowor service configuration files containing passwords. Their output is passed through the same secret-redaction pipeline applied to all tool responses, but exercise caution when enabling these tools for agents.
Development
npm run lint
npm run typecheck
npm test
npm run build
# or all checks:
npm run validateTests use mocked HTTP responses and linked in-memory MCP transports; they do not contact a real HestiaCP server.
Upstream references
Limitations
Only the documented, verified subset above is exposed; HestiaCP has hundreds of additional
v-*commands.The test suite mocks HestiaCP. Operators should run smoke tests against their exact supported HestiaCP version.
Stdio is the only transport. Authentication and network exposure remain between this local process and HestiaCP; the MCP server itself does not listen on a network socket.
Available Tools
38 toolsadd_cron_jobadd cron jobADestructive
Create a cron job that executes an arbitrary shell command. Executes verified command v-add-cron-job.
Inputs: day (required), hour (required), user (required), month (required), +6 more. Returns: ok, data, error, command
add_databaseadd databaseB
Create a database and database user. Executes verified command v-add-database.
Returns: ok, data, error, command
add_dns_domainadd dns domainB
Create a DNS zone using HestiaCP defaults. Executes verified command v-add-dns-domain.
Inputs: ip (required), user (required), domain (required), restart, +1 more. Returns: ok, data, error, command
add_dns_recordadd dns recordC
Add a record to an existing DNS zone. Executes verified command v-add-dns-record.
Inputs: type (required), user (required), value (required), domain (required), +5 more. Returns: ok, data, error, command
add_mail_accountadd mail accountB
Create a mailbox. Executes verified command v-add-mail-account.
Inputs: user (required), domain (required), account (required), password (required), +1 more. Returns: ok, data, error, command
add_mail_domainadd mail domainC
Create a mail domain. Executes verified command v-add-mail-domain.
Inputs: user (required), domain (required), dkim, restart, +4 more. Returns: ok, data, error, command
add_useradd userB
Create a HestiaCP user. Executes verified command v-add-user.
Inputs: user (required), email (required), password (required), package, +2 more. Returns: ok, data, error, command
add_web_domainadd web domainB
Create a web domain. Executes verified command v-add-web-domain.
Inputs: user (required), domain (required), ip, aliases, +2 more. Returns: ok, data, error, command
backup_userbackup userA
Start a complete user backup. Executes verified command v-backup-user.
Inputs: user (required), notify. Returns: ok, data, error, command
delete_cron_jobdelete cron jobCDestructive
Delete a cron job. Executes verified command v-delete-cron-job.
Inputs: user (required), jobId (required), confirm (required). Returns: ok, data, error, command
delete_databasedelete databaseCDestructive
Delete a database. Executes verified command v-delete-database.
Inputs: user (required), confirm (required), database (required). Returns: ok, data, error, command
delete_dns_domaindelete dns domainADestructive
Delete a DNS zone and all records. Executes verified command v-delete-dns-domain.
Inputs: user (required), domain (required), confirm (required). Returns: ok, data, error, command
delete_dns_recorddelete dns recordBDestructive
Delete a DNS record. Executes verified command v-delete-dns-record.
Inputs: id (required), user (required), domain (required), confirm (required), +1 more. Returns: ok, data, error, command
delete_mail_accountdelete mail accountCDestructive
Delete a mailbox and its messages. Executes verified command v-delete-mail-account.
Inputs: user (required), domain (required), account (required), confirm (required). Returns: ok, data, error, command
delete_mail_domaindelete mail domainBDestructive
Delete a mail domain and all mailboxes. Executes verified command v-delete-mail-domain.
Inputs: user (required), domain (required), confirm (required). Returns: ok, data, error, command
delete_userdelete userADestructive
Delete a user and all owned data. Executes verified command v-delete-user.
Inputs: user (required), confirm (required), restart. Returns: ok, data, error, command
delete_web_domaindelete web domainADestructive
Delete a web domain and its files. Executes verified command v-delete-web-domain.
Inputs: user (required), domain (required), confirm (required), restart. Returns: ok, data, error, command
get_databaseget databaseARead-onlyIdempotent
Get one database. Executes verified command v-list-database.
Inputs: user (required), database (required), format. Returns: ok, data, error, command
get_dns_domainget dns domainARead-onlyIdempotent
Get one DNS zone. Executes verified command v-list-dns-domain.
Inputs: user (required), domain (required), format. Returns: ok, data, error, command
get_mail_domainget mail domainARead-onlyIdempotent
Get one mail domain. Executes verified command v-list-mail-domain.
Inputs: user (required), domain (required), format. Returns: ok, data, error, command
get_system_configget system configARead-onlyIdempotent
Get an allowlisted, non-sensitive HestiaCP system configuration summary. Executes verified command v-list-sys-config.
Inputs: no named parameters. Returns: ok, data, error, command
get_system_infoget system infoBRead-onlyIdempotent
Get HestiaCP system information. Executes verified command v-list-sys-info.
Inputs: format. Returns: ok, data, error, command
get_userget userARead-onlyIdempotent
Get one HestiaCP user. Executes verified command v-list-user.
Inputs: user (required), format. Returns: ok, data, error, command
get_web_domainget web domainCRead-onlyIdempotent
Get one web domain. Executes verified command v-list-web-domain.
Inputs: user (required), domain (required), format. Returns: ok, data, error, command
issue_web_certificateissue web certificateB
Issue or renew a Let's Encrypt certificate for a web domain. Executes verified command v-add-letsencrypt-domain.
Inputs: user (required), domain (required), aliases, includeMail. Returns: ok, data, error, command
list_cron_jobslist cron jobsBRead-onlyIdempotent
List a user's cron jobs. Executes verified command v-list-cron-jobs.
Inputs: user (required), format. Returns: ok, data, error, command
list_databaseslist databasesCRead-onlyIdempotent
List a user's databases. Executes verified command v-list-databases.
Inputs: user (required), format. Returns: ok, data, error, command
list_dns_domainslist dns domainsARead-onlyIdempotent
List a user's DNS zones. Executes verified command v-list-dns-domains.
Inputs: user (required), format. Returns: ok, data, error, command
list_dns_recordslist dns recordsCRead-onlyIdempotent
List records in a DNS zone. Executes verified command v-list-dns-records.
Inputs: user (required), domain (required), format. Returns: ok, data, error, command
list_mail_accountslist mail accountsARead-onlyIdempotent
List accounts in a mail domain. Executes verified command v-list-mail-accounts.
Inputs: user (required), domain (required), format. Returns: ok, data, error, command
list_mail_domainslist mail domainsARead-onlyIdempotent
List a user's mail domains. Executes verified command v-list-mail-domains.
Inputs: user (required), format. Returns: ok, data, error, command
list_system_ipslist system ipsARead-onlyIdempotent
List configured server IP addresses. Executes verified command v-list-sys-ips.
Inputs: format. Returns: ok, data, error, command
list_system_serviceslist system servicesARead-onlyIdempotent
List system services and status. Executes verified command v-list-sys-services.
Inputs: format. Returns: ok, data, error, command
list_user_backupslist user backupsBRead-onlyIdempotent
List a user's backups. Executes verified command v-list-user-backups.
Inputs: user (required), format. Returns: ok, data, error, command
list_userslist usersBRead-onlyIdempotent
List HestiaCP users. Executes verified command v-list-users.
Inputs: format. Returns: ok, data, error, command
list_web_domainslist web domainsBRead-onlyIdempotent
List a user's web domains. Executes verified command v-list-web-domains.
Inputs: user (required), format. Returns: ok, data, error, command
suspend_usersuspend userCDestructiveIdempotent
Suspend a user and their services. Executes verified command v-suspend-user.
Inputs: user (required), confirm (required), restart. Returns: ok, data, error, command
unsuspend_userunsuspend userAIdempotent
Unsuspend a user and their services. Executes verified command v-unsuspend-user.
Inputs: user (required), restart. Returns: ok, data, error, command
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 38 tools
Each tool maps to a distinct HestiaCP resource and action, and plural list_* vs singular get_* tools are clearly separated. Even closely related tools like add_dns_domain and add_dns_record or list_mail_domains and list_mail_accounts are unambiguous from their descriptions.
Tool names consistently follow a lower_snake_case verb_noun pattern: list_*, get_*, add_*, delete_*, with a few purposeful exceptions like issue_web_certificate, backup_user, suspend_user, and unsuspend_user. There is no mixing of naming conventions.
At 38 tools, the surface is much larger than the 16–25 heavy range and crosses the threshold where agents will struggle to efficiently select tools. While the tools are organized by resource domain, the count is too high for a single MCP server.
The server covers listing, getting, adding, and deleting for many resources, but there are no update/modify operations for any resource, no restore backup tool despite backup_user and list_user_backups existing, and no domain-level suspend/unsuspend. Common HestiaCP management workflows will hit dead ends.
Maintenance
Related MCP Connectors
Linux server administration over OAuth MCP: shell, Docker, systemd, files and monitoring.
Official xCloud MCP: manage servers, sites, WordPress, SSL, backups and deploys from any MCP client.
Manage your Servera hosting over MCP: VPS/VDS, DNS, firewall, backups, SSL, billing, tickets.
Related MCP Servers
- AlicenseAqualityAmaintenanceA safe, structured MCP server that lets AI inspect and operate a VPS through typed, allowlisted tools for nginx, PM2, SSL, UFW, fail2ban, with read-only defaults and opt-in mutations.69 npm2MIT
- AlicenseAqualityCmaintenanceMCP server for Proxmox VE and Proxmox Datacenter Manager, covering every API endpoint via six consolidated tools for list, describe, and call operations with a read-only safety gate.614 npm2AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceProvides a secure MCP server for operating Typesense, exposing 95 typed operations for search, collection management, and system administration. Read-only by default, with opt-in write access for human and AI agents.3MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for managing cPanel accounts and WHM servers via UAPI/WHM APIs. Supports domains, DNS, email, MySQL, files, cron, SSL, PHP, backups, and hosting accounts across multiple environments with read-only mode and security controls.MIT