Skip to main content
Laravelify has a built-in MCP server. Connect an AI assistant to it and ask in plain words: “Deploy acme/shop on shop.example.com with a MySQL database.” It picks the right site type, creates the website, deploys it, follows the log, and fixes what fails.

1. Create a token

In the panel open Settings → MCP, give the token a name (one per computer or app), and press Create token. It asks for your authenticator code, then shows the token once. Copy it. Anyone with the token can manage this panel’s websites, so keep it like a password. Revoke a token there at any time; the list shows when and from where each one was last used.

2. Connect your AI app

The server address is https://your-panel-domain/mcp. The Settings → MCP page shows these commands with your address and token filled in.

3. Ask it

  • “Deploy acme/shop on shop.example.com with a MySQL database.”
  • “Deploy this project folder to my Laravelify server on app.example.com.”
  • “Why did the last deploy of shop fail? Fix it and deploy again.”
  • “Set MAIL_HOST and MAIL_PORT on shop.”
  • “Which of my websites are turned off?”
  • “Upload the Firebase key from my backup’s private.tgz into storage/app/private of the API site.”
Claude also offers a ready-made deploy-project prompt: give it a repository or a folder and a domain.

What it can do

Deploying a folder from your computer

The server cannot read files on your computer, so the assistant pushes the folder to a new private GitHub repository first (gh repo create --private --source . --push), then deploys that repository. Make sure your Laravelify GitHub App can read it (GitHub → Settings → Applications → the App → Repository access). After that, every push deploys by itself.

Production and development: one site, many environments

Ask for “production on main and development on dev” and the assistant makes one website with two environments, never two websites: create-website for production, then create-site-environment for development, with its own branch, domain or port, and database. Every per-site tool (deploy-website, get-deployment, get-environment, update-environment, run-command, get-logs, set-domains, and the others) takes an optional environment (its id or name, like development); without it, the tool works on production. A push to GitHub deploys only the environment whose branch it is. The same environments show in the panel above the website’s settings.

Domains: one site, many names

A website has one main domain and any number of extra domains that open the same site, so you never need a second website for www.example.com or for a second domain. Ask for it in words (“deploy this on x.com and www.x.com, and y.com too”) and the assistant uses include_www and aliases, or set-domains later. nginx answers on all of them, and on a Cloudflare tunnel they are added to the tunnel and DNS when you saved a Cloudflare API token in Settings → Cloudflare (see Cloudflare tunnels).

Private files and ports

  • Private files. Keys and certificates are not in Git. After a site’s first deploy, the assistant uploads them with upload-file (a single file or an archive it unpacks). Deploys keep them: a deploy only resets files that Git tracks. Paths must stay inside the site folder, and links inside archives are skipped.
  • Ports are picked for you. Every new site gets a port that nothing uses: not another website, not a Laravelify service, and not anything listening on the server right now (for example an app still running from an old server). Ports from an old server’s nginx files do not matter, only the domains do. A port you choose yourself is refused if something holds it, with the name of what holds it.

Moving from an old server

  • Databases. With create_database, the site uses the MySQL database and login the panel makes. DB_* values from an old .env are left out, so the old server’s login cannot lock the site out. Import your data into the new database (phpMyAdmin, or mysql on the server); import-database can import it from the site’s folder (put the dump there first with upload-file for small ones, or copy it with scp for big ones).
  • APP_KEY. Keep the old server’s APP_KEY in the env so data it encrypted still opens. A deploy only creates a key when there is none.
  • Special nginx rules. Paths the old nginx sent elsewhere (callbacks, webhooks) can be added with update-nginx.
  • Allow the tools in Claude Code. In auto mode Claude Code may ask before each Laravelify call or before reading backup files. Allow them once: run /permissions in Claude Code and add mcp__laravelify.

Good to know

  • Deploys started by the assistant show Mcp as their trigger, in the panel and in Telegram.
  • /mcp signs in with the token only, so the access prompt does not get in the way. Ten wrong tokens in a minute block that IP for a minute.
  • Behind the Cloudflare tunnel the address is your panel’s normal HTTPS domain; nothing else needs opening.