1. Go to this page and download the library: Download isapp/laravel-forge-mcp library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
isapp / laravel-forge-mcp example snippets
'forge' => [
'token' => env('FORGE_API_TOKEN'),
// Optional. Forge API v2 scopes calls to an organization. Leave this out
// to resolve it automatically; set it when the token can access more than
// one organization.
'organization' => env('FORGE_ORG_SLUG'),
// Optional safety/behaviour flags (all default to false):
// Expose only read-only tools; deploy, reboot, deployment-script update
// and quick-deploy toggle are not registered.
'read_only' => env('FORGE_MCP_READ_ONLY', false),
// Register the get_site_environment tool. It returns the site's .env
// (secrets), so it is disabled unless you opt in.
'expose_environment' => env('FORGE_MCP_EXPOSE_ENVIRONMENT', false),
// Return raw Forge/SDK exception messages to the client. When false the
// client gets a generic message and the full error goes to the log.
'verbose_errors' => env('FORGE_MCP_VERBOSE_ERRORS', false),
],
bash
php artisan mcp:start forge
bash
php artisan mcp:inspector forge
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.