About Laravel Forge MCP Server
An MCP server that connects AI assistants to the Laravel Forge API for managing servers, sites, and deployments. It provides tools for deployment operations as well as server status and load checks.
Key features
- 01List servers and inspect server details
- 02Manage sites and deployment scripts
- 03Deploy sites and view deployment history
- 04Toggle quick deploy and reset deployment state
- 05Reboot servers and check load
Use cases
- 01Inspect Forge servers and their load
- 02Deploy a site and review deployment history
- 03Update a site's deployment script
MCP support
Exposes Laravel Forge API operations as tools for MCP clients, including server, site, and deployment management.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMELaravel Forge MCP Server
A Model Context Protocol (MCP) server for interacting with Laravel Forge API. This server enables AI assistants to manage Laravel Forge servers, sites, and deployments.
Features
- List and get details of Laravel Forge servers
- Manage sites on Laravel Forge servers
- Deploy sites and manage deployment scripts
- Toggle quick deploy functionality
- View deployment history
- Reboot servers and check server load
Installation
npm install @bretterer/forge-mcp-server
Usage
Prerequisites
You need a Laravel Forge API key to use this server. You can get one from your Laravel Forge account settings.
Environment Variables
Set your Laravel Forge API key as an environment variable:
export FORGE_API_KEY=your_forge_api_key
Running the Server
npx forge-mcp-server
Or add it to your project:
import { ForgeServer } from '@bretterer/forge-mcp-server';
const server = new ForgeServer();
server.run().catch(console.error);
Available Tools
The MCP server provides the following tools:
list_servers- List all Laravel Forge serversget_server- Get details of a specific serverlist_sites- List all sites on a serverget_site- Get details of a specific sitedeploy_site- Deploy a siteget_deployments- Get deployment history for a siteget_deployment_script- Get the deployment script for a siteupdate_deployment_script- Update the deployment script for a sitetoggle_quick_deploy- Enable or disable quick deploy for a sitereboot_server- Reboot a serverget_server_load- Get server load metricsreset_deployment_state- Reset deployment state for a site
Development
Setup
git clone https://github.com/bretterer/forge-mcp-server.git
cd forge-mcp-server
npm install
Build
npm run build
Run in Development Mode
npm run dev
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.