laravel-forge-mcp
Manages Composer authentication and package settings for sites, including retrieving and updating auth configuration.
Handles Git repository management, deployment keys, and deployment scripts for site deployments.
Integrates with Inertia.js as part of Laravel application management through Forge.
Core integration for managing Laravel applications via the Laravel Forge API, including servers, sites, and deployments.
Automates SSL certificate provisioning, installation, and activation using Let's Encrypt.
Manages MySQL databases, users, and permissions on Forge servers.
Configures Nginx settings, manages custom templates, and controls the Nginx service.
Manages PHP versions, PHP-FPM service, and OPcache for sites.
Installs and removes phpMyAdmin on sites for database management.
Installs and removes WordPress sites, including related configuration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@laravel-forge-mcplist my servers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Laravel Forge MCP Server
A Model Context Protocol (MCP) server for managing Laravel Forge servers, sites, and deployments. Compatible with any MCP client.
Features
179 Tools - Complete control over the Forge API
9 Resources - Integrated documentation and best practices
6 Prompts - Guided workflows for common operations
Docker Ready - Optimized container for easy distribution
Related MCP server: Edgee MCP Server
Quick Start
Prerequisites
Docker installed
Forge API token (get one here)
Any MCP-compatible client
Configuration
Add the server to your MCP client configuration:
{
"mcpServers": {
"forge": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"FORGE_API_TOKEN",
"ddrcn/forge-mcp:latest"
],
"env": {
"FORGE_API_TOKEN": "your_token_here"
}
}
}
}Replace your_token_here with your Forge API token.
Running Locally (without Docker)
{
"mcpServers": {
"forge": {
"command": "php",
"args": ["/path/to/forge-mcp/artisan", "mcp:start", "forge"],
"env": {
"FORGE_API_TOKEN": "your_token_here"
}
}
}
}Available Tools
Servers (13 tools)
Tool | Description |
| List all servers |
| Get server details |
| Create a new server |
| Update server settings |
| Delete a server |
| Reboot a server |
| Regenerate database password |
| Revoke Forge SSH access |
| Reconnect to server |
| Reactivate deleted server |
| Get server log files |
| List server events |
| Get event output |
Sites (18 tools)
Tool | Description |
| List all sites on a server |
| Get site details |
| Get site logs |
| Create a new site |
| Update site settings |
| Delete a site |
| Change PHP version for a site |
| Clear site log files |
| List domain aliases |
| Update domain aliases |
| Get load balancing config |
| Update load balancing |
| Install WordPress on site |
| Remove WordPress from site |
| Install phpMyAdmin |
| Remove phpMyAdmin |
| Get Composer auth config |
| Update Composer auth config |
Deployments (11 tools)
Tool | Description |
| Trigger a deployment |
| Get deployment logs |
| Get deployment script |
| Update deployment script |
| Enable auto-deploy on push |
| Disable auto-deploy |
| List deployment history |
| Get specific deployment |
| Get deployment output |
| Reset stuck deployment state |
| Set failure notification emails |
SSL Certificates (7 tools)
Tool | Description |
| List all certificates |
| Get certificate details |
| Obtain Let's Encrypt certificate |
| Install custom certificate |
| Get CSR |
| Delete a certificate |
| Activate SSL certificate |
Databases (10 tools)
Tool | Description |
| List databases |
| Get database details |
| Create database |
| Update database |
| Delete database |
| List database users |
| Get user details |
| Create database user |
| Update user permissions |
| Sync databases from server |
Composite Tools (5 tools)
Tool | Description |
| Comprehensive server health check with metrics aggregation |
| Complete site dashboard with SSL, deployments, workers |
| Deploy multiple sites at once across servers |
| Check SSL certificate expiration across all sites |
| Clone site configuration to new domain/server |
Additional Tools
Category | Count | Description |
Backups | 7 | Backup configurations and restore |
Commands | 3 | Execute and monitor site commands |
Composite | 5 | Aggregate tools (health check, bulk deploy, clone site) |
Configuration | 4 | Nginx config and .env file management |
Credentials | 1 | List provider credentials |
Daemons | 5 | Manage long-running processes |
Firewall | 4 | Manage firewall rules |
Git | 5 | Repository and deploy key management |
Integrations | 21 | Laravel integrations (Horizon, Octane, Reverb, Pulse, Inertia, Maintenance, Scheduler) |
Jobs | 5 | Scheduled jobs (cron) |
Monitors | 4 | Server monitoring |
Nginx Templates | 6 | Custom Nginx configurations |
PHP | 5 | PHP version management and OPcache |
Recipes | 6 | Reusable server scripts |
Redirect Rules | 4 | URL redirects |
Regions | 1 | List available cloud provider regions |
Security Rules | 4 | HTTP authentication |
Services | 15 | MySQL, Nginx, Postgres, PHP-FPM, Blackfire, Papertrail, generic start/stop/restart |
SSH Keys | 4 | SSH key management |
User | 1 | Authenticated user information |
Webhooks | 4 | Deployment webhooks |
Workers | 6 | Queue workers |
Total: 179 tools
Available Resources
Resource | Description |
| Forge API documentation reference |
| Step-by-step deployment guidelines |
| Best practices for Laravel deployments |
| Server security recommendations |
| Common issues and solutions |
| PHP version upgrade procedures |
| Queue worker configuration guide |
| Nginx performance tuning |
| Advanced server security hardening |
Available Prompts
Prompt | Description |
| Guided Laravel application deployment |
| Complete server provisioning workflow |
| Site migration between servers |
| Deployment failure diagnosis |
| SSL certificate renewal workflow |
| Create Laravel site from scratch |
Development
Build Docker Image
docker build -t ddrcn/forge-mcp:latest .Test Locally
# Via Docker
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | \
docker run --rm -i -e FORGE_API_TOKEN=your_token ddrcn/forge-mcp:latest
# Via PHP
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | \
FORGE_API_TOKEN=your_token php artisan mcp:start forgeRun Tests
php artisan testCI/CD
This project uses GitHub Actions for continuous integration and deployment:
Tests: Run automatically on push and pull requests
Docker: Images are built and pushed to Docker Hub on push to master
Required Secrets
Configure these secrets in your GitHub repository settings:
Secret | Description |
| Your Docker Hub username |
| Docker Hub access token (create one here) |
Automatic Releases
Releases are created automatically based on conventional commits:
Commit Type | Version Bump | Example |
| Minor (1.0.0 → 1.1.0) |
|
| Major (1.0.0 → 2.0.0) |
|
| Patch (1.0.0 → 1.0.1) |
|
When you push to master, the workflow will:
Analyze commits since last tag
Determine version bump
Create GitHub release with changelog
Build and push Docker images
Manual Release
To manually trigger a release:
git tag v1.1.0
git push origin v1.1.0Troubleshooting
Connection Issues
Ensure Docker is running
Verify
FORGE_API_TOKENis set correctlyRestart your MCP client after configuration changes
API Errors
# Test API directly
curl -H "Authorization: Bearer $FORGE_API_TOKEN" \
-H "Accept: application/json" \
https://forge.laravel.com/api/v1/serversDocumentation
License
This project is licensed under the MIT License.
Acknowledgements
Laravel Forge - Server management platform
Model Context Protocol - MCP specification
Laravel MCP - Laravel MCP implementation
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/danie1net0/laravel-forge-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server