Laravel Forge MCP Server (Extended)
Enables AI assistants to fully manage Laravel Forge servers, sites, databases, workers, daemons, SSL certificates, and deployments.
README
Laravel Forge MCP Server (Extended)
A comprehensive Model Context Protocol (MCP) server for interacting with Laravel Forge API. This server enables AI assistants to fully manage Laravel Forge servers, sites, databases, workers, daemons, SSL certificates, and deployments.
Attribution
This project is a fork of bretterer/forge-mcp-server by @bretterer.
Original features by bretterer:
- Server listing and details
- Site management (list, get)
- Deployment triggering and script management
- Quick deploy toggle
- Server reboot and load metrics
Extended by OBS Technologies:
- Site creation and deletion
- Git repository installation/removal
- Environment file management (.env)
- SSL certificate management (Let's Encrypt)
- Nginx configuration
- Database management (create, list, delete)
- Queue workers (create, list, delete, restart)
- Scheduled jobs/cron (create, list, delete)
- Daemons (create, list, delete, restart) - perfect for Laravel Horizon
- PHP version listing
- Site aliases management
- Improved error handling
Features
Server Management
- List and get details of Laravel Forge servers
- View server load metrics (CPU, memory, disk)
- Reboot servers
- List installed PHP versions
Site Management
- Create new sites with custom domains
- Delete sites
- Update domain aliases
- Configure PHP version per site
- Isolated site users
Deployment
- Deploy sites
- View deployment history
- Get/update deployment scripts
- Toggle quick deploy (auto-deploy on git push)
- Reset stuck deployment states
Git Integration
- Install Git repositories (GitHub, GitLab, Bitbucket)
- Remove Git repositories
- Configure composer install on deploy
Environment & Configuration
- Get/update .env files
- Get/update Nginx configuration
SSL Certificates
- List SSL certificates
- Obtain Let's Encrypt certificates
- Activate certificates
Database Management
- List databases
- Create databases with optional user
- Delete databases
Queue Workers
- List workers
- Create workers (connection, queue, timeout, processes)
- Delete workers
- Restart workers
Scheduled Jobs (Cron)
- List scheduled jobs
- Create scheduled jobs with cron frequency
- Delete scheduled jobs
Daemons
- List daemons
- Create daemons (perfect for Laravel Horizon)
- Delete daemons
- Restart daemons
Installation
git clone https://github.com/AnomalousCoders/forge-mcp-server.git
cd forge-mcp-server
npm install
npm run build
Configuration
Prerequisites
You need a Laravel Forge API key. Get one from your Laravel Forge account settings.
Claude Code Configuration
Add to your ~/.claude/settings.json:
{
"mcpServers": {
"forge": {
"command": "node",
"args": ["/path/to/forge-mcp-server/dist/index.js"],
"env": {
"FORGE_API_KEY": "your_forge_api_key"
}
}
}
}
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"forge": {
"command": "node",
"args": ["/path/to/forge-mcp-server/dist/index.js"],
"env": {
"FORGE_API_KEY": "your_forge_api_key"
}
}
}
}
Available Tools (37 Total)
Server Tools
| Tool | Description |
|---|---|
list_servers |
List all Laravel Forge servers |
get_server |
Get details of a specific server |
get_server_load |
Get server load metrics |
reboot_server |
Reboot a server |
Site Tools
| Tool | Description |
|---|---|
list_sites |
List all sites on a server |
get_site |
Get details of a specific site |
create_site |
Create a new site |
delete_site |
Delete a site |
update_site_aliases |
Update domain aliases |
Deployment Tools
| Tool | Description |
|---|---|
deploy_site |
Deploy a site |
get_deployments |
Get deployment history |
get_deployment_script |
Get deployment script |
update_deployment_script |
Update deployment script |
toggle_quick_deploy |
Enable/disable quick deploy |
reset_deployment_state |
Reset stuck deployments |
Git Tools
| Tool | Description |
|---|---|
install_git_repository |
Install Git repo on site |
remove_git_repository |
Remove Git repo from site |
Environment Tools
| Tool | Description |
|---|---|
get_env |
Get .env file contents |
update_env |
Update .env file |
SSL Tools
| Tool | Description |
|---|---|
get_ssl_certificates |
List SSL certificates |
obtain_letsencrypt_cert |
Get Let's Encrypt certificate |
activate_ssl_certificate |
Activate a certificate |
Nginx Tools
| Tool | Description |
|---|---|
get_nginx_config |
Get Nginx configuration |
update_nginx_config |
Update Nginx configuration |
Database Tools
| Tool | Description |
|---|---|
list_databases |
List all databases |
create_database |
Create a database |
delete_database |
Delete a database |
Worker Tools
| Tool | Description |
|---|---|
list_workers |
List queue workers |
create_worker |
Create a queue worker |
delete_worker |
Delete a worker |
restart_worker |
Restart a worker |
Scheduled Job Tools
| Tool | Description |
|---|---|
list_scheduled_jobs |
List cron jobs |
create_scheduled_job |
Create a cron job |
delete_scheduled_job |
Delete a cron job |
Daemon Tools
| Tool | Description |
|---|---|
list_daemons |
List daemons |
create_daemon |
Create a daemon |
delete_daemon |
Delete a daemon |
restart_daemon |
Restart a daemon |
PHP Tools
| Tool | Description |
|---|---|
list_php_versions |
List installed PHP versions |
Example: Deploy a Laravel App with Horizon
# 1. Create site
create_site: domain=myapp.com, projectType=php, serverId=123
# 2. Install Git repo
install_git_repository: provider=github, repository=user/repo, branch=main, composer=true
# 3. Set up environment
update_env: content="APP_ENV=production\n..."
# 4. Get SSL certificate
obtain_letsencrypt_cert: domains=["myapp.com", "www.myapp.com"]
# 5. Create Horizon daemon
create_daemon: command="php /home/forge/myapp.com/artisan horizon", user=forge
# 6. Create scheduler cron
create_scheduled_job: command="php /home/forge/myapp.com/artisan schedule:run", frequency="* * * * *", user=forge
# 7. Deploy
deploy_site: serverId=123, siteId=456
Development
# Install dependencies
npm install
# Build
npm run build
# Run in development
npm run dev
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Credits
- Original author: @bretterer
- Extended by: OBS Technologies
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.