Skip to main content

Introduction

Laravel Cloud provides a remote Model Context Protocol (MCP) server that allows AI agents to manage your applications and infrastructure. Once connected, your agent operates with the same permissions as your Cloud user account, scoped to the organizations and access levels you authorize. Changes your agent makes affect real applications, and Cloud bills your organization for any resources it creates.

Connecting your agent

Cloud uses OAuth to securely authenticate your AI agent. Add the MCP server to your client, then follow its steps to start the authorization flow.
From your project directory, run the following command in your terminal:
Then, run /mcp in a Claude Code session in the same directory and select laravel-cloud to complete the authorization flow.

Authorizing access

Cloud uses your existing browser session to authorize the connection and lets you choose an access level for each organization.
The Laravel Cloud authorization screen, where you choose an access level for each organization before authorizing an agent
After choosing your access levels, click Authorize to return to your agent. The role your Cloud account has in the organization still applies on top of the access level you choose. For example, if your role doesn’t allow you to edit environment variables, your agent won’t be able to edit them either, even with Full access. For more information, see Roles and permissions.

Managing connections

The Authorized applications section of your account’s security settings lists each agent you’ve connected, the organizations it can access, and when it was last used. From this section you can:
  • Change a connection’s access level for each organization by clicking Edit
  • Disconnect an agent by clicking Edit, then Revoke access to all, which immediately invalidates its tokens
The Authorized applications section of the account security settings, listing connected agents with their organizations and last accessed times
Some agents register using a new client ID each time they connect, so authorizing the same agent again may add a second entry instead of updating the existing one. You can revoke any entries you no longer use.

What your agent can do

The MCP server exposes tools covering most actions available in the Cloud dashboard. The server marks each tool as either read-only or able to make changes. MCP clients may use these annotations to decide which tool calls need your approval.

Deleting resources

Your agent can delete applications, environments, and resources, such as databases, caches, and buckets, only in organizations you granted Full access. These deletions take effect immediately and can’t be undone, so Cloud instructs your agent to confirm with you before running one. With Read and write access, your agent can still make smaller deletions, such as removing environment variables or failed jobs, but can’t delete applications, environments, or resources.
Stopping an environment or detaching a resource doesn’t remove it from your account. Cloud continues to bill for resources that remain provisioned.

Agent skills

The MCP server also provides a set of agent skills, which are Cloud-specific guides for common tasks such as preparing an application for its runtime, connecting a custom domain, debugging a running application, and reducing costs. Your agent retrieves these skills through the get-skill tool, and the server’s instructions direct your agent to consult them before starting related tasks.

Security

Connecting an agent to Cloud gives it access to your infrastructure. Follow these practices:
  • Grant only the access you need. Choose Full access only for organizations where your agent should be able to delete applications, environments, and resources, Read only for organizations your agent only needs to inspect, and No access for organizations it doesn’t need at all.
  • Watch for prompt injection. Content your agent reads, such as logs, issues, or web pages, may contain instructions written to manipulate it. Be cautious when using the Cloud MCP server alongside other tools that read untrusted content.
  • Verify the server URL. Only connect to https://cloud.laravel.com/mcp, and double-check the URL when installing the server from a third-party directory.
  • Check the client name. Cloud is unable to verify the client name shown on the authorization screen. Only authorize requests you started yourself.
Cloud masks sensitive data, such as database passwords and environment variable values, unless your agent specifically requests it and your permissions allow you to view it. Secrets work differently. Neither the dashboard nor the MCP server can read a secret’s value after you save it.