AI assistants (MCP)

Manage your server by asking your own AI assistant: Claude, Cursor or another client that speaks the Model Context Protocol (MCP). Ask "What needs attention on my server?", "Why does mail to gmail.com bounce?", "Which WordPress sites have plugin updates?" or "Create a mailbox office@example.com". The assistant answers using the server's status, logs and lists, and makes the changes you ask for.

Off until you turn it on. First make it available with mcp=1 in /usr/local/reqad/etc/server-software.ini: the Settings > AI access page then appears in the panel. Turn AI access on there, or run reqad mcp on as root. With mcp=0 (the default) the page, reqad mcp and every connection are refused. Your assistant and its AI provider are your own choice. Reqad stores no AI keys and sends nothing to any AI service: the assistant asks, and the server answers only the questions it is allowed to.

How it works

  • The assistant logs in to the server over SSH as root, with your SSH key, and runs reqad mcp serve. It speaks MCP over that SSH connection. No port is opened for it, so it works when the panel only answers your own IP address, and the REST API can stay off.
  • A token decides what the assistant may do. The token's secret stays on the server in a file only root can read, /var/lib/reqad/mcp/<id>.token. The assistant's settings name the file and hold no secret. AI access tokens work only this way: the REST API refuses them.
  • The assistant gets the operations of the REST API as tools: status, health, accounts, databases, mailboxes, the mail queue, logs, services, Git deployments and apps. It never gets a shell. It cannot reach the login, two-factor or firewall settings, or this page.

Connecting an assistant

  1. Set mcp=1 in /usr/local/reqad/etc/server-software.ini, then turn on AI access under Settings > AI access. The panel asks for your password first.
  2. Press New token and choose:
    SettingWhat it does
    ForThe whole server, or one hosting account. With one account the assistant sees and changes only what that account owns, and reads only its own domains' web and PHP logs.
    PermissionsEvery token can read: status, health, lists, logs, the mail queue. Create and change adds accounts, databases, mailboxes, service restarts, deploys and app restarts. Delete adds deleting accounts, databases, mailboxes and queued messages.
    Expires after7, 30 (the default) or 90 days.
    SSH fromOptional: the addresses the assistant's computer connects from. From anywhere else the token is refused.
  3. The panel shows the settings for your assistant. Connect next to a token shows them again at any time.
  4. The computer running the assistant needs an SSH key that logs in to root@<your server> without asking anything. Test it first:
    ssh -o BatchMode=yes root@server.example.com reqad mcp status
    It prints mcp: on. If it asks for a password or a passphrase, the assistant cannot connect. Add the key to your SSH agent, or give the assistant a key of its own.

Claude Code

claude mcp add reqad-server -- ssh -o BatchMode=yes root@server.example.com \
    reqad mcp serve --token-file=/var/lib/reqad/mcp/1.token

Add -p 2222 after ssh when SSH listens on another port. The panel's settings include it already.

Claude Desktop, Cursor and other clients

Add the server to the client's MCP settings file, under mcpServers:

{
    "mcpServers": {
        "reqad-server": {
            "command": "ssh",
            "args": ["-o", "BatchMode=yes", "root@server.example.com",
                     "reqad", "mcp", "serve", "--token-file=/var/lib/reqad/mcp/1.token"]
        }
    }
}

Desktop apps sometimes start ssh without your terminal's SSH agent. If the server does not connect, add "-i", "/home/you/.ssh/id_ed25519" to args.

Windows with PuTTY and Pageant

Windows' own ssh does not use the keys loaded in Pageant. Use PuTTY's plink instead. The Connect dialog has a Windows (PuTTY / Pageant) tab with these settings filled in.

  1. With your key loaded in Pageant, run this once in a Command Prompt and answer y when plink asks about the server's host key. It must then print mcp: on:
    plink root@server.example.com reqad mcp status
  2. Add the server to Claude Code. -batch makes plink fail instead of asking a question the assistant cannot answer:
    claude mcp add reqad-server -- plink -batch root@server.example.com reqad mcp serve --token-file=/var/lib/reqad/mcp/1.token

For other clients, use "command": "plink" and the same arguments in their JSON settings. Use -P 2222 (capital P) for another SSH port. If plink is not found, give its full path, e.g. "C:\\Program Files\\PuTTY\\plink.exe".

Tools

Each token sees only the tools its permissions allow. server tools need a token for the whole server.

ToolsWhat the assistant can do
server_status, services_list, service_restartRead the server's status (OS, uptime, load, memory, disks, PHP, mail queue, health counts), see which services run, restart one of the Services page's services. server
health_list, health_checks, health_run, health_dismiss, health_restoreWhat needs attention: certificates, mail DNS, PHP versions, stopped services, disks, backups. Run the checks again after a fix, or hide an expected problem.
accounts_list, account_show, account_create, account_edit, account_deleteHosting accounts. Creating and deleting accounts: server.
databases_list, database_create, database_delete, database_user_passwordMySQL/MariaDB databases and their users.
mailboxes_list, mailbox_create, mailbox_edit, mailbox_deleteMailboxes: create, change the password, block or allow login, delete.
mail_queue, mail_queue_deliver, mail_queue_removeThe outgoing mail queue: what is waiting, who sends the most, which recipient domains do not accept. Retry a message, or remove one. server
logs_list, log_tailThe last lines of a log, or only the lines containing some text: a domain's web requests and PHP errors, and with a server token the mail, IMAP, firewall, SSH, cron and system logs.
wordpress_list, wordpress_show, wordpress_update, wordpress_plugin, wordpress_purge_cache, wordpress_verifyWordPress sites: the live WordPress version and whether it is the latest, every plugin and theme with its available update, updates of core, plugins or themes (the site's database is saved to ~/wp-backups/ first, compressed; the 5 newest are kept), turning a plugin on or off, emptying the caches (after every update and plugin change this happens on its own: nginx page cache, OPcache, object cache, cache plugins, Elementor CSS), and checking core and plugin files against the wordpress.org checksums. These are fixed operations, not a wp-cli prompt: the assistant cannot run code on the site.
deployments_list, deployment_show, deployment_deploy, deployment_rollback, deploy_runGit deployments: deploy now, follow the build, roll back. When deployments are turned on.
apps_list, app_show, app_control, app_logsNode.js and Python apps: state, start, stop, restart, output. When deployments are turned on.

The full list with descriptions is under Tools on the AI access page, and reqad mcp tools prints it.

What keeps it safe

  • Deleting needs your agreement. A delete tool answers its first call with what it would delete and a confirmation code. Only a second call with the same arguments and that code deletes anything, within 5 minutes and once. The assistant is told to ask you in between, and most clients also ask you before they run a tool.
  • Text from outside is marked as data. Logs, queued mail, build output and app output can contain text written by anyone. Results that carry it say so, and the assistant is told never to follow instructions found in it.
  • Limits. At most 60 tool calls a minute, 20 of them changes.
  • Everything is logged. Latest tool calls on the AI access page and reqad mcp log list every call: when, which token, from which address, which tool and what happened.
  • New address alerts. When a token is used from an address it was not used from before, the admins get an email (when the panel can send email, Settings > Sending method).
  • Revoke stops it at once. The token is checked on every call. Revoking it, or turning AI access off, stops a running session at its next call. Tokens expire after 90 days at the most.

On the command line

reqad mcp on
reqad mcp new "Claude laptop" --write          # read + create and change, 30 days
reqad mcp new support --account=bob --days=7   # read only, account bob only
reqad mcp tokens
reqad mcp log --lines=50
reqad mcp revoke "Claude laptop"
reqad mcp off

reqad mcp new prints the settings for Claude Code and for the other clients. See Command line (CLI) for every option.


Need a hand? Create a free account or contact us.