AI assistants (MCP)

Connect Claude or another MCP client to ScalPanel, choose what it may do, and keep it safe.

ScalPanel has a built-in Model Context Protocol (MCP) server. An AI assistant such as Claude can use it to manage hosting for you: create websites and databases, add domains and mailboxes, edit files, read logs and start backups. It always acts through an API token, with exactly the scopes you give it.

The endpoint

The MCP server is your panel address followed by /mcp:

  • hosting panel: https://panel.example.com:2083/mcp
  • admin panel: https://panel.example.com:2087/mcp

It uses the Streamable HTTP transport with JSON answers (POST only; no server-sent event stream). It speaks MCP revisions 2025-06-18, 2025-03-26 and 2024-11-05.

Connect with OAuth (no token to copy)

If your assistant supports OAuth for MCP servers:

  1. Add the server URL above in your assistant.
  2. The assistant opens the panel. Sign in if asked.
  3. The panel shows the assistant's name. Choose the scopes it may use and the token's lifetime, then select Allow.

The panel then creates a normal API token named MCP: <assistant name> and hands it to the assistant. It lasts as long as you chose, never longer than your account allows. You see it and can revoke it in My security → API tokens.

Behind the scenes this is OAuth 2.1 with dynamic client registration and PKCE (S256 only). The discovery documents are at /.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server.

Connect with a token

If your assistant asks for a token instead:

  1. In the hosting panel, open Account → AI assistants. It shows your endpoint and lets you create a token with ready-made scope presets. You can also create one in My security → API tokens.
  2. Copy the token. It is shown only once.
  3. Add the server to your assistant with the header Authorization: Bearer <token>.

Claude Code:

claude mcp add --transport http scalpanel https://panel.example.com:2083/mcp \
  --header "Authorization: Bearer $SCALPANEL_TOKEN"

Other clients that support remote HTTP servers take the same URL and header. For a client that only runs local (stdio) servers, use an MCP HTTP bridge that points at the URL.

A browser session never works on /mcp: only a bearer token does.

What the assistant can do

The server offers 87 tools. Each tool is one call to the API, so the token's scopes, your account's limits and the usual validation all apply. The assistant gets your tenant ID and permissions from whoami.

AreaExamples
Accountwhoami, disk_usage, list_alerts
Websiteslist_websites, create_website, set_website_runtime, website_metrics, website_logs, search_access_log
Domains and DNSadd_domain, list_dns_records, create_dns_record, domain_certificate
Fileslist_files, read_file, write_file, edit_file, search_files, compress_files, extract_archive
Applicationslist_apps, install_app
Databaseslist_databases, create_database, create_database_user, grant_database, run_database_query
Mailcreate_mailbox, create_mail_alias, set_mail_spam, set_mail_filters, list_mail_deliveries
Cron and backupscreate_cron_job, start_backup, restore_backup, export_website
Providers and resellerslist_child_tenants, create_account, change_package, suspend_account, list_nodes, migrate_website

The provider and reseller tools only work with a token whose owner has those permissions, normally one made in the admin panel. There is no tool to terminate an account.

Every tool answer is limited to 96 KiB of text. Binary files cannot be read through read_file; download them from the panel.

Safety

  • Confirmation. Tools that delete, overwrite, publish files, open access, send mail or traffic elsewhere, or change limits are marked destructive. They refuse to run unless the assistant sends confirm: true, and the assistant is told to ask you first.
  • Prompt injection. An assistant can be misled by text it reads: a file, a log line, a delivery report. Give it the smallest scopes that work, and read what it proposes before you confirm a deletion.
  • Short lifetimes. Prefer days, not months. Revoke the token when you are done.
  • Audit. Everything the assistant does is in the activity log, marked as done with a token, under your user.
  • No session reuse. The assistant never gets your panel session, and it cannot create more tokens.

Warning: A token with *.manage scopes can delete websites, databases and mail. Use read-only scopes (sites.read, files.read and so on) for an assistant that only needs to look.