Laravel Cloud
Connect Claude, ChatGPT or Cursor to Laravel Cloud via MCP. Inspect apps, environments, and deployments, then trigger deploys securely.
Example questions
Try asking your AI client
-
Which Laravel Cloud applications are in this organization?
-
Did the production environment deploy finish after last night?
-
Summarize the latest failed deployment logs - do not redeploy.
-
Write a short note for Amalie about environment status - do not stop anything.
-
What commands ran on staging in the last day?
Overview
Connect Laravel Cloud so AI clients can inspect applications, environments, deployments, logs, and usage - and trigger deploys, commands, or environment changes when Write access is enabled.
This integration uses the Laravel Cloud API at https://cloud.laravel.com/api. stackgate.ai stores your organization API token encrypted and returns tool results to your AI client for that request.
Prerequisites
- A Laravel Cloud organization with API access
- A stackgate.ai account
Getting credentials
- Sign in to Laravel Cloud and open the organization you want to connect.
- Go to Settings → API tokens and click Create API Token.
- Give the token a name such as
stackgate.ai. - Choose an expiration (1 month, 6 months, or 1 year).
- Restrict permissions, and optionally a single application or environment, to the least privilege you need.
- Copy the token immediately. Cloud shows it only once.
- In stackgate.ai, open My Integrations → Laravel Cloud, paste the token, and click Connect & enable.
- Optionally save a default application ID. Use
list_applicationsafter connecting if you are unsure. - Use Edit tool access after connect to keep Write tools off until you need a deploy or mutate.
Treat the token like a password. Rotate it in Cloud if it is exposed, and update My Integrations before the expiry date.
See the Laravel Cloud API authentication docs for token setup.
Response format
Laravel Cloud returns JSON:API payloads. MCP tools normalize them for AI clients:
- Lists:
{ "items": [...], "meta": { ... }, "links": {...} } - Single resources: flattened fields (
id,type, plus attributes such asname,status) - Deployment logs: raw Cloud log JSON (
data.build/ deploy steps), not flattened JSON:API
Use page on list tools when the response includes meta.current_page / meta.last_page. Environment logs use cursor, from, and to.
Using with AI clients
- Dedicated endpoint:
POST /mcp/laravel-cloudwith a Sanctum bearer token - Private gateway: one config for all integrations - use
laravel-cloud__*namespaced tools
See Documentation for HTTP authentication and private gateway setup.
Suggested workflow
get_organization/list_applications- confirm the token and find application IDs.list_environments/get_environment- inspect status (running,stopped,hibernating,deploying).list_deployments/get_deployment/get_deployment_logs- debug failed builds.initiate_deployment- deploy now (Write access).list_environment_logs,run_command/get_command- runtime debugging.- Domain, env-var, instance, cache, and usage tools for the rest of the control plane.
Troubleshooting
- 422 integration not configured - paste an API token in My Integrations.
- 401 Unauthorized - the token expired or was revoked. Create a new token in Cloud Settings → API tokens and update My Integrations.
- 403 Forbidden - the token is scoped to another application or environment, or lacks that RBAC permission.
- 429 Too many requests - wait and use pagination or command/deploy polling instead of tight loops.
- Missing application - set a default application ID, or pass
application_idon the tool call. - Destructive actions -
stop_environment,delete_domain, and env-var deletes can cause outages. Confirm intent before approving Write access. - Secrets in responses -
get_environmentmay include variable values. Do not paste secrets into chat unless you asked for them.
Available tools
-
get_organization
Get the Laravel Cloud organization for the connected API token.
-
list_regions
List available Laravel Cloud regions.
-
list_applications
List Laravel Cloud applications for the connected organization. Supports filter[name], filter[slug], filter[region], include, and page.
-
get_application
Get a Laravel Cloud application by ID.
-
list_environments
List environments for a Laravel Cloud application. Uses the default application ID from My Integrations when application_id is omitted.
-
get_environment
Get a Laravel Cloud environment by ID. May include environment variable values - do not echo secrets unless the user asked.
-
list_deployments
List deployments for a Laravel Cloud environment. Supports filter[status], filter[branch_name], filter[commit_hash], and include.
-
get_deployment
Get a Laravel Cloud deployment by ID, including status, commit, and failure_reason.
-
get_deployment_logs
Get build and deploy logs for a Laravel Cloud deployment. Returns step output, not a JSON:API document.
-
initiate_deployment
Initiate a deployment for a Laravel Cloud environment. Confirm with the user first.
-
list_environment_logs
Search Laravel Cloud environment logs. from and to are required ISO-8601 timestamps. Use cursor from a previous response for the next page.
-
get_environment_metrics
Get metrics for a Laravel Cloud environment.
-
start_environment
Start a Laravel Cloud environment and trigger a deployment. Confirm with the user first.
-
stop_environment
Stop a Laravel Cloud environment and cancel any in-progress deployment. Confirm with the user first.
-
purge_edge_cache
Purge the edge cache for all domains on a Laravel Cloud environment.
-
add_environment_variables
Add or update environment variables on a Laravel Cloud environment. Never echo secret values unless the user asked.
-
delete_environment_variables
Delete environment variables by key. Atomic: if any key is missing, nothing is deleted.
-
list_commands
List one-off commands run on a Laravel Cloud environment.
-
run_command
Run a one-off command on a Laravel Cloud environment. Confirm with the user first. Poll get_command for output.
-
get_command
Get a Laravel Cloud command by ID, including status, exit_code, and output.
-
list_domains
List custom domains for a Laravel Cloud environment.
-
get_domain
Get a Laravel Cloud domain and its required DNS records.
-
create_domain
Create a custom domain on a Laravel Cloud environment. After creating, add the DNS records from the response, then call verify_domain.
-
verify_domain
Check whether DNS records for a Laravel Cloud domain are set up.
-
delete_domain
Delete a Laravel Cloud domain. Confirm with the user first.
-
list_instances
List compute instances for a Laravel Cloud environment.
-
get_instance
Get a Laravel Cloud instance by ID.
-
list_instance_sizes
List available Laravel Cloud instance sizes grouped by category.
-
get_usage
Get Laravel Cloud usage for a billing period. period 0 is the current cycle.
-
list_caches
List Laravel Cloud caches for the connected organization.
-
get_cache
Get a Laravel Cloud cache by ID.
-
list_database_clusters
List Laravel Cloud database clusters for the connected organization.
-
get_database_cluster
Get a Laravel Cloud database cluster by ID.
MCP endpoint:
https://stackgate.ai/mcp/laravel-cloud
(HTTP) or via the
private gateway.