Download the PHP package isapp/laravel-forge-mcp without Composer

On this page you can find all versions of the php package isapp/laravel-forge-mcp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-forge-mcp

Laravel Forge MCP

Tests Lint Latest Version PHP Version

A native Laravel MCP server for managing Laravel Forge servers, sites and deployments. It is a Composer-installable replacement for the Node @bretterer/forge-mcp-server package and talks to the Forge API v2 through the official laravel/forge-sdk.

Contents

Requirements

Installation

The service provider is auto-discovered.

Configuration

The package reuses the standard laravel/forge-sdk configuration. Add a forge entry to config/services.php:

API token

This package talks to the organization-scoped Forge API v2. To create a token:

  1. Open your Forge account dashboard and click API.
  2. Click Create token, give it a name and an optional expiration date.
  3. Select the scopes the token should have, then click Add token.
  4. Copy the generated token into FORGE_API_TOKEN.

Scopes. Forge lets you restrict a token to specific scopes. This package needs only the following:

Scope Used for
server:view Reading servers, sites, deployments and logs (all the list_* / get_* tools).
site:manage-deploys deploy_site, get_deployment_script, update_deployment_script, toggle_quick_deploy.
server:manage-services reboot_server.
site:manage-environment get_site_environment (unverified — reading the env file may also be covered by server:view).
organization:view Only when FORGE_ORG_SLUG is not set — the package lists your organizations to resolve the slug automatically. Not needed if you set the slug explicitly.

If you only use the read-only tools, server:view is enough (plus organization:view when the slug is auto-resolved). You do not need server:manage-logs — that scope only clears logs, while this server only reads them. A token missing a required scope makes the corresponding tool return a Forge authorization error.

The legacy Forge API v1 is being retired (scheduled 30 June 2026). This package only uses API v2, so create the token from the current dashboard as described above.

Organization slug

Forge API v2 requires an organization slug on every server and site call. When services.forge.organization is empty the package resolves it automatically:

Safety flags

This server hands an AI agent control over your Forge infrastructure, so it ships with conservative defaults. All three flags live under services.forge and default to false:

There are no per-call confirmation prompts at the package level — gate risky operations with read_only or by trusting the operator/client.

Usage

The package registers a local (stdio) MCP server named forge. Start it with:

Point your MCP client at that command. For example, in a .mcp.json:

Inspect it interactively with:

Read-only mode

To let an agent observe but never change Forge state, run the server with read_only enabled. MCP clients can pass it as an environment variable on the server command:

With this set, deploy_site, reboot_server, update_deployment_script and toggle_quick_deploy are not registered and cannot be called. (This relies on the read_only key being wired into config/services.php as shown in Configuration.)

Tools

Tool Description
list_servers List all servers in the organization.
get_server Get a server by ID.
list_sites List sites on a server.
get_site Get a site by ID.
get_site_environment Read a site's environment (.env) file. ⚠️ Exposes secrets; disabled unless expose_environment is true.
get_site_nginx_access_log Nginx access log for a site.
get_site_nginx_error_log Nginx error log for a site (diagnose 5xx errors).
get_site_application_log Application log for a site (diagnose app errors).
deploy_site Trigger a deployment.
get_deployments Deployment history for a site.
get_deployment A single deployment, including status.
get_deployment_log Output log for a deployment (diagnose failures).
get_deployment_script Get the deployment script.
update_deployment_script Update the deployment script.
toggle_quick_deploy Enable/disable quick deploy (push-to-deploy).
reboot_server Reboot a server.
get_server_log Server-level log by key (diagnose server issues).

Every tool accepts an optional organizationSlug argument to override the resolved organization for that call.

Forge API v2 note: the old API v1 server load and reset deployment state endpoints do not exist in API v2 and are intentionally not provided.

Testing

Contributing

See AGENTS.md for architecture, conventions and how to add a tool. Pull requests run the test matrix (PHP 8.2–8.4 × Laravel 12–13) and Pint via GitHub Actions.

License

The MIT License (MIT). See LICENSE.


All versions of laravel-forge-mcp with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
laravel/forge-sdk Version ^4.0
laravel/mcp Version ^0.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package isapp/laravel-forge-mcp contains the following files

Loading the files please wait ...