Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Manages Laravel Forge servers, sites, deployments, SSL certificates, databases, and more through the Model Context Protocol.

README.md

Laravel Forge MCP Server

![Docker](https://hub.docker.com/r/ddrcn/forge-mcp) ![PHP](https://www.php.net/) ![Laravel](https://laravel.com) ![MCP](https://modelcontextprotocol.io)

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

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-servers-tool | List all servers | | get-server-tool | Get server details | | create-server-tool | Create a new server | | update-server-tool | Update server settings | | delete-server-tool | Delete a server | | reboot-server-tool | Reboot a server | | update-database-password-tool | Regenerate database password | | revoke-server-access-tool | Revoke Forge SSH access | | reconnect-server-tool | Reconnect to server | | reactivate-server-tool | Reactivate deleted server | | get-server-log-tool | Get server log files | | list-events-tool | List server events | | get-event-output-tool | Get event output |

Sites (18 tools)

| Tool | Description | | ---------------------------- | ----------------------------- | | list-sites-tool | List all sites on a server | | get-site-tool | Get site details | | get-site-log-tool | Get site logs | | create-site-tool | Create a new site | | update-site-tool | Update site settings | | delete-site-tool | Delete a site | | change-php-version-tool | Change PHP version for a site | | clear-site-log-tool | Clear site log files | | list-aliases-tool | List domain aliases | | update-aliases-tool | Update domain aliases | | get-load-balancing-tool | Get load balancing config | | update-load-balancing-tool | Update load balancing | | install-wordpress-tool | Install WordPress on site | | uninstall-wordpress-tool | Remove WordPress from site | | install-phpmyadmin-tool | Install phpMyAdmin | | uninstall-phpmyadmin-tool | Remove phpMyAdmin | | get-packages-auth-tool | Get Composer auth config | | update-packages-auth-tool | Update Composer auth config |

Deployments (11 tools)

| Tool | Description | | ---------------------------------------- | ------------------------------- | | deploy-site-tool | Trigger a deployment | | get-deployment-log-tool | Get deployment logs | | get-deployment-script-tool | Get deployment script | | update-deployment-script-tool | Update deployment script | | enable-quick-deploy-tool | Enable auto-deploy on push | | disable-quick-deploy-tool | Disable auto-deploy | | list-deployment-history-tool | List deployment history | | get-deployment-history-deployment-tool | Get specific deployment | | get-deployment-history-output-tool | Get deployment output | | reset-deployment-state-tool | Reset stuck deployment state | | set-deployment-failure-emails-tool | Set failure notification emails |

SSL Certificates (7 tools)

| Tool | Description | | -------------------------------------- | -------------------------------- | | list-certificates-tool | List all certificates | | get-certificate-tool | Get certificate details | | obtain-lets-encrypt-certificate-tool | Obtain Let's Encrypt certificate | | install-certificate-tool | Install custom certificate | | get-certificate-signing-request-tool | Get CSR | | delete-certificate-tool | Delete a certificate | | activate-certificate-tool | Activate SSL certificate |

Databases (10 tools)

| Tool | Description | | --------------------------- | -------------------------- | | list-databases-tool | List databases | | get-database-tool | Get database details | | create-database-tool | Create database | | update-database-tool | Update database | | delete-database-tool | Delete database | | list-database-users-tool | List database users | | get-database-user-tool | Get user details | | create-database-user-tool | Create database user | | update-database-user-tool | Update user permissions | | sync-database-tool | Sync databases from server |

Composite Tools (5 tools)

| Tool | Description | | ---------------------------- | ---------------------------------------------------------- | | server-health-check-tool | Comprehensive server health check with metrics aggregation | | site-status-dashboard-tool | Complete site dashboard with SSL, deployments, workers | | bulk-deploy-tool | Deploy multiple sites at once across servers | | ssl-expiration-check-tool | Check SSL certificate expiration across all sites | | clone-site-tool | 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-docs | Forge API documentation reference | | deployment-guidelines | Step-by-step deployment guidelines | | deployment-best-practices | Best practices for Laravel deployments | | security-best-practices | Server security recommendations | | troubleshooting-guide | Common issues and solutions | | php-upgrade-guide | PHP version upgrade procedures | | queue-worker-guide | Queue worker configuration guide | | nginx-optimization | Nginx performance tuning | | security-hardening | Advanced server security hardening |

Available Prompts

| Prompt | Description | | ------------------------- | ------------------------------------- | | deploy-laravel-app | Guided Laravel application deployment | | setup-new-server | Complete server provisioning workflow | | migrate-site | Site migration between servers | | troubleshoot-deployment | Deployment failure diagnosis | | ssl-renewal | SSL certificate renewal workflow | | setup-laravel-site | 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 forge

Run Tests

php artisan test

CI/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 | | -------------------- | ------------------------------------------------------------------------------------- | | DOCKERHUB_USERNAME | Your Docker Hub username | | DOCKERHUB_TOKEN | Docker Hub access token (create one here) |

Automatic Releases

Releases are created automatically based on conventional commits:

| Commit Type | Version Bump | Example | | ------------------------------- | --------------------- | --------------------------- | | feat: | Minor (1.0.0 → 1.1.0) | feat(tools): add new tool | | feat!: or BREAKING CHANGE: | Major (1.0.0 → 2.0.0) | feat!: redesign API | | fix:, docs:, chore:, etc. | Patch (1.0.0 → 1.0.1) | fix(api): handle errors |

When you push to master, the workflow will:

  1. Analyze commits since last tag
  2. Determine version bump
  3. Create GitHub release with changelog
  4. Build and push Docker images

Manual Release

To manually trigger a release:

git tag v1.1.0
git push origin v1.1.0

Troubleshooting

Connection Issues

  1. Ensure Docker is running
  2. Verify FORGE_API_TOKEN is set correctly
  3. Restart 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/servers

Documentation

License

This project is licensed under the MIT License.

Acknowledgements

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Databases servers.